On Oct 16, 2015, at 8:15 AM, Stefan Hajnoczi wrote: > On Tue, Sep 22, 2015 at 07:32:01PM -0400, Programmingkid wrote: >> 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 <programmingk...@gmail.com> >> >> --- >> 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), > > I'm not familiar with the code but I guess this also increases audio > latency by a factor of 4 (8 -> 32).
Didn't hear any problems. When I tried it out. > Gerd might have an opinion on whether that is okay or not. I doubt it. I don't even think he is with QEMU anymore. He doesn't even answer simple emails. He probably stopped working on QEMU. I do think it is time to add another USB maintainer.