From: Peter Chen <peter.chen@nxp.com>
To: Glenn Schmottlach <gschmottlach@gmail.com>
Cc: Ruslan Bilovol <ruslan.bilovol@gmail.com>,
"balbi@kernel.org" <balbi@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 0/3] UAC2 Gadget: feedback endpoint support
Date: Thu, 3 Dec 2020 10:09:42 +0000 [thread overview]
Message-ID: <20201203100912.GA2881@b29397-desktop> (raw)
In-Reply-To: <CAMS2kBGcDu-02dboEwxygMDE1r1c9Q3Lzrw6TcsoKEMvOzLmDQ@mail.gmail.com>
On 20-12-02 17:04:47, Glenn Schmottlach wrote:
> On Tue, Dec 1, 2020 at 4:43 PM Glenn Schmottlach <gschmottlach@gmail.com> wrote:
> > Hi Ruslan -
> >
> > Thanks for the feedback but unfortunately I've experienced mixed
> > results with the gadget UAC2 driver on both Windows/Linux. Let me
> > describe my environment. My host platform is either a Linux Ubuntu
> > 18.04 or Windows 10 laptop while the target environment is a
> > BeagleBone Black (Linux beaglebone 5.4.74-g9574bba32a #1 PREEMPT). I'm
> > testing two different scenarios:
> >
> > Scenario #1:
> > BeagleBone Black (BBB) runs speaker-test generating a single channel
> > (S32_LE) audio stream containing a 1KHz tone with a 48K sample rate,
> > e.g.
> >
> > > speaker-test -D hw:1,0 -r 48000 -c 1 -f 1000 -F S32_LE -t sine
> >
> > The host laptop is running Audacity and recording the tone over the
> > UAC2 adapter. On the Linux host the capture is correct and the tone is
> > bit-perfect. On the Windows 10 the capture contains numerous missing
> > samples which translates into a lot of audible pops and clicks.
> >
> > Scenario #2:
> > The Linux/Windows host plays a single channel, 48K, S32_LE 1K sine
> > tone to the target using either Audacity (on Windows) or 'aplay' (on
> > Linux), e.g.
> >
> > > aplay -D hw:4,0 -c 1 -r 48000 -t wav tone_1k.wav (Linux)
> >
> > On the BBB target I use 'arecord' to record the tone to a RAM disk and
> > then copy the recorded file back to the host where I can verify the
> > quality of the recording. In both instances (e.g. using either Windows
> > or Linux for playback) the recording on the target results in a
> > captured file with missing samples and audible pops/clicks. In this
> > scenario the UAC2 gadget is configured with c_sync == asynchronous. I
> > wouldn't expect things to improve with c_sync == adaptive since you
> > mentioned in your patch that it always reports back the nominal
> > frequency to the host from the feedback endpoint.
> >
> > Do you have any suggestions that might explain (the above) behavior.
> > Can you describe your test environment in more detail so that I can
> > perhaps re-create it? What Linux target are you using with your tests?
> > You mentioned you tested an 8x8 playback/capture scenario. Can you
> > provide any details of how you performed this test and the method you
> > used to confirm the audio quality for the capture/playback?
> >
> > Thanks for any insights you might be able to offer . . .
> >
> > Glenn
>
> Hi Ruslan -
>
> This is a follow-up from my post yesterday. I recompiled my kernel
> *WITHOUT* your UAC2 patches and repeated Scenario #2 where the Linux
> PC plays a single channel tone to the BeagleBone Black where it's
> recorded with 'arecord'. Yesterday, I recorded garbled audio on the
> target but today, without any UAC2 kernel patches, the recorded audio
> on the target is glitch-free and appears to be bit-perfect.
>
> This experiment leads me to believe your patches may be inadvertently
> corrupting the data-path. Have you been able to repeat my experiment
> and either confirm or refute my findings? I am interested to learn
> more how you tested your patches and whether it's something I can
> recreate here.
>
> Assuming we can sort out this data corruption issue, what are your
> thoughts on how the Linux target device can properly provide the
> Windows feedback endpoint with real frequency updates rather than the
> constant nominal frequency. If I understood your patch notes correctly
> it seems this is an outstanding issue that requires additional
> attention. I'm a bit of a noob when it comes to how this might be
> addressed.
>
> Thanks for your continued insights and support . . .
>
> Glenn
Hi Glenn & Ruslan,
Do you know why WIN10 can't recognized UAC2 device if I configure the
sample rate as 48000HZ? Configuring sample rate as 44100HZ, the playback
function would work well at my platforms (chipidea IP), no glitch is
heard. At WIN10, I use Windows Media Player, at board side I use command:
arecord -f cd -t wav -D hw:4,0 | aplay -f cd -Dplughw:3,0 &
From the USB Bus analyzer:
Feedback EP is scheduled every 1ms, there are nine 176-byte packets and one
180-byte packet among 10ms transfers.
--
Thanks,
Peter Chen
next prev parent reply other threads:[~2020-12-03 10:10 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 0:18 [PATCH 0/3] UAC2 Gadget: feedback endpoint support Ruslan Bilovol
2020-11-08 0:18 ` [PATCH 1/3] usb: gadget: f_uac2/u_audio: add " Ruslan Bilovol
2020-11-11 9:26 ` Peter Chen
2020-11-12 22:41 ` Ruslan Bilovol
2020-11-08 0:18 ` [PATCH 2/3] usb: gadget: f_uac2: add adaptive sync support for capture Ruslan Bilovol
2020-11-11 9:18 ` Peter Chen
2020-11-12 22:39 ` Ruslan Bilovol
2020-11-26 11:13 ` Jerome Brunet
2020-12-04 14:03 ` Ruslan Bilovol
2020-11-08 0:18 ` [PATCH 3/3] usb: gadget: u_audio: add real feedback implementation Ruslan Bilovol
2020-11-09 8:24 ` Pavel Hofman
2020-11-09 8:25 ` Pavel Hofman
2020-11-12 11:26 ` Pavel Hofman
2020-11-11 9:30 ` [PATCH 0/3] UAC2 Gadget: feedback endpoint support Peter Chen
2020-11-12 23:20 ` Ruslan Bilovol
2020-11-13 15:35 ` Glenn Schmottlach
2020-11-22 19:51 ` Ruslan Bilovol
2020-11-25 19:28 ` Glenn Schmottlach
2020-11-28 23:26 ` Ruslan Bilovol
2020-12-01 21:43 ` Glenn Schmottlach
2020-12-02 22:04 ` Glenn Schmottlach
2020-12-03 10:09 ` Peter Chen [this message]
2020-12-03 22:07 ` Glenn Schmottlach
2020-12-10 12:59 ` Ruslan Bilovol
2020-12-11 7:22 ` Peter Chen
2020-12-10 12:46 ` Ruslan Bilovol
2020-11-26 13:16 ` Jerome Brunet
2020-11-26 13:44 ` Pavel Hofman
2020-12-04 14:39 ` Ruslan Bilovol
2020-12-04 18:08 ` Pavel Hofman
2020-12-04 14:35 ` Ruslan Bilovol
-- strict thread matches above, loose matches on Subject: below --
2020-11-12 20:42 Glenn Schmottlach
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=20201203100912.GA2881@b29397-desktop \
--to=peter.chen@nxp.com \
--cc=balbi@kernel.org \
--cc=gschmottlach@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=ruslan.bilovol@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