linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
@ 2022-08-25 10:45 Lennert Van Alboom
  2022-08-25 10:58 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Lennert Van Alboom @ 2022-08-25 10:45 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: alsa-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 6298 bytes --]

Hi,


My USB DAC fails to work on recent kernels (anything past 5.10). The device is the following:

Bus 003 Device 005: ID 2522:0007 LH Labs Geek Out HD Audio 1V5



Syslog shows error messages which have changed over the different kernel versions - this is the output from debian's 5.17.0-2-amd64:

[66136.185642] usb 3-6: uac_clock_source_is_valid(): cannot get clock validity for id 41
[66136.185643] usb 3-6: clock source 41 is not valid, cannot use
[66136.185956] usb 3-6: 1:0: usb_set_interface failed (-71)
[66136.186183] usb 3-6: 1:0: usb_set_interface failed (-71)


From the first point in git where it fails (5.10.0-rc5-00025-gbf6313a0ff76):

Aug 25 12:39:37 Nesbitt kernel: [ 5295.633079] usb 3-3: new high-speed USB device number 8 using xhci_hcd
Aug 25 12:39:37 Nesbitt kernel: [ 5295.782144] usb 3-3: New USB device found, idVendor=2522, idProduct=0007, bcdDevice=15.02
Aug 25 12:39:37 Nesbitt kernel: [ 5295.782148] usb 3-3: New USB device strings: Mfr=1, Product=3, SerialNumber=0
Aug 25 12:39:37 Nesbitt kernel: [ 5295.782150] usb 3-3: Product: Geek Out HD Audio 1V5
Aug 25 12:39:37 Nesbitt kernel: [ 5295.782151] usb 3-3: Manufacturer: LH Labs
Aug 25 12:39:37 Nesbitt kernel: [ 5296.162338] usb 3-3: 1:2 : unsupported format bits 0x100000000
Aug 25 12:39:38 Nesbitt mtp-probe: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
Aug 25 12:39:38 Nesbitt mtp-probe: bus: 3, device: 8 was not an MTP device
Aug 25 12:39:38 Nesbitt systemd-udevd[10311]: controlC1: Process '/usr/sbin/alsactl -E HOME=/run/alsa -E XDG_RUNTIME_DIR=/run/alsa/runtime restore 1' failed with exit code 99.
Aug 25 12:39:38 Nesbitt mtp-probe: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
Aug 25 12:39:38 Nesbitt mtp-probe: bus: 3, device: 8 was not an MTP device
Aug 25 12:39:43 Nesbitt kernel: [ 5301.921810] usb 3-3: 1:1: usb_set_interface failed (-110)
Aug 25 12:39:43 Nesbitt kernel: [ 5301.922047] usb 3-3: 1:0: usb_set_interface failed (-71)
Aug 25 12:39:43 Nesbitt kernel: [ 5301.922354] usb 3-3: 1:0: usb_set_interface failed (-71)
Aug 25 12:39:43 Nesbitt kernel: [ 5301.922915] usb 3-3: 1:0: usb_set_interface failed (-71)


I did a git bisect (from kernel source, not on debian-specific) and the offending commit has been found:

