Upon switching from 4.19.0 to 4.20.0, pulseaudio started complaining
that sinks that previously worked are no longer supported.
On 4.19.0 trying 24 bit 88200, 176400, and 192000 I get the following
output from pulse.
resampler.c: Forcing resampler 'copy', because of fixed, identical
sample rates.sink-input.c: Created input 15 "Playback Stream" on
alsa_output.usb-DSPeaker_Anti-Mode_X4-00.iec958-stereo with sample
spec float32le 2ch 176400Hz and channel map front-left,front-right
Switching to 4.20 gives me:
alsa-sink.c: Sink does not support sample rate of 176400 Hz
and
alsa-sink.c: Sink does not support sample rate of 88200 Hz
and
alsa-sink.c: Sink does not support sample rate of 192000 Hz
Sample rates of 44100, 48000, and 96000 work fine, but 88200, 176400,
and 192000 no longer work
Switching back to 4.19 immediately fixes the issue.
I tried looking through the alsa changelogs but there were too many to
give an obvious culprit, and haven't had time to do a git bisect. If
there's an obvious choice patch to back out I'd be grateful for the
heads up.
Regards,
Con
Output from 4.19 dmesg grep snd:
[ 4.941164] snd_hda_intel 0000:02:00.1: Disabling MSI
[ 4.957534] snd_hda_codec_realtek hdaudioC0D0: autoconfig for
ALC892: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[ 4.957536] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0
(0x0/0x0/0x0/0x0/0x0)
[ 4.957537] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1
(0x1b/0x0/0x0/0x0/0x0)
[ 4.957538] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 4.957538] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x11/0x1e
[ 4.957539] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 4.957540] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 4.957541] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 4.957542] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 6.215818] usbcore: registered new interface driver snd-usb-audio
Output from 4.20 dmesg grep snd (identical):
[ 4.960455] snd_hda_intel 0000:02:00.1: Disabling MSI
[ 4.986848] snd_hda_codec_realtek hdaudioC0D0: autoconfig for
ALC892: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[ 4.986850] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0
(0x0/0x0/0x0/0x0/0x0)
[ 4.986852] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1
(0x1b/0x0/0x0/0x0/0x0)
[ 4.986853] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 4.986854] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x11/0x1e
[ 4.986855] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 4.986856] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 4.986857] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 4.986858] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 6.211079] usbcore: registered new interface driver snd-usb-audio
Output from usb connected audio device 4.19:
[ 998.567015] usb 2-1.8.4: new high-speed USB device number 19 using ehci-pci
[ 998.682497] usb 2-1.8.4: New USB device found, idVendor=19fb,
idProduct=2040, bcdDevice= 2.00
[ 998.682502] usb 2-1.8.4: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 998.682505] usb 2-1.8.4: Product: Anti-Mode X4
[ 998.682507] usb 2-1.8.4: Manufacturer: DSPeaker
4.20 (identical):
[ 98.428175] usb 2-1.8.4: new high-speed USB device number 19 using ehci-pci
[ 98.543175] usb 2-1.8.4: New USB device found, idVendor=19fb,
idProduct=2040, bcdDevice= 2.00
[ 98.543177] usb 2-1.8.4: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 98.543178] usb 2-1.8.4: Product: Anti-Mode X4
[ 98.543179] usb 2-1.8.4: Manufacturer: DSPeaker
lspci output:
00:00.0 Host bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7
DMI2 (rev 04)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7
PCI Express Root Port 1a (rev 04)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7
PCI Express Root Port 2a (rev 04)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7
PCI Express Root Port 3a (rev 04)
00:05.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 VTd/Memory Map/Misc (rev 04)
00:05.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 IIO RAS (rev 04)
00:05.4 PIC: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 IOAPIC (rev 04)
00:11.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Virtual Root Port (rev 06)
00:16.0 Communication controller: Intel Corporation C600/X79 series
chipset MEI Controller #1 (rev 05)
00:1a.0 USB controller: Intel Corporation C600/X79 series chipset USB2
Enhanced Host Controller #2 (rev 06)
00:1b.0 Audio device: Intel Corporation C600/X79 series chipset High
Definition Audio Controller (rev 06)
00:1c.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Root Port 1 (rev b6)
00:1c.2 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Root Port 3 (rev b6)
00:1c.3 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Root Port 4 (rev b6)
00:1c.4 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Root Port 5 (rev b6)
00:1c.5 PCI bridge: Intel Corporation C600/X79 series chipset PCI
Express Root Port 6 (rev b6)
00:1d.0 USB controller: Intel Corporation C600/X79 series chipset USB2
Enhanced Host Controller #1 (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation C600/X79 series chipset LPC
Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset
6-Port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation C600/X79 series chipset SMBus Host
Controller (rev 06)
02:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce
GTX 1060 3GB] (rev a1)
02:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio
Controller (rev a1)
06:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
07:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA
Controller (rev 01)
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
ff:08.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 QPI Link 0 (rev 04)
ff:09.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 QPI Link 1 (rev 04)
ff:0a.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Power Control Unit 0 (rev 04)
ff:0a.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Power Control Unit 1 (rev 04)
ff:0a.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Power Control Unit 2 (rev 04)
ff:0a.3 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Power Control Unit 3 (rev 04)
ff:0b.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 UBOX Registers (rev 04)
ff:0b.3 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 UBOX Registers (rev 04)
ff:0c.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0c.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0c.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0d.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0d.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0d.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Unicast Registers (rev 04)
ff:0e.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Home Agent 0 (rev 04)
ff:0e.1 Performance counters: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Home Agent 0 (rev 04)
ff:0f.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 Target Address/Thermal
Registers (rev 04)
ff:0f.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 RAS Registers (rev 04)
ff:0f.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 Channel Target Address
Decoder Registers (rev 04)
ff:0f.3 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 Channel Target Address
Decoder Registers (rev 04)
ff:0f.4 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 Channel Target Address
Decoder Registers (rev 04)
ff:0f.5 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 0 Channel Target Address
Decoder Registers (rev 04)
ff:10.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control
0 (rev 04)
ff:10.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control
1 (rev 04)
ff:10.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers
0 (rev 04)
ff:10.3 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers
1 (rev 04)
ff:10.4 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control
2 (rev 04)
ff:10.5 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control
3 (rev 04)
ff:10.6 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers
2 (rev 04)
ff:10.7 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers
3 (rev 04)
ff:13.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 R2PCIe (rev 04)
ff:13.1 Performance counters: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 R2PCIe (rev 04)
ff:13.4 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 QPI Ring Registers (rev 04)
ff:13.5 Performance counters: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 QPI Ring Performance Ring Monitoring (rev 04)
ff:16.0 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 System Address Decoder (rev 04)
ff:16.1 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Broadcast Registers (rev 04)
ff:16.2 System peripheral: Intel Corporation Xeon E7 v2/Xeon E5
v2/Core i7 Broadcast Registers (rev 04)
lsusb:
Bus 002 Device 014: ID 19fb:2040
Bus 002 Device 010: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 002 Device 007: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 002 Device 016: ID 0627:0001 Adomax Technology Co., Ltd
Bus 002 Device 012: ID 04d9:0169 Holtek Semiconductor, Inc.
Bus 002 Device 009: ID 046d:09a2 Logitech, Inc. QuickCam Communicate
Deluxe/S7500
Bus 002 Device 005: ID 2109:2811 VIA Labs, Inc. Hub
Bus 002 Device 013: ID 046d:0a29 Logitech, Inc. H600 [Wireless Headset]
Bus 002 Device 017: ID 04d9:0198 Holtek Semiconductor, Inc.
Bus 002 Device 015: ID 1235:8202 Focusrite-Novation
Bus 002 Device 011: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 002 Device 008: ID 0a12:0001 Cambridge Silicon Radio, Ltd
Bluetooth Dongle (HCI mode)
Bus 002 Device 006: ID 04b8:012c Seiko Epson Corp. GT-X900 [Perfection
V700/V750 Photo]
Bus 002 Device 004: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 002 Device 003: ID 1759:5000 LucidPort Technology, Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
On Thu, 03 Jan 2019 12:43:54 +0100,
Con Kolivas wrote:
>
> Upon switching from 4.19.0 to 4.20.0, pulseaudio started complaining
> that sinks that previously worked are no longer supported.
>
> On 4.19.0 trying 24 bit 88200, 176400, and 192000 I get the following
> output from pulse.
> resampler.c: Forcing resampler 'copy', because of fixed, identical
> sample rates.sink-input.c: Created input 15 "Playback Stream" on
> alsa_output.usb-DSPeaker_Anti-Mode_X4-00.iec958-stereo with sample
> spec float32le 2ch 176400Hz and channel map front-left,front-right
>
> Switching to 4.20 gives me:
> alsa-sink.c: Sink does not support sample rate of 176400 Hz
> and
> alsa-sink.c: Sink does not support sample rate of 88200 Hz
> and
> alsa-sink.c: Sink does not support sample rate of 192000 Hz
>
> Sample rates of 44100, 48000, and 96000 work fine, but 88200, 176400,
> and 192000 no longer work
>
> Switching back to 4.19 immediately fixes the issue.
>
>
> I tried looking through the alsa changelogs but there were too many to
> give an obvious culprit, and haven't had time to do a git bisect. If
> there's an obvious choice patch to back out I'd be grateful for the
> heads up.
Hm, through a quick glance, there hasn't been any relevant changes in
USB-audio part (sound/usb/*). Also, the changes in sound/core/* are
irrelevant with your problem.
So I have no idea what went wrong. The bisection, or at least,
narrowing down the commits would be helpful.
thanks,
Takashi
Hi Iwai-san.
Added some relevant CCs.
On Fri, 4 Jan 2019 at 00:23, Takashi Iwai <[email protected]> wrote:
>
> On Thu, 03 Jan 2019 12:43:54 +0100,
> Con Kolivas wrote:
> >
> > Upon switching from 4.19.0 to 4.20.0, pulseaudio started complaining
> > that sinks that previously worked are no longer supported.
> >
> > On 4.19.0 trying 24 bit 88200, 176400, and 192000 I get the following
> > output from pulse.
> > resampler.c: Forcing resampler 'copy', because of fixed, identical
> > sample rates.sink-input.c: Created input 15 "Playback Stream" on
> > alsa_output.usb-DSPeaker_Anti-Mode_X4-00.iec958-stereo with sample
> > spec float32le 2ch 176400Hz and channel map front-left,front-right
> >
> > Switching to 4.20 gives me:
> > alsa-sink.c: Sink does not support sample rate of 176400 Hz
> > and
> > alsa-sink.c: Sink does not support sample rate of 88200 Hz
> > and
> > alsa-sink.c: Sink does not support sample rate of 192000 Hz
> >
> > Sample rates of 44100, 48000, and 96000 work fine, but 88200, 176400,
> > and 192000 no longer work
> >
> > Switching back to 4.19 immediately fixes the issue.
> >
> >
> > I tried looking through the alsa changelogs but there were too many to
> > give an obvious culprit, and haven't had time to do a git bisect. If
> > there's an obvious choice patch to back out I'd be grateful for the
> > heads up.
>
> Hm, through a quick glance, there hasn't been any relevant changes in
> USB-audio part (sound/usb/*). Also, the changes in sound/core/* are
> irrelevant with your problem.
>
> So I have no idea what went wrong. The bisection, or at least,
> narrowing down the commits would be helpful.
I've done a git bisect and found the offending commit:
commit f13912d3f014a7f2fa5c35d25ee8c3f96bda6272 (refs/bisect/bad)
Author: Saranya Gopal <[email protected]>
Date: Wed Sep 12 08:46:26 2018 +0530
usbcore: Select UAC3 configuration for audio if present
USB audio class 3.0 specification introduced many significant
changes like
- new power domains, support for LPM/L1
- new cluster descriptor
- new high capability and class-specific string descriptors
- BADD profiles
- ... and many other things (check spec from link below:
http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip)
Now that UAC3 is supported in linux, choose UAC3
configuration for audio if the device supports it.
Selecting this configuration will enable the system to
save power by leveraging the new power domains and LPM L1
capability and also support new codec types and data formats
for consumer audio applications.
Signed-off-by: Saranya Gopal <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reverting this patch fixes the problem for me.
Hope this helps.
Thanks,
Con
On Fri, 04 Jan 2019 00:16:42 +0100,
Con Kolivas wrote:
>
> Hi Iwai-san.
>
> Added some relevant CCs.
>
> On Fri, 4 Jan 2019 at 00:23, Takashi Iwai <[email protected]> wrote:
> >
> > On Thu, 03 Jan 2019 12:43:54 +0100,
> > Con Kolivas wrote:
> > >
> > > Upon switching from 4.19.0 to 4.20.0, pulseaudio started complaining
> > > that sinks that previously worked are no longer supported.
> > >
> > > On 4.19.0 trying 24 bit 88200, 176400, and 192000 I get the following
> > > output from pulse.
> > > resampler.c: Forcing resampler 'copy', because of fixed, identical
> > > sample rates.sink-input.c: Created input 15 "Playback Stream" on
> > > alsa_output.usb-DSPeaker_Anti-Mode_X4-00.iec958-stereo with sample
> > > spec float32le 2ch 176400Hz and channel map front-left,front-right
> > >
> > > Switching to 4.20 gives me:
> > > alsa-sink.c: Sink does not support sample rate of 176400 Hz
> > > and
> > > alsa-sink.c: Sink does not support sample rate of 88200 Hz
> > > and
> > > alsa-sink.c: Sink does not support sample rate of 192000 Hz
> > >
> > > Sample rates of 44100, 48000, and 96000 work fine, but 88200, 176400,
> > > and 192000 no longer work
> > >
> > > Switching back to 4.19 immediately fixes the issue.
> > >
> > >
> > > I tried looking through the alsa changelogs but there were too many to
> > > give an obvious culprit, and haven't had time to do a git bisect. If
> > > there's an obvious choice patch to back out I'd be grateful for the
> > > heads up.
> >
> > Hm, through a quick glance, there hasn't been any relevant changes in
> > USB-audio part (sound/usb/*). Also, the changes in sound/core/* are
> > irrelevant with your problem.
> >
> > So I have no idea what went wrong. The bisection, or at least,
> > narrowing down the commits would be helpful.
>
> I've done a git bisect and found the offending commit:
>
> commit f13912d3f014a7f2fa5c35d25ee8c3f96bda6272 (refs/bisect/bad)
> Author: Saranya Gopal <[email protected]>
> Date: Wed Sep 12 08:46:26 2018 +0530
>
> usbcore: Select UAC3 configuration for audio if present
>
> USB audio class 3.0 specification introduced many significant
> changes like
> - new power domains, support for LPM/L1
> - new cluster descriptor
> - new high capability and class-specific string descriptors
> - BADD profiles
> - ... and many other things (check spec from link below:
> http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip)
>
> Now that UAC3 is supported in linux, choose UAC3
> configuration for audio if the device supports it.
> Selecting this configuration will enable the system to
> save power by leveraging the new power domains and LPM L1
> capability and also support new codec types and data formats
> for consumer audio applications.
>
> Signed-off-by: Saranya Gopal <[email protected]>
> Reviewed-by: Felipe Balbi <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
>
> Reverting this patch fixes the problem for me.
[ Adding linux-usb ML to Cc, as it's a core USB issue ]
So the device seems incorrectly advertising as if it were supporting
UAC3 -- assuming the device is still not UAC3-capable.
IOW, it's a buggy firmware. We need some blacklisting, or revert the
commit for now, unless any real UAC3 device comes up to the market.
thanks,
Takashi
> [ Adding linux-usb ML to Cc, as it's a core USB issue ]
>
> So the device seems incorrectly advertising as if it were supporting
> UAC3 -- assuming the device is still not UAC3-capable.
>
> IOW, it's a buggy firmware. We need some blacklisting, or revert the
> commit for now, unless any real UAC3 device comes up to the market.
IIRC an UAC3-capable device is required to expose a backwards-compatible
configuration (either UAC1 or UAC2). Maybe an additional test can be
done to harden the detection so that UAC3 is only chosen if indeed a
second audio configuration is present as well.
I also vaguely recall there was talk about adding information in the BOS
descriptor, but I don't know if this was ever published.
-Pierre
> > [ Adding linux-usb ML to Cc, as it's a core USB issue ]
> >
> > So the device seems incorrectly advertising as if it were supporting
> > UAC3 -- assuming the device is still not UAC3-capable.
> >
> > IOW, it's a buggy firmware. We need some blacklisting, or revert the
> > commit for now, unless any real UAC3 device comes up to the market.
>
> IIRC an UAC3-capable device is required to expose a backwards-compatible
> configuration (either UAC1 or UAC2). Maybe an additional test can be
> done to harden the detection so that UAC3 is only chosen if indeed a
> second audio configuration is present as well.
>
> I also vaguely recall there was talk about adding information in the BOS
> descriptor, but I don't know if this was ever published.
>
> -Pierre
The current detection logic is that UAC3 configuration is chosen only when a device has a configuration with audio interface supporting UAC3 protocol.
Additionally, it already makes sure that UAC3 is selected only when there is more than one configuration.
Otherwise, the first configuration is chosen by default. So, the patch does not affect existing UAC1 and UAC2 devices.
As Iwai said, this issue seems to be because of a buggy firmware which wrongly advertises UAC3-capability.
Could we add some quirk to select another configuration for this particular device?
I see that there is a similar in quirk in sound/usb/quirks.c (snd_usb_fasttrackpro_boot_quirk) .
Could something like that be done for this particular device?
And since I was not part of the initial mail thread, I might have missed some information.
Could someone give me lsusb -v output for this USB audio device.
Thanks,
Saranya
On 1/4/19 10:52 AM, Gopal, Saranya wrote:
>>> [ Adding linux-usb ML to Cc, as it's a core USB issue ]
>>>
>>> So the device seems incorrectly advertising as if it were supporting
>>> UAC3 -- assuming the device is still not UAC3-capable.
>>>
>>> IOW, it's a buggy firmware. We need some blacklisting, or revert the
>>> commit for now, unless any real UAC3 device comes up to the market.
>> IIRC an UAC3-capable device is required to expose a backwards-compatible
>> configuration (either UAC1 or UAC2). Maybe an additional test can be
>> done to harden the detection so that UAC3 is only chosen if indeed a
>> second audio configuration is present as well.
>>
>> I also vaguely recall there was talk about adding information in the BOS
>> descriptor, but I don't know if this was ever published.
>>
>> -Pierre
> The current detection logic is that UAC3 configuration is chosen only when a device has a configuration with audio interface supporting UAC3 protocol.
> Additionally, it already makes sure that UAC3 is selected only when there is more than one configuration.
What I meant if that the other configurations are not checked for UAC1
or UAC2 capabilities, you only check that there is more than one
configuration
Hi Saranya.
On Sat, 5 Jan 2019 at 03:52, Gopal, Saranya <[email protected]> wrote:
> And since I was not part of the initial mail thread, I might have missed some information.
> Could someone give me lsusb -v output for this USB audio device.
These outputs are with the UAC3 patch backed out:
dmesg:
[50384.859492] usb 2-1.8.4: new high-speed USB device number 26 using ehci-pci
[50384.974496] usb 2-1.8.4: New USB device found, idVendor=19fb,
idProduct=2040, bcdDevice= 2.00
[50384.974500] usb 2-1.8.4: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[50384.974501] usb 2-1.8.4: Product: Anti-Mode X4
[50384.974503] usb 2-1.8.4: Manufacturer: DSPeaker
lsusb -v:
Bus 002 Device 026: ID 19fb:2040
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x19fb
idProduct 0x2040
bcdDevice 2.00
iManufacturer 1 DSPeaker
iProduct 2 Anti-Mode X4
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 254
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 1 Audio
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 10
wTotalLength 60
bmControl 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 41
bmAttributes 0x03 Internal programmable Clock
bmControls 0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 0
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bUnitID 40
bNrInPins 1
baCSourceID( 0) 41
bmControls 0x00
iClockSelector 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000000
bmControls 0x0000
iChannelNames 4 Analog 1
iTerminal 0
AudioControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 1
bmaControls( 0) 0x0000000f
Mute Control (read/write)
Volume Control (read/write)
bmaControls( 1) 0x00000000
bmaControls( 2) 0x00000000
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 3
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x010e 1x 270 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x010e 1x 270 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x00
bFormatType 1
bmFormats 0x80000000
bNrChannels 2
bmChannelConfig 0x00000000
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0190 1x 400 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 186
bNumInterfaces 2
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 43
bInCollection 1
baInterfaceNr( 0) 1
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 3
bSourceID 1
bControlSize 2
bmaControls( 0) 0x03
bmaControls( 0) 0x00
Mute Control
Volume Control
bmaControls( 1) 0x00
bmaControls( 1) 0x00
bmaControls( 2) 0x00
bmaControls( 2) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0305 Room Speaker
bAssocTerminal 0
bSourceID 3
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 3 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 3
bBitResolution 24
bSamFreqType 3 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
tSamFreq[ 2] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0258 1x 600 bytes
bInterval 4
bRefresh 0
bSynchAddress 129
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0 Decoded PCM samples
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0003 1x 3 bytes
bInterval 4
bRefresh 4
bSynchAddress 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 3 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 3 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
tSamFreq[ 2] 96000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0258 1x 600 bytes
bInterval 4
bRefresh 0
bSynchAddress 129
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 0 Decoded PCM samples
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0003 1x 3 bytes
bInterval 4
bRefresh 4
bSynchAddress 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 2
Device Status: 0x0000
(Bus Powered)
>
> Thanks,
> Saranya
Regards,
Con
From: Saranya Gopal <[email protected]>
In most of the UAC1 and UAC2 audio devices, the first
configuration is most often the best configuration.
However, with recent patch to support UAC3 configuration,
second configuration was unintentionally chosen for
some of the UAC1/2 devices that had more than one
configuration. This was because of the existing check
after the audio config check which selected any config
which had a non-vendor class. This patch fixes this issue.
Fixes: f13912d (Select UAC3 configuration for audio if present)
Reported-by: Con Kolivas <[email protected]>
Signed-off-by: Saranya Gopal <[email protected]>
---
drivers/usb/core/generic.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 356b05c..f713cec 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -143,9 +143,12 @@ int usb_choose_configuration(struct usb_device *udev)
continue;
}
- if (i > 0 && desc && is_audio(desc) && is_uac3_config(desc)) {
- best = c;
- break;
+ if (i > 0 && desc && is_audio(desc)) {
+ if (is_uac3_config(desc)) {
+ best = c;
+ break;
+ }
+ continue;
}
/* From the remaining configs, choose the first one whose
--
1.9.1
Hi Con,
Thanks a lot for reporting the issue and also for taking your time to help me with lsusb output and dmesg logs.
I have sent a patch in another mail to fix this issue.
Could you help by checking if the patch fixes this issue for you?
Thanks,
Saranya
> -----Original Message-----
> From: Con Kolivas [mailto:[email protected]]
> Sent: Saturday, January 05, 2019 2:05 AM
> To: Gopal, Saranya <[email protected]>
> Cc: Pierre-Louis Bossart <[email protected]>; Takashi Iwai
> <[email protected]>; [email protected]; [email protected];
> linux-kernel <[email protected]>; [email protected]
> Subject: Re: [alsa-devel] ALSA:usb audio Higher sample rates on usb audio no
> longer working.
>
> Hi Saranya.
>
> On Sat, 5 Jan 2019 at 03:52, Gopal, Saranya <[email protected]> wrote:
>
> > And since I was not part of the initial mail thread, I might have missed some
> information.
> > Could someone give me lsusb -v output for this USB audio device.
>
> These outputs are with the UAC3 patch backed out:
>
> dmesg:
> [50384.859492] usb 2-1.8.4: new high-speed USB device number 26 using ehci-
> pci
> [50384.974496] usb 2-1.8.4: New USB device found, idVendor=19fb,
> idProduct=2040, bcdDevice= 2.00
> [50384.974500] usb 2-1.8.4: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [50384.974501] usb 2-1.8.4: Product: Anti-Mode X4
> [50384.974503] usb 2-1.8.4: Manufacturer: DSPeaker
>
> lsusb -v:
> Bus 002 Device 026: ID 19fb:2040
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.00
> bDeviceClass 239 Miscellaneous Device
> bDeviceSubClass 2 ?
> bDeviceProtocol 1 Interface Association
> bMaxPacketSize0 64
> idVendor 0x19fb
> idProduct 0x2040
> bcdDevice 2.00
> iManufacturer 1 DSPeaker
> iProduct 2 Anti-Mode X4
> iSerial 0
> bNumConfigurations 2
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 254
> bNumInterfaces 2
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0xc0
> Self Powered
> MaxPower 100mA
> Interface Association:
> bLength 8
> bDescriptorType 11
> bFirstInterface 0
> bInterfaceCount 2
> bFunctionClass 1 Audio
> bFunctionSubClass 0
> bFunctionProtocol 32
> iFunction 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 0
> bInterfaceClass 1 Audio
> bInterfaceSubClass 1 Control Device
> bInterfaceProtocol 32
> iInterface 0
> AudioControl Interface Descriptor:
> bLength 9
> bDescriptorType 36
> bDescriptorSubtype 1 (HEADER)
> bcdADC 2.00
> bCategory 10
> wTotalLength 60
> bmControl 0x00
> AudioControl Interface Descriptor:
> bLength 8
> bDescriptorType 36
> bDescriptorSubtype 10 (CLOCK_SOURCE)
> bClockID 41
> bmAttributes 0x03 Internal programmable Clock
> bmControls 0x07
> Clock Frequency Control (read/write)
> Clock Validity Control (read-only)
> bAssocTerminal 0
> iClockSource 0
> AudioControl Interface Descriptor:
> bLength 8
> bDescriptorType 36
> bDescriptorSubtype 11 (CLOCK_SELECTOR)
> bUnitID 40
> bNrInPins 1
> baCSourceID( 0) 41
> bmControls 0x00
> iClockSelector 0
> AudioControl Interface Descriptor:
> bLength 17
> bDescriptorType 36
> bDescriptorSubtype 2 (INPUT_TERMINAL)
> bTerminalID 1
> wTerminalType 0x0101 USB Streaming
> bAssocTerminal 0
> bCSourceID 40
> bNrChannels 2
> bmChannelConfig 0x00000000
> bmControls 0x0000
> iChannelNames 4 Analog 1
> iTerminal 0
> AudioControl Interface Descriptor:
> bLength 18
> bDescriptorType 36
> bDescriptorSubtype 6 (FEATURE_UNIT)
> bUnitID 3
> bSourceID 1
> bmaControls( 0) 0x0000000f
> Mute Control (read/write)
> Volume Control (read/write)
> bmaControls( 1) 0x00000000
> bmaControls( 2) 0x00000000
> iFeature 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 0
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 32
> iInterface 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 1
> bNumEndpoints 2
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 32
> iInterface 0
> AudioStreaming Interface Descriptor:
> bLength 16
> bDescriptorType 36
> bDescriptorSubtype 1 (AS_GENERAL)
> bTerminalLink 1
> bmControls 0x00
> bFormatType 1
> bmFormats 0x00000001
> PCM
> bNrChannels 2
> bmChannelConfig 0x00000000
> iChannelNames 0
> AudioStreaming Interface Descriptor:
> bLength 6
> bDescriptorType 36
> bDescriptorSubtype 2 (FORMAT_TYPE)
> bFormatType 1 (FORMAT_TYPE_I)
> bSubslotSize 3
> bBitResolution 24
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 5
> Transfer Type Isochronous
> Synch Type Asynchronous
> Usage Type Data
> wMaxPacketSize 0x010e 1x 270 bytes
> bInterval 1
> AudioControl Endpoint Descriptor:
> bLength 8
> bDescriptorType 37
> bDescriptorSubtype 1 (EP_GENERAL)
> bmAttributes 0x00
> bmControls 0x00
> bLockDelayUnits 2 Decoded PCM samples
> wLockDelay 8
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 17
> Transfer Type Isochronous
> Synch Type None
> Usage Type Feedback
> wMaxPacketSize 0x0004 1x 4 bytes
> bInterval 4
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 2
> bNumEndpoints 2
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 32
> iInterface 0
> AudioStreaming Interface Descriptor:
> bLength 16
> bDescriptorType 36
> bDescriptorSubtype 1 (AS_GENERAL)
> bTerminalLink 1
> bmControls 0x00
> bFormatType 1
> bmFormats 0x00000001
> PCM
> bNrChannels 2
> bmChannelConfig 0x00000000
> iChannelNames 0
> AudioStreaming Interface Descriptor:
> bLength 6
> bDescriptorType 36
> bDescriptorSubtype 2 (FORMAT_TYPE)
> bFormatType 1 (FORMAT_TYPE_I)
> bSubslotSize 2
> bBitResolution 16
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 5
> Transfer Type Isochronous
> Synch Type Asynchronous
> Usage Type Data
> wMaxPacketSize 0x010e 1x 270 bytes
> bInterval 1
> AudioControl Endpoint Descriptor:
> bLength 8
> bDescriptorType 37
> bDescriptorSubtype 1 (EP_GENERAL)
> bmAttributes 0x00
> bmControls 0x00
> bLockDelayUnits 2 Decoded PCM samples
> wLockDelay 8
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 17
> Transfer Type Isochronous
> Synch Type None
> Usage Type Feedback
> wMaxPacketSize 0x0004 1x 4 bytes
> bInterval 4
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 3
> bNumEndpoints 2
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 32
> iInterface 0
> AudioStreaming Interface Descriptor:
> bLength 16
> bDescriptorType 36
> bDescriptorSubtype 1 (AS_GENERAL)
> bTerminalLink 1
> bmControls 0x00
> bFormatType 1
> bmFormats 0x80000000
> bNrChannels 2
> bmChannelConfig 0x00000000
> iChannelNames 0
> AudioStreaming Interface Descriptor:
> bLength 6
> bDescriptorType 36
> bDescriptorSubtype 2 (FORMAT_TYPE)
> bFormatType 1 (FORMAT_TYPE_I)
> bSubslotSize 4
> bBitResolution 32
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 5
> Transfer Type Isochronous
> Synch Type Asynchronous
> Usage Type Data
> wMaxPacketSize 0x0190 1x 400 bytes
> bInterval 1
> AudioControl Endpoint Descriptor:
> bLength 8
> bDescriptorType 37
> bDescriptorSubtype 1 (EP_GENERAL)
> bmAttributes 0x00
> bmControls 0x00
> bLockDelayUnits 2 Decoded PCM samples
> wLockDelay 8
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 17
> Transfer Type Isochronous
> Synch Type None
> Usage Type Feedback
> wMaxPacketSize 0x0004 1x 4 bytes
> bInterval 4
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 186
> bNumInterfaces 2
> bConfigurationValue 2
> iConfiguration 0
> bmAttributes 0xc0
> Self Powered
> MaxPower 100mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 0
> bInterfaceClass 1 Audio
> bInterfaceSubClass 1 Control Device
> bInterfaceProtocol 0
> iInterface 0
> AudioControl Interface Descriptor:
> bLength 9
> bDescriptorType 36
> bDescriptorSubtype 1 (HEADER)
> bcdADC 1.00
> wTotalLength 43
> bInCollection 1
> baInterfaceNr( 0) 1
> AudioControl Interface Descriptor:
> bLength 12
> bDescriptorType 36
> bDescriptorSubtype 2 (INPUT_TERMINAL)
> bTerminalID 1
> wTerminalType 0x0101 USB Streaming
> bAssocTerminal 0
> bNrChannels 2
> wChannelConfig 0x0003
> Left Front (L)
> Right Front (R)
> iChannelNames 0
> iTerminal 0
> AudioControl Interface Descriptor:
> bLength 13
> bDescriptorType 36
> bDescriptorSubtype 6 (FEATURE_UNIT)
> bUnitID 3
> bSourceID 1
> bControlSize 2
> bmaControls( 0) 0x03
> bmaControls( 0) 0x00
> Mute Control
> Volume Control
> bmaControls( 1) 0x00
> bmaControls( 1) 0x00
> bmaControls( 2) 0x00
> bmaControls( 2) 0x00
> iFeature 0
> AudioControl Interface Descriptor:
> bLength 9
> bDescriptorType 36
> bDescriptorSubtype 3 (OUTPUT_TERMINAL)
> bTerminalID 2
> wTerminalType 0x0305 Room Speaker
> bAssocTerminal 0
> bSourceID 3
> iTerminal 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 0
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 0
> iInterface 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 1
> bNumEndpoints 2
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 0
> iInterface 0
> AudioStreaming Interface Descriptor:
> bLength 7
> bDescriptorType 36
> bDescriptorSubtype 1 (AS_GENERAL)
> bTerminalLink 1
> bDelay 3 frames
> wFormatTag 1 PCM
> AudioStreaming Interface Descriptor:
> bLength 17
> bDescriptorType 36
> bDescriptorSubtype 2 (FORMAT_TYPE)
> bFormatType 1 (FORMAT_TYPE_I)
> bNrChannels 2
> bSubframeSize 3
> bBitResolution 24
> bSamFreqType 3 Discrete
> tSamFreq[ 0] 44100
> tSamFreq[ 1] 48000
> tSamFreq[ 2] 96000
> Endpoint Descriptor:
> bLength 9
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 5
> Transfer Type Isochronous
> Synch Type Asynchronous
> Usage Type Data
> wMaxPacketSize 0x0258 1x 600 bytes
> bInterval 4
> bRefresh 0
> bSynchAddress 129
> AudioControl Endpoint Descriptor:
> bLength 7
> bDescriptorType 37
> bDescriptorSubtype 1 (EP_GENERAL)
> bmAttributes 0x01
> Sampling Frequency
> bLockDelayUnits 2 Decoded PCM samples
> wLockDelay 0 Decoded PCM samples
> Endpoint Descriptor:
> bLength 9
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 17
> Transfer Type Isochronous
> Synch Type None
> Usage Type Feedback
> wMaxPacketSize 0x0003 1x 3 bytes
> bInterval 4
> bRefresh 4
> bSynchAddress 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 2
> bNumEndpoints 2
> bInterfaceClass 1 Audio
> bInterfaceSubClass 2 Streaming
> bInterfaceProtocol 0
> iInterface 0
> AudioStreaming Interface Descriptor:
> bLength 7
> bDescriptorType 36
> bDescriptorSubtype 1 (AS_GENERAL)
> bTerminalLink 1
> bDelay 3 frames
> wFormatTag 1 PCM
> AudioStreaming Interface Descriptor:
> bLength 17
> bDescriptorType 36
> bDescriptorSubtype 2 (FORMAT_TYPE)
> bFormatType 1 (FORMAT_TYPE_I)
> bNrChannels 2
> bSubframeSize 2
> bBitResolution 16
> bSamFreqType 3 Discrete
> tSamFreq[ 0] 44100
> tSamFreq[ 1] 48000
> tSamFreq[ 2] 96000
> Endpoint Descriptor:
> bLength 9
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 5
> Transfer Type Isochronous
> Synch Type Asynchronous
> Usage Type Data
> wMaxPacketSize 0x0258 1x 600 bytes
> bInterval 4
> bRefresh 0
> bSynchAddress 129
> AudioControl Endpoint Descriptor:
> bLength 7
> bDescriptorType 37
> bDescriptorSubtype 1 (EP_GENERAL)
> bmAttributes 0x01
> Sampling Frequency
> bLockDelayUnits 2 Decoded PCM samples
> wLockDelay 0 Decoded PCM samples
> Endpoint Descriptor:
> bLength 9
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 17
> Transfer Type Isochronous
> Synch Type None
> Usage Type Feedback
> wMaxPacketSize 0x0003 1x 3 bytes
> bInterval 4
> bRefresh 4
> bSynchAddress 0
> Device Qualifier (for other device speed):
> bLength 10
> bDescriptorType 6
> bcdUSB 2.00
> bDeviceClass 239 Miscellaneous Device
> bDeviceSubClass 2 ?
> bDeviceProtocol 1 Interface Association
> bMaxPacketSize0 64
> bNumConfigurations 2
> Device Status: 0x0000
> (Bus Powered)
>
> >
> > Thanks,
> > Saranya
>
> Regards,
> Con
On Sat, Jan 05, 2019 at 07:32:37PM +0530, [email protected] wrote:
> From: Saranya Gopal <[email protected]>
>
> In most of the UAC1 and UAC2 audio devices, the first
> configuration is most often the best configuration.
> However, with recent patch to support UAC3 configuration,
> second configuration was unintentionally chosen for
> some of the UAC1/2 devices that had more than one
> configuration. This was because of the existing check
> after the audio config check which selected any config
> which had a non-vendor class. This patch fixes this issue.
>
> Fixes: f13912d (Select UAC3 configuration for audio if present)
That should read:
Fixes: f13912d3f014 ("usbcore: Select UAC3 configuration for audio if present")
Please use the full commit name and more sha1 numbers :)
thanks,
greg k-h
From: Saranya Gopal <[email protected]>
In most of the UAC1 and UAC2 audio devices, the first
configuration is most often the best configuration.
However, with recent patch to support UAC3 configuration,
second configuration was unintentionally chosen for
some of the UAC1/2 devices that had more than one
configuration. This was because of the existing check
after the audio config check which selected any config
which had a non-vendor class. This patch fixes this issue.
Fixes: f13912d3f014 ("usbcore: Select UAC3 configuration for audio if present")
Reported-by: Con Kolivas <[email protected]>
Signed-off-by: Saranya Gopal <[email protected]>
---
Changes from V1: Added full commit name and more SHA1 numbers in Fixes tag
drivers/usb/core/generic.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 356b05c..f713cec 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -143,9 +143,12 @@ int usb_choose_configuration(struct usb_device *udev)
continue;
}
- if (i > 0 && desc && is_audio(desc) && is_uac3_config(desc)) {
- best = c;
- break;
+ if (i > 0 && desc && is_audio(desc)) {
+ if (is_uac3_config(desc)) {
+ best = c;
+ break;
+ }
+ continue;
}
/* From the remaining configs, choose the first one whose
--
1.9.1
Hi Saranya
On Sun, 6 Jan 2019 at 04:41, <[email protected]> wrote:
>
> From: Saranya Gopal <[email protected]>
>
> In most of the UAC1 and UAC2 audio devices, the first
> configuration is most often the best configuration.
> However, with recent patch to support UAC3 configuration,
> second configuration was unintentionally chosen for
> some of the UAC1/2 devices that had more than one
> configuration. This was because of the existing check
> after the audio config check which selected any config
> which had a non-vendor class. This patch fixes this issue.
>
> Fixes: f13912d3f014 ("usbcore: Select UAC3 configuration for audio if present")
> Reported-by: Con Kolivas <[email protected]>
> Signed-off-by: Saranya Gopal <[email protected]>>
I can confirm the above patch fixes my problem.
Tested-by: Con Kolivas <[email protected]>
Thanks!
Con
From: Saranya Gopal <[email protected]>
In most of the UAC1 and UAC2 audio devices, the first
configuration is most often the best configuration.
However, with recent patch to support UAC3 configuration,
second configuration was unintentionally chosen for
some of the UAC1/2 devices that had more than one
configuration. This was because of the existing check
after the audio config check which selected any config
which had a non-vendor class. This patch fixes this issue.
Fixes: f13912d3f014 ("usbcore: Select UAC3 configuration for audio if present")
Reported-by: Con Kolivas <[email protected]>
Signed-off-by: Saranya Gopal <[email protected]>
Tested-by: Con Kolivas <[email protected]>
---
Changes from V2: Added Tested-by tag
Changes from V1: Added full commit name and more SHA1 numbers in Fixes tag
drivers/usb/core/generic.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 356b05c..f713cec 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -143,9 +143,12 @@ int usb_choose_configuration(struct usb_device *udev)
continue;
}
- if (i > 0 && desc && is_audio(desc) && is_uac3_config(desc)) {
- best = c;
- break;
+ if (i > 0 && desc && is_audio(desc)) {
+ if (is_uac3_config(desc)) {
+ best = c;
+ break;
+ }
+ continue;
}
/* From the remaining configs, choose the first one whose
--
1.9.1