From: Programmingkid <programmingkidx@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/usb/dev-audio.c: make USB audio card sound perfect
Date: Fri, 16 Oct 2015 09:54:12 -0400 [thread overview]
Message-ID: <78B63DA5-2230-4ECA-8F06-EC81F677895C@gmail.com> (raw)
In-Reply-To: <20151016121548.GH10205@stefanha-thinkpad.redhat.com>
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 <programmingkidx@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.
next prev parent reply other threads:[~2015-10-16 13:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 23:32 [Qemu-devel] [PATCH] hw/usb/dev-audio.c: make USB audio card sound perfect Programmingkid
2015-10-16 12:15 ` Stefan Hajnoczi
2015-10-16 13:54 ` Programmingkid [this message]
2015-10-16 14:00 ` Peter Maydell
2015-10-16 14:06 ` Programmingkid
2015-10-26 11:00 ` Stefan Hajnoczi
2015-10-26 12:24 ` Gerd Hoffmann
2015-10-26 16:05 ` Programmingkid
2015-10-28 10:58 ` Stefan Hajnoczi
2015-10-28 12:07 ` Gerd Hoffmann
2015-10-28 13:59 ` Programmingkid
2015-10-29 15:08 ` Stefan Hajnoczi
2015-10-29 16:02 ` Programmingkid
2015-10-30 10:59 ` Gerd Hoffmann
2015-11-02 13:07 ` Stefan Hajnoczi
2015-11-02 13:49 ` Gerd Hoffmann
2015-10-26 15:16 ` Programmingkid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78B63DA5-2230-4ECA-8F06-EC81F677895C@gmail.com \
--to=programmingkidx@gmail.com \
--cc=hpa@linux.intel.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).