# git bisect bad
bf6313a0ff766925462e97b4e733d5952de02367 is the first bad commit
commit bf6313a0ff766925462e97b4e733d5952de02367
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Nov 23 09:53:31 2020 +0100

    ALSA: usb-audio: Refactor endpoint management
    

    This is an intensive surgery for the endpoint and stream management
    for achieving more robust and clean code.
    

    The goals of this patch are:
    - More clear endpoint resource changes
    - The interface altsetting control in a single place
    Below are brief description of the whole changes.
    

    First off, most of the endpoint operations are moved into endpoint.c,
    so that the snd_usb_endpoint object is only referred in other places.
    The endpoint object is acquired and released via the new functions
    snd_usb_endpoint_open() and snd_usb_endpoint_close() that are called
    at PCM hw_params and hw_free callbacks, respectively.  Those are
    ref-counted and EPs can manage the multiple opens.
    

    The open callback receives the audioformat and hw_params arguments,
    and those are used for initializing the EP parameters; especially the
    endpoint, interface and altset numbers are read from there, as well as
    the PCM parameters like the format, rate and channels.  Those are
    stored in snd_usb_endpoint object.  If it's the secondary open, the
    function checks whether the given parameters are compatible with the
    already opened EP setup, too.
    

    The coupling with a sync EP (including an implicit feedback sync) is
    done by the sole snd_usb_endpoint_set_sync() call.
    

    The configuration of each endpoint is done in a single shot via
    snd_usb_endpoint_configure() call.  This is the place where most of
    PCM configurations are done.  A few flags and special handling in the
    snd_usb_substream are dropped along with this change.
    

    A significant difference wrt the configuration from the previous code
    is the order of USB host interface setups.  Now the interface is
    always disabled at beginning and (re-)enabled at the last step of
    snd_usb_endpoint_configure(), in order to be compliant with the
    standard UAC2/3.  For UAC1, the interface is set before the parameter
    setups since there seem devices that require it (e.g. Yamaha THR10),
    just like how it was done in the previous driver code.
    

    The start/stop are almost same as before, also single-shots.  The URB
    callbacks need to be set via snd_usb_endpoint_set_callback() like the
    previous code at the trigger phase, too.
    

    Finally, the flag for the re-setup is set at the device suspend
    through the full EP list, instead of PCM trigger.  This catches the
    overlooked cases where the PCM hasn't been running yet but the device
    needs the full setup after resume.
    

    Tested-by: Keith Milner <kamilner@superlative.org>
    Tested-by: Dylan Robinson <dylan_robinson@motu.com>
    Link: https://lore.kernel.org/r/20201123085347.19667-26-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

 sound/usb/card.c     |   8 +-
 sound/usb/card.h     |  11 +-
 sound/usb/clock.c    |  13 +-
 sound/usb/endpoint.c | 662 ++++++++++++++++++++++++++-------------------------
 sound/usb/endpoint.h |  40 ++--
 sound/usb/pcm.c      | 616 +++++++++++++++++++----------------------------
 6 files changed, 616 insertions(+), 734 deletions(-)


That's a lot of code though. I'd like to be able to use my DAC on kernels newer than 5.10 so any hints on how to debug and fix this would be greatly appreciated. After doing this 17-point bisect I absolutely don't mind building a few more to fix this.

For info, the debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011196 

For info, a related report from Arch linux for the same device vendor: https://bugs.archlinux.org/task/70636


Thanks,


Lennert

