The USB audio card would not play audio well because its buffer was too small. Increasing it made it play perfectly. All the crackling and dropouts are gone.
Signed-off-by: John Arbuckle <[email protected]> --- This patch was tested on qemu-system-ppc running Linux and qemu-system-i386 running Windows XP. Windows XP sound output thru the USB audio card sounded perfect. Linux did improve in sound quality, but it still wasn't perfect. I think there are problems with the hcd-ohci.c file. The Mac OS 10.2 guest in qemu-system-ppc did not play sound due to USB issues unrelated to this patch. hw/usb/dev-audio.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index f092bb8..e4e4989 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -88,6 +88,7 @@ static const USBDescStrings usb_audio_stringtable = { #define USBAUDIO_PACKET_SIZE 192 #define USBAUDIO_SAMPLE_RATE 48000 #define USBAUDIO_PACKET_INTERVAL 1 +#define BUFFER_MULTIPLIER 32 static const USBDescIface desc_iface[] = { { @@ -664,7 +665,7 @@ static const VMStateDescription vmstate_usb_audio = { static Property usb_audio_properties[] = { DEFINE_PROP_UINT32("debug", USBAudioState, debug, 0), DEFINE_PROP_UINT32("buffer", USBAudioState, buffer, - 8 * USBAUDIO_PACKET_SIZE), + BUFFER_MULTIPLIER * USBAUDIO_PACKET_SIZE), DEFINE_PROP_END_OF_LIST(), }; -- 1.7.5.4
