From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Js0aH-0002Ss-Fm for qemu-devel@nongnu.org; Fri, 02 May 2008 15:06:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Js0aF-0002SH-Uh for qemu-devel@nongnu.org; Fri, 02 May 2008 15:06:17 -0400 Received: from [199.232.76.173] (port=57352 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Js0aF-0002SD-P4 for qemu-devel@nongnu.org; Fri, 02 May 2008 15:06:15 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Js0aF-0002hp-BF for qemu-devel@nongnu.org; Fri, 02 May 2008 15:06:15 -0400 Message-ID: <481B6626.7010603@web.de> Date: Fri, 02 May 2008 21:06:14 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: jan.kiszka@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] alsaaudio: increase default buffer sizes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Sound though the ALSA driver is skipping here unless I increase the buffer size. OSS seems to use 16K as well, and 1K was obviously to small for recording anyway. [ PS: Can someone explain to me why I also have to override the DAC/ADC_FIXED_FREQ to 48000 to make ALSA work? Suboptimal... ] Signed-off-by: Jan Kiszka --- audio/alsaaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: b/audio/alsaaudio.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -58,7 +58,7 @@ static struct { int period_size_out_overridden; int verbose; } conf =3D { -#define DEFAULT_BUFFER_SIZE 1024 +#define DEFAULT_BUFFER_SIZE 16*1024 #define DEFAULT_PERIOD_SIZE 256 #ifdef HIGH_LATENCY .size_in_usec_in =3D 1, @@ -72,8 +72,8 @@ static struct { .buffer_size_out =3D 400000, .period_size_out =3D 400000 / 4, #else - .buffer_size_in =3D DEFAULT_BUFFER_SIZE * 4, - .period_size_in =3D DEFAULT_PERIOD_SIZE * 4, + .buffer_size_in =3D DEFAULT_BUFFER_SIZE, + .period_size_in =3D DEFAULT_PERIOD_SIZE, .buffer_size_out =3D DEFAULT_BUFFER_SIZE, .period_size_out =3D DEFAULT_PERIOD_SIZE, .buffer_size_in_overridden =3D 0,