From: Mike Oliphant <oliphant@nostatic.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Support for NUX MG-300 USB interface
Date: Mon, 18 Jan 2021 16:26:51 -0800 [thread overview]
Message-ID: <CAHXb3bd8zHFmHxDp=4dNKa90eAT568yCwTWo_5L0Zry1EY45UA@mail.gmail.com> (raw)
In-Reply-To: <s5him7thpoz.wl-tiwai@suse.de>
Unfortunately, the "uac_clock_selector_set_val()" call does not seem to
change anything.
From doing some more testing, I think that the references to clock id "40"
are ok - it has "40" stored in fmt->clock, but when it uses it,
"__uac_clock_find_source()" gets called and it resolved to the actual clock
source - "41".
Not sure about the "No valid sample rate available for 1:1, assuming a
firmware bug" error, but I suspect it is spurious.
"check_valid_altsetting_v2v3()" is failing for some reason, but it is
ignoring the error.
Playback is completely silent, but the system seems to think it is working.
No apparent errors, and a play operation seems to take the correct amount
of time. Just no audio.
Maybe it is a mixer issue? mixer.c is putting out "RANGE setting not yet
supported" errors on startup.
Here is a sample of dmesg output for a playback session:
[ 4748.260975] usb 1-1.3: Open EP 0x1, iface=1:1, idx=0
[ 4748.260983] usb 1-1.3: channels=2, rate=48000, format=S32_LE,
period_bytes=48000, periods=4, implicit_fb=0
[ 4748.260988] usb 1-1.3: Open EP 0x81, iface=1:1, idx=1
[ 4748.260992] usb 1-1.3: channels=2, rate=48000, format=S32_LE,
period_bytes=48000, periods=4, implicit_fb=0
[ 4748.260996] usb 1-1.3: Setting usb interface 1:0 for EP 0x1
[ 4748.261320] usb 1-1.3: 1:1 Set sample rate 48000, clock 40
[ 4748.261873] usb 1-1.3: Setting params for data EP 0x1, pipe 0x9d00
[ 4748.261890] usb 1-1.3: Set up 12 URBS, ret=0
[ 4748.261897] usb 1-1.3: Setting usb interface 1:1 for EP 0x1
[ 4748.262097] usb 1-1.3: Setting params for sync EP 0x81, pipe 0x9d80
[ 4748.262105] usb 1-1.3: Set up 4 URBS, ret=0
[ 4748.262147] usb 1-1.3: Starting data EP 0x1 (running 0)
[ 4748.262180] usb 1-1.3: 12 URBs submitted for EP 0x1
[ 4748.262183] usb 1-1.3: Starting sync EP 0x81 (running 0)
[ 4748.262193] usb 1-1.3: 4 URBs submitted for EP 0x81
[ 4748.262311] usb 1-1.3: 1:1 Start Playback PCM
[ 4762.887812] usb 1-1.3: Stopping sync EP 0x81 (running 1)
[ 4762.887836] usb 1-1.3: Stopping data EP 0x1 (running 1)
[ 4762.887849] usb 1-1.3: 1:1 Stop Playback PCM
[ 4762.902542] usb 1-1.3: Closing EP 0x1 (count 1)
[ 4762.902549] usb 1-1.3: Setting usb interface 1:0 for EP 0x1
[ 4762.902915] usb 1-1.3: EP 0x1 closed
[ 4762.902928] usb 1-1.3: Closing EP 0x81 (count 1)
[ 4762.902935] usb 1-1.3: Setting usb interface 1:0 for EP 0x81
[ 4762.903179] usb 1-1.3: EP 0x81 closed
On Mon, Jan 18, 2021 at 1:59 PM Takashi Iwai <tiwai@suse.de> wrote:
> On Mon, 18 Jan 2021 22:15:26 +0100,
> Mike Oliphant wrote:
> >
> > Progress - thanks for the patch!
> >
> > That got rid of the clock errors, and the the device now reports a 48000
> > sample rate, which is correct.
> >
> > Unfortunately, it still isn't working properly. Playback doesn't seem to
> work
> > at all. Capture kind of works - it does record, but the audio is
> extremely
> > noisy.
> >
> > Here is the current dmesg output when the device is connected.
> >
> > Notable is the error "No valid sample rate available for 1:1, assuming a
> > firmware bug".
> >
> > Also notable is "1:1 Set sample rate 48000, clock 40" - where "40" is
> the id
> > of the clock selector - "41" is the id of the actual clock source. So
> maybe
> > something is still getting wired up wrong?
>
> OK, how about the one below instead?
>
>
> Takashi
>
> --- a/sound/usb/clock.c
> +++ b/sound/usb/clock.c
> @@ -298,6 +298,12 @@ static int __uac_clock_find_source(struct
> snd_usb_audio *chip,
> if (selector) {
> int ret, i, cur;
>
> + if (selector->bNrInPins == 1) {
> + uac_clock_selector_set_val(chip,
> selector->bClockID, 1);
> + ret = 1;
> + goto find_source;
> + }
> +
> /* the entity ID we are looking for is a selector.
> * find out what it currently selects */
> ret = uac_clock_selector_get_val(chip, selector->bClockID);
> @@ -314,6 +320,7 @@ static int __uac_clock_find_source(struct
> snd_usb_audio *chip,
> return -EINVAL;
> }
>
> + find_source:
> cur = ret;
> ret = __uac_clock_find_source(chip, fmt,
> selector->baCSourceID[ret -
> 1],
>
next prev parent reply other threads:[~2021-01-19 0:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 18:56 Support for NUX MG-300 USB interface Mike Oliphant
2021-01-18 7:43 ` Takashi Iwai
2021-01-18 16:33 ` Mike Oliphant
2021-01-18 17:54 ` Mike Oliphant
2021-01-18 19:19 ` Takashi Iwai
2021-01-18 21:15 ` Mike Oliphant
2021-01-18 21:59 ` Takashi Iwai
2021-01-19 0:26 ` Mike Oliphant [this message]
2021-01-19 9:05 ` Takashi Iwai
2021-01-19 17:40 ` Mike Oliphant
2021-01-20 14:33 ` Takashi Iwai
2021-01-20 21:17 ` Mike Oliphant
2021-01-20 21:38 ` Takashi Iwai
2021-01-20 21:47 ` Mike Oliphant
2021-01-21 19:04 ` Mike Oliphant
2021-01-21 20:18 ` Mike Oliphant
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='CAHXb3bd8zHFmHxDp=4dNKa90eAT568yCwTWo_5L0Zry1EY45UA@mail.gmail.com' \
--to=oliphant@nostatic.org \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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).