[-- Attachment #1.2: publickey - lennert@vanalboom.org - 0x0320C886.asc --]
[-- Type: application/pgp-keys, Size: 596 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-25 10:45 USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5) Lennert Van Alboom
@ 2022-08-25 10:58 ` Takashi Iwai
  2022-08-25 20:52   ` Lennert Van Alboom
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2022-08-25 10:58 UTC (permalink / raw)
  To: Lennert Van Alboom, Jaroslav Kysela, Takashi Iwai, alsa-devel,
	linux-kernel

On Thu, 25 Aug 2022 12:45:27 +0200,
Lennert Van Alboom wrote:
> 
> Hi,
> 
> 
> My USB DAC fails to work on recent kernels (anything past 5.10). The device is the following:
> 
> Bus 003 Device 005: ID 2522:0007 LH Labs Geek Out HD Audio 1V5
> 
> 
> 
> Syslog shows error messages which have changed over the different kernel versions - this is the output from debian's 5.17.0-2-amd64:
> 
> [66136.185642] usb 3-6: uac_clock_source_is_valid(): cannot get clock validity for id 41
> [66136.185643] usb 3-6: clock source 41 is not valid, cannot use
> [66136.185956] usb 3-6: 1:0: usb_set_interface failed (-71)
> [66136.186183] usb 3-6: 1:0: usb_set_interface failed (-71)
> 
> 
> >From the first point in git where it fails (5.10.0-rc5-00025-gbf6313a0ff76):
> 
> Aug 25 12:39:37 Nesbitt kernel: [ 5295.633079] usb 3-3: new high-speed USB device number 8 using xhci_hcd
> Aug 25 12:39:37 Nesbitt kernel: [ 5295.782144] usb 3-3: New USB device found, idVendor=2522, idProduct=0007, bcdDevice=15.02
> Aug 25 12:39:37 Nesbitt kernel: [ 5295.782148] usb 3-3: New USB device strings: Mfr=1, Product=3, SerialNumber=0
> Aug 25 12:39:37 Nesbitt kernel: [ 5295.782150] usb 3-3: Product: Geek Out HD Audio 1V5
> Aug 25 12:39:37 Nesbitt kernel: [ 5295.782151] usb 3-3: Manufacturer: LH Labs
> Aug 25 12:39:37 Nesbitt kernel: [ 5296.162338] usb 3-3: 1:2 : unsupported format bits 0x100000000
> Aug 25 12:39:38 Nesbitt mtp-probe: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
> Aug 25 12:39:38 Nesbitt mtp-probe: bus: 3, device: 8 was not an MTP device
> Aug 25 12:39:38 Nesbitt systemd-udevd[10311]: controlC1: Process '/usr/sbin/alsactl -E HOME=/run/alsa -E XDG_RUNTIME_DIR=/run/alsa/runtime restore 1' failed with exit code 99.
> Aug 25 12:39:38 Nesbitt mtp-probe: checking bus 3, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
> Aug 25 12:39:38 Nesbitt mtp-probe: bus: 3, device: 8 was not an MTP device
> Aug 25 12:39:43 Nesbitt kernel: [ 5301.921810] usb 3-3: 1:1: usb_set_interface failed (-110)
> Aug 25 12:39:43 Nesbitt kernel: [ 5301.922047] usb 3-3: 1:0: usb_set_interface failed (-71)
> Aug 25 12:39:43 Nesbitt kernel: [ 5301.922354] usb 3-3: 1:0: usb_set_interface failed (-71)
> Aug 25 12:39:43 Nesbitt kernel: [ 5301.922915] usb 3-3: 1:0: usb_set_interface failed (-71)
> 
> 
> I did a git bisect (from kernel source, not on debian-specific) and the offending commit has been found:
> 
> # git bisect bad
> bf6313a0ff766925462e97b4e733d5952de02367 is the first bad commit
> commit bf6313a0ff766925462e97b4e733d5952de02367
> Author: Takashi Iwai <tiwai@suse.de>
> Date:   Mon Nov 23 09:53:31 2020 +0100
> 
>     ALSA: usb-audio: Refactor endpoint management
>     
> 
>     This is an intensive surgery for the endpoint and stream management
>     for achieving more robust and clean code.
>     
> 
>     The goals of this patch are:
>     - More clear endpoint resource changes
>     - The interface altsetting control in a single place
>     Below are brief description of the whole changes.
>     
> 
>     First off, most of the endpoint operations are moved into endpoint.c,
>     so that the snd_usb_endpoint object is only referred in other places.
>     The endpoint object is acquired and released via the new functions
>     snd_usb_endpoint_open() and snd_usb_endpoint_close() that are called
>     at PCM hw_params and hw_free callbacks, respectively.  Those are
>     ref-counted and EPs can manage the multiple opens.
>     
> 
>     The open callback receives the audioformat and hw_params arguments,
>     and those are used for initializing the EP parameters; especially the
>     endpoint, interface and altset numbers are read from there, as well as
>     the PCM parameters like the format, rate and channels.  Those are
>     stored in snd_usb_endpoint object.  If it's the secondary open, the
>     function checks whether the given parameters are compatible with the
>     already opened EP setup, too.
>     
> 
>     The coupling with a sync EP (including an implicit feedback sync) is
>     done by the sole snd_usb_endpoint_set_sync() call.
>     
> 
>     The configuration of each endpoint is done in a single shot via
>     snd_usb_endpoint_configure() call.  This is the place where most of
>     PCM configurations are done.  A few flags and special handling in the
>     snd_usb_substream are dropped along with this change.
>     
> 
>     A significant difference wrt the configuration from the previous code
>     is the order of USB host interface setups.  Now the interface is
>     always disabled at beginning and (re-)enabled at the last step of
>     snd_usb_endpoint_configure(), in order to be compliant with the
>     standard UAC2/3.  For UAC1, the interface is set before the parameter
>     setups since there seem devices that require it (e.g. Yamaha THR10),
>     just like how it was done in the previous driver code.
>     
> 
>     The start/stop are almost same as before, also single-shots.  The URB
>     callbacks need to be set via snd_usb_endpoint_set_callback() like the
>     previous code at the trigger phase, too.
>     
> 
>     Finally, the flag for the re-setup is set at the device suspend
>     through the full EP list, instead of PCM trigger.  This catches the
>     overlooked cases where the PCM hasn't been running yet but the device
>     needs the full setup after resume.
>     
> 
>     Tested-by: Keith Milner <kamilner@superlative.org>
>     Tested-by: Dylan Robinson <dylan_robinson@motu.com>
>     Link: https://lore.kernel.org/r/20201123085347.19667-26-tiwai@suse.de
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> 
>  sound/usb/card.c     |   8 +-
>  sound/usb/card.h     |  11 +-
>  sound/usb/clock.c    |  13 +-
>  sound/usb/endpoint.c | 662 ++++++++++++++++++++++++++-------------------------
>  sound/usb/endpoint.h |  40 ++--
>  sound/usb/pcm.c      | 616 +++++++++++++++++++----------------------------
>  6 files changed, 616 insertions(+), 734 deletions(-)
> 
> 
> That's a lot of code though. I'd like to be able to use my DAC on kernels newer than 5.10 so any hints on how to debug and fix this would be greatly appreciated. After doing this 17-point bisect I absolutely don't mind building a few more to fix this.
> 
> For info, the debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011196 
> 
> For info, a related report from Arch linux for the same device vendor: https://bugs.archlinux.org/task/70636

There are lots of workarounds for the buggy USB audio firmware, and
the latest kernel allows to enable the quirks via quirk_flags module
option of snd-usb-audio driver.  See
Documentation/sound/alsa-configuration.rst.
You can try the bit 16 at first, for example.


Takashi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-25 10:58 ` Takashi Iwai
@ 2022-08-25 20:52   ` Lennert Van Alboom
  2022-08-26  6:05     ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Lennert Van Alboom @ 2022-08-25 20:52 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1202 bytes --]

