[alsa-devel] [PATCH] sound/usb: Add Opus #3 to quirks for native DSD support
From: Olek Poplavsky woodenbits@gmail.com This patch adds quirk VID/PID IDs for the Opus #3 DAP (made by 'The Bit') in order to enable Native DSD support.
Signed-off-by: Olek Poplavsky woodenbits@gmail.com --- sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index ebbadb3a7094..9ac6309f7a73 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1495,6 +1495,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, case USB_ID(0x152a, 0x85de): /* SMSL D1 DAC */ case USB_ID(0x16d0, 0x09dd): /* Encore mDSD */ case USB_ID(0x0d8c, 0x0316): /* Hegel HD12 DSD */ + case USB_ID(0x10cb, 0x0103): /* The Bit Opus #3*/ case USB_ID(0x16b0, 0x06b2): /* NuPrime DAC-10 */ case USB_ID(0x16d0, 0x0733): /* Furutech ADL Stratos */ case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */
On Fri, 25 Jan 2019 05:30:03 +0100, Olek Poplavsky wrote:
From: Olek Poplavsky woodenbits@gmail.com This patch adds quirk VID/PID IDs for the Opus #3 DAP (made by 'The Bit') in order to enable Native DSD support.
Signed-off-by: Olek Poplavsky woodenbits@gmail.com
Could you give lsusb -v output?
I wonder whether we can deal with the generic fallback, e.g. by a patch like below instead.
thanks,
Takashi
--- --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1566,6 +1566,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, case 0x20b1: /* XMOS based devices */ case 0x152a: /* Thesycon devices */ case 0x25ce: /* Mytek devices */ + case 0x10cb: /* The Bit */ if (fp->dsd_raw) return SNDRV_PCM_FMTBIT_DSD_U32_BE; break;
Thank you for your response, Takashi!
Yes, the patch you are suggesting will work as well, it was actually the first patch I tried. Both ways I was able to use native DSD capability of my DAP/DAC. The reason I went with more 'targeted' patch is that I am not sure if 0x10cb is describing a family of similar devices, like 0x20b1 describes XMOS. In cases like this I prefer to err on the side of caution, and generalize only when there are two or three cases known to be in the same family.
Here is the verbose dump that you requested:
Bus 001 Device 043: ID 10cb:0103 Eratech Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x10cb Eratech idProduct 0x0103 bcdDevice 1.00 iManufacturer 1 THEBIT iProduct 3 HA-530 USB Audio 2.0 iSerial 0 bNumConfigurations 2 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 284 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA 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 3 HA-530 USB Audio 2.0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 2.00 bCategory 8 wTotalLength 72 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 9 THEBIT Internal Clock AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 11 (CLOCK_SELECTOR) bUnitID 40 bNrInPins 1 baCSourceID( 0) 41 bmControls 0x03 Clock Selector Control (read/write) iClockSelector 13 iAP Interface AudioControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bCSourceID 40 bNrChannels 2 bmChannelConfig 0x00000000 bmControls 0x0000 iChannelNames 11 Analogue 1/SPDIF 1 iTerminal 6 HA-530 USB Audio 2.0 Output AudioControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 10 bSourceID 2 bmaControls( 0) 0x0000000f Mute Control (read/write) Volume Control (read/write) bmaControls( 1) 0x0000000f Mute Control (read/write) Volume Control (read/write) bmaControls( 2) 0x0000000f Mute Control (read/write) Volume Control (read/write) iFeature 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 20 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 10 bCSourceID 40 bmControls 0x0000 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 4 HA-530 USB Audio 2.0 Output Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 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 0x0188 1x 392 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 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 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 0x00c4 1x 196 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 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x80000000 bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 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 0x0188 1x 392 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 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 254 Application Specific Interface bInterfaceSubClass 1 Device Firmware Update bInterfaceProtocol 1 iInterface 10 THEBIT DFU Device Firmware Upgrade Interface Descriptor: bLength 9 bDescriptorType 33 bmAttributes 7 Will Not Detach Manifestation Tolerant Upload Supported Download Supported wDetachTimeout 250 milliseconds wTransferSize 64 bytes bcdDFUVersion 1.10 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 284 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 0mA 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 3 HA-530 USB Audio 2.0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 2.00 bCategory 8 wTotalLength 72 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 9 THEBIT Internal Clock AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 11 (CLOCK_SELECTOR) bUnitID 40 bNrInPins 1 baCSourceID( 0) 41 bmControls 0x03 Clock Selector Control (read/write) iClockSelector 13 iAP Interface AudioControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bCSourceID 40 bNrChannels 2 bmChannelConfig 0x00000000 bmControls 0x0000 iChannelNames 11 Analogue 1/SPDIF 1 iTerminal 6 HA-530 USB Audio 2.0 Output AudioControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 10 bSourceID 2 bmaControls( 0) 0x0000000f Mute Control (read/write) Volume Control (read/write) bmaControls( 1) 0x0000000f Mute Control (read/write) Volume Control (read/write) bmaControls( 2) 0x0000000f Mute Control (read/write) Volume Control (read/write) iFeature 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 20 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 10 bCSourceID 40 bmControls 0x0000 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 4 HA-530 USB Audio 2.0 Output Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 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 0x0188 1x 392 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 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x00000001 PCM bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 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 0x00c4 1x 196 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 4 HA-530 USB Audio 2.0 Output AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 2 bmControls 0x00 bFormatType 1 bmFormats 0x80000000 bNrChannels 2 bmChannelConfig 0x00000000 iChannelNames 11 Analogue 1/SPDIF 1 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 0x0188 1x 392 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 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 254 Application Specific Interface bInterfaceSubClass 1 Device Firmware Update bInterfaceProtocol 1 iInterface 10 THEBIT DFU Device Firmware Upgrade Interface Descriptor: bLength 9 bDescriptorType 33 bmAttributes 7 Will Not Detach Manifestation Tolerant Upload Supported Download Supported wDetachTimeout 250 milliseconds wTransferSize 64 bytes bcdDFUVersion 1.10 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: 0x0001 Self Powered
On Fri, Jan 25, 2019 at 9:22 AM Takashi Iwai tiwai@suse.de wrote:
On Fri, 25 Jan 2019 05:30:03 +0100, Olek Poplavsky wrote:
From: Olek Poplavsky woodenbits@gmail.com This patch adds quirk VID/PID IDs for the Opus #3 DAP (made by 'The Bit') in order to enable Native DSD support.
Signed-off-by: Olek Poplavsky woodenbits@gmail.com
Could you give lsusb -v output?
I wonder whether we can deal with the generic fallback, e.g. by a patch like below instead.
thanks,
Takashi
--- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1566,6 +1566,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, case 0x20b1: /* XMOS based devices */ case 0x152a: /* Thesycon devices */ case 0x25ce: /* Mytek devices */
case 0x10cb: /* The Bit */ if (fp->dsd_raw) return SNDRV_PCM_FMTBIT_DSD_U32_BE; break;
On Fri, 25 Jan 2019 19:30:03 +0100, Olek Poplavsky wrote:
Thank you for your response, Takashi!
Yes, the patch you are suggesting will work as well, it was actually the first patch I tried. Both ways I was able to use native DSD capability of my DAP/DAC. The reason I went with more 'targeted' patch is that I am not sure if 0x10cb is describing a family of similar devices, like 0x20b1 describes XMOS. In cases like this I prefer to err on the side of caution, and generalize only when there are two or three cases known to be in the same family.
OK, 10cb seems to be Eratech, which doesn't match with the vendor of your actual device. It might be OK to put in the whitelist, but maybe at this time we can put to the explicit quirk entry.
But then we should mark it to be whitelist-able, in case we'd want to move to there.
I'll apply your patch with the update of the comment indicating it.
thanks,
Takashi
Sounds like a great plan, Takashi!
Yes, relationship between 'The Bit' and Eratech is very unclear... the best I was able to find by searching around is that head of R&D at 'The Bit' seems to have been CEO of Eratech in the past...
Thank you!
-- Olek
On Fri, Jan 25, 2019 at 1:40 PM Takashi Iwai tiwai@suse.de wrote:
On Fri, 25 Jan 2019 19:30:03 +0100, Olek Poplavsky wrote:
Thank you for your response, Takashi!
Yes, the patch you are suggesting will work as well, it was actually the first patch I tried. Both ways I was able to use native DSD capability of my DAP/DAC. The reason I went with more 'targeted' patch is that I am not sure if 0x10cb is describing a family of similar devices, like 0x20b1 describes XMOS. In cases like this I prefer to err on the side of caution, and generalize only when there are two or three cases known to be in the same family.
OK, 10cb seems to be Eratech, which doesn't match with the vendor of your actual device. It might be OK to put in the whitelist, but maybe at this time we can put to the explicit quirk entry.
But then we should mark it to be whitelist-able, in case we'd want to move to there.
I'll apply your patch with the update of the comment indicating it.
thanks,
Takashi
participants (2)
-
Olek Poplavsky
-
Takashi Iwai