------- Original Message -------
On Thursday, August 25th, 2022 at 12:58, Takashi Iwai <tiwai@suse.de> wrote:
> 

> There are lots of workarounds for the buggy USB audio firmware, and
> the latest kernel allows to enable the quirks via quirk_flags module
> option of snd-usb-audio driver. See
> Documentation/sound/alsa-configuration.rst.
> You can try the bit 16 at first, for example.
> 

> 

> Takashi


Thanks. I tried fiddling around with it for a bit but so far limited success. I wasn't sure about the arguments or counting order of quirk_flags (some tidbits show it as hex, others as an array of booleans (?)) so tried a few different things. I have no other USB audio devices so didn't see a need to specify vendor or product ID while testing. 


# modprobe snd_usb_audio quirk_flags=0x10000
# modprobe snd_usb_audio quirk_flags=0x1
# modprobe snd_usb_audio quirk_flags=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1

No success with any, so far. Is there a way to make the process more verbose? I can see from the lights on the DAC that the initialisation works differently if I mess with the different quirks but that's not visible in syslog or outcome.


Thanks,


Lennert

[-- Attachment #1.2: publickey - lennert@vanalboom.org - 0x0320C886.asc --]
[-- Type: application/pgp-keys, Size: 596 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-25 20:52   ` Lennert Van Alboom
@ 2022-08-26  6:05     ` Takashi Iwai
  2022-08-26  9:07       ` [PATCH] " Lennert Van Alboom
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2022-08-26  6:05 UTC (permalink / raw)
  To: Lennert Van Alboom
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel

On Thu, 25 Aug 2022 22:52:02 +0200,
Lennert Van Alboom wrote:
> 
> ------- Original Message -------
> On Thursday, August 25th, 2022 at 12:58, Takashi Iwai <tiwai@suse.de> wrote:
> > 
> 
> > There are lots of workarounds for the buggy USB audio firmware, and
> > the latest kernel allows to enable the quirks via quirk_flags module
> > option of snd-usb-audio driver. See
> > Documentation/sound/alsa-configuration.rst.
> > You can try the bit 16 at first, for example.
> > 
> 
> > 
> 
> > Takashi
> 
> 
> Thanks. I tried fiddling around with it for a bit but so far limited success. I wasn't sure about the arguments or counting order of quirk_flags (some tidbits show it as hex, others as an array of booleans (?)) so tried a few different things. I have no other USB audio devices so didn't see a need to specify vendor or product ID while testing. 
> 
> 
> # modprobe snd_usb_audio quirk_flags=0x10000
> # modprobe snd_usb_audio quirk_flags=0x1
> # modprobe snd_usb_audio quirk_flags=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
> 
> No success with any, so far. Is there a way to make the process more verbose? I can see from the lights on the DAC that the initialisation works differently if I mess with the different quirks but that's not visible in syslog or outcome.

This option is passed per card instance, as the driver may hold
multiple cards.  Check your /proc/asound/cards.  The first argument of
quirk_flags is applied to the first USB-audio card, the second to the
second USB audio device, and so on.

At best, give alsa-info.sh output before and after applying the
quirk.  Run the script with --no-upload option and attach the
outputs.

And, as a reference, you can see the existing quirk tables in
sound/usb/quirks.c.


Takashi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-26  6:05     ` Takashi Iwai
@ 2022-08-26  9:07       ` Lennert Van Alboom
  2022-08-26 15:20         ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Lennert Van Alboom @ 2022-08-26  9:07 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel, ls.yoyo.m


[-- Attachment #1.1: Type: text/plain, Size: 1454 bytes --]

------- Original Message -------
On Friday, August 26th, 2022 at 08:05, Takashi Iwai <tiwai@suse.de> wrote:
> 

> This option is passed per card instance, as the driver may hold
> multiple cards. Check your /proc/asound/cards. The first argument of
> quirk_flags is applied to the first USB-audio card, the second to the
> second USB audio device, and so on.
> 

> At best, give alsa-info.sh output before and after applying the
> quirk. Run the script with --no-upload option and attach the
> outputs.
> 

> And, as a reference, you can see the existing quirk tables in
> sound/usb/quirks.c.
> 

> 

> Takashi


Not sure why it failed before (didn't look further then, so possibly PEBKAC) but as you suggested, this works now (tested on debian's 5.19 kernel):

# modprobe snd_usb_audio vid=0x2522 pid=0x0007 quirk_flags=0x10000


Confirmed that setting a quirk_alias also works: 


# grep -A 1 "0x054c, 0x0b8c" linux/sound/usb/quirks.c 

	DEVICE_FLG(0x054c, 0x0b8c, /* Sony WALKMAN NW-A45 DAC */
		   QUIRK_FLAG_SET_IFACE_FIRST),
# modprobe snd_usb_audio quirk_alias=25220007:054c0b8c


I've added a patch for quirks.c to make this default behaviour for this device. Looking at the Arch bug report at https://bugs.archlinux.org/task/70636, it's likely similar behaviour may be needed for pid=0009 (LH Labs Geek Pulse X 1V5) but I have no way of testing this. Added the reporter in CC.


Thanks,


Lennert


[-- Attachment #1.2: patch --]
[-- Type: application/octet-stream, Size: 504 bytes --]

--- linux/sound/usb/quirks.c.orig	2022-08-26 08:49:42.749240432 +0000
+++ linux/sound/usb/quirks.c	2022-08-26 08:49:34.017138042 +0000
@@ -1923,6 +1923,8 @@ static const struct usb_audio_quirk_flag
 		   QUIRK_FLAG_GENERIC_IMPLICIT_FB),
 	DEVICE_FLG(0x2b53, 0x0031, /* Fiero SC-01 (firmware v1.1.0) */
 		   QUIRK_FLAG_GENERIC_IMPLICIT_FB),
+	DEVICE_FLG(0x2522, 0x0007, /* LH Labs Geek Out HD Audio 1V5 */
+		   QUIRK_FLAG_SET_IFACE_FIRST),
 
 	/* Vendor matches */
 	VENDOR_FLG(0x045e, /* MS Lifecam */

[-- Attachment #1.3: publickey - lennert@vanalboom.org - 0x0320C886.asc --]
[-- Type: application/pgp-keys, Size: 596 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-26  9:07       ` [PATCH] " Lennert Van Alboom
@ 2022-08-26 15:20         ` Takashi Iwai
  2022-08-27 17:46           ` Lennert Van Alboom
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2022-08-26 15:20 UTC (permalink / raw)
  To: Lennert Van Alboom
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel, ls.yoyo.m

On Fri, 26 Aug 2022 11:07:55 +0200,
Lennert Van Alboom wrote:
> 
> ------- Original Message -------
> On Friday, August 26th, 2022 at 08:05, Takashi Iwai <tiwai@suse.de> wrote:
> > 
> 
> > This option is passed per card instance, as the driver may hold
> > multiple cards. Check your /proc/asound/cards. The first argument of
> > quirk_flags is applied to the first USB-audio card, the second to the
> > second USB audio device, and so on.
> > 
> 
> > At best, give alsa-info.sh output before and after applying the
> > quirk. Run the script with --no-upload option and attach the
> > outputs.
> > 
> 
> > And, as a reference, you can see the existing quirk tables in
> > sound/usb/quirks.c.
> > 
> 
> > 
> 
> > Takashi
> 
> 
> Not sure why it failed before (didn't look further then, so possibly PEBKAC) but as you suggested, this works now (tested on debian's 5.19 kernel):
> 
> # modprobe snd_usb_audio vid=0x2522 pid=0x0007 quirk_flags=0x10000
> 
> 
> Confirmed that setting a quirk_alias also works: 
> 
> 
> # grep -A 1 "0x054c, 0x0b8c" linux/sound/usb/quirks.c 
> 
> 	DEVICE_FLG(0x054c, 0x0b8c, /* Sony WALKMAN NW-A45 DAC */
> 		   QUIRK_FLAG_SET_IFACE_FIRST),
> # modprobe snd_usb_audio quirk_alias=25220007:054c0b8c
> 
> 
> I've added a patch for quirks.c to make this default behaviour for
> this device.

Good to hear.  Will you submit the fix patch for the merge, or shall I
do it in my side?

> Looking at the Arch bug report at https://bugs.archlinux.org/task/70636, it's likely similar behaviour may be needed for pid=0009 (LH Labs Geek Pulse X 1V5) but I have no way of testing this. Added the reporter in CC.

It's likely OK to apply the same quirk, but it's certainly safer to
hear the test result, of course.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5)
  2022-08-26 15:20         ` Takashi Iwai
@ 2022-08-27 17:46           ` Lennert Van Alboom
  0 siblings, 0 replies; 7+ messages in thread
From: Lennert Van Alboom @ 2022-08-27 17:46 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel, ls.yoyo.m


[-- Attachment #1.1: Type: text/plain, Size: 309 bytes --]


------- Original Message -------
On Friday, August 26th, 2022 at 17:20, Takashi Iwai <tiwai@suse.de> wrote:

> Good to hear. Will you submit the fix patch for the merge, or shall I
> do it in my side?

If you could do it I'd be most grateful - my git-fu is painfully weak. 



Thanks!


Lennert

[-- Attachment #1.2: publickey - lennert@vanalboom.org - 0x0320C886.asc --]
[-- Type: application/pgp-keys, Size: 596 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-27 17:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 10:45 USB DAC broken since commit bf6313a0ff766925462e97b4e733d5952de02367 (5.10.0-rc5) Lennert Van Alboom
2022-08-25 10:58 ` Takashi Iwai
2022-08-25 20:52   ` Lennert Van Alboom
2022-08-26  6:05     ` Takashi Iwai
2022-08-26  9:07       ` [PATCH] " Lennert Van Alboom
2022-08-26 15:20         ` Takashi Iwai
2022-08-27 17:46           ` Lennert Van Alboom

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).