All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add native DSD support for XMOS based DACs.
@ 2014-09-05  8:49 Jurgen Kramer
  2014-09-05  9:36 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Jurgen Kramer @ 2014-09-05  8:49 UTC (permalink / raw)
  To: alsa-devel; +Cc: Jurgen Kramer

Add quirk for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample
format. Works for all DAC vendors which use XMOS as idVendor. E.g. iFi Audio
with their micro iDSD and nano iDSD.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
---
 sound/usb/quirks.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 19a921e..e0efffb 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1174,5 +1174,15 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
 		}
 	}
 
+	/* XMOS based DACs, e.g. iFi Audio micro/nano iDSD */
+	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
+		switch (fp->altsetting) {
+		case 2:
+			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
+		default:
+			return 0;
+		}
+	}
+
 	return 0;
 }
-- 
1.9.3

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

* Re: [PATCH] add native DSD support for XMOS based DACs.
  2014-09-05  8:49 [PATCH] add native DSD support for XMOS based DACs Jurgen Kramer
@ 2014-09-05  9:36 ` Clemens Ladisch
  2014-09-05  9:53   ` Jurgen Kramer
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2014-09-05  9:36 UTC (permalink / raw)
  To: Jurgen Kramer, alsa-devel

Jurgen Kramer wrote:
> Add quirk for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample
> format. Works for all DAC vendors which use XMOS as idVendor. E.g. iFi Audio
> with their micro iDSD and nano iDSD.
>
> +++ b/sound/usb/quirks.c
> +	/* XMOS based DACs, e.g. iFi Audio micro/nano iDSD */
> +	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
> +		switch (fp->altsetting) {
> +		case 2:
> +			return SNDRV_PCM_FMTBIT_DSD_U32_LE;

Can you confirm that all XMOS devices ever built will have DSD on that
alternate setting?


Regards,
Clemens

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

* Re: [PATCH] add native DSD support for XMOS based DACs.
  2014-09-05  9:36 ` Clemens Ladisch
@ 2014-09-05  9:53   ` Jurgen Kramer
  2014-09-05 10:29     ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Jurgen Kramer @ 2014-09-05  9:53 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

On Fri, 2014-09-05 at 11:36 +0200, Clemens Ladisch wrote:
> Jurgen Kramer wrote:
> > Add quirk for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample
> > format. Works for all DAC vendors which use XMOS as idVendor. E.g. iFi Audio
> > with their micro iDSD and nano iDSD.
> >
> > +++ b/sound/usb/quirks.c
> > +	/* XMOS based DACs, e.g. iFi Audio micro/nano iDSD */
> > +	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
> > +		switch (fp->altsetting) {
> > +		case 2:
> > +			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
> 
> Can you confirm that all XMOS devices ever built will have DSD on that
> alternate setting?
No, I can not. Most newer implementations will use alt setting 2 for native DSD support.
My first version also used idProduct to only target iFi devices. If this is required, I'll rework my patch. 

Regards,
Jurgen

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

* Re: [PATCH] add native DSD support for XMOS based DACs.
  2014-09-05  9:53   ` Jurgen Kramer
@ 2014-09-05 10:29     ` Clemens Ladisch
  2014-09-05 11:01       ` Jurgen Kramer
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2014-09-05 10:29 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: alsa-devel

Jurgen Kramer wrote:
> On Fri, 2014-09-05 at 11:36 +0200, Clemens Ladisch wrote:
>> Jurgen Kramer wrote:
>>> Add quirk for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample
>>> format. Works for all DAC vendors which use XMOS as idVendor. E.g. iFi Audio
>>> with their micro iDSD and nano iDSD.
>>>
>>> +++ b/sound/usb/quirks.c
>>> +	/* XMOS based DACs, e.g. iFi Audio micro/nano iDSD */
>>> +	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
>>> +		switch (fp->altsetting) {
>>> +		case 2:
>>> +			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
>>
>> Can you confirm that all XMOS devices ever built will have DSD on that
>> alternate setting?
>
> No, I can not. Most newer implementations will use alt setting 2 for
> native DSD support.

But it's possible to have other XMOS-based devices that use multiple
alternate settings for PCM.

> My first version also used idProduct to only target iFi devices. If
> this is required, I'll rework my patch.

I guess there isn't any property of the descriptors to distinguish DoP
from PCM?  How does the generic Windows driver know which alternate
settings are DoP?


Regards,
Clemens

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

* Re: [PATCH] add native DSD support for XMOS based DACs.
  2014-09-05 10:29     ` Clemens Ladisch
@ 2014-09-05 11:01       ` Jurgen Kramer
  0 siblings, 0 replies; 5+ messages in thread
From: Jurgen Kramer @ 2014-09-05 11:01 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

On Fri, 2014-09-05 at 12:29 +0200, Clemens Ladisch wrote:
> Jurgen Kramer wrote:
> > On Fri, 2014-09-05 at 11:36 +0200, Clemens Ladisch wrote:
> >> Jurgen Kramer wrote:
> >>> Add quirk for XMOS based DACs for native DSD playback support using the new DSD_U32_LE sample
> >>> format. Works for all DAC vendors which use XMOS as idVendor. E.g. iFi Audio
> >>> with their micro iDSD and nano iDSD.
> >>>
> >>> +++ b/sound/usb/quirks.c
> >>> +	/* XMOS based DACs, e.g. iFi Audio micro/nano iDSD */
> >>> +	if (le16_to_cpu(chip->dev->descriptor.idVendor) == 0x20b1) {
> >>> +		switch (fp->altsetting) {
> >>> +		case 2:
> >>> +			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
> >>
> >> Can you confirm that all XMOS devices ever built will have DSD on that
> >> alternate setting?
> >
> > No, I can not. Most newer implementations will use alt setting 2 for
> > native DSD support.
> 
> But it's possible to have other XMOS-based devices that use multiple
> alternate settings for PCM.
Correct. So it will be better to make the quirks vendor/device specific.
Downside being that each device has be added. I'll rework my patch.

> 
> > My first version also used idProduct to only target iFi devices. If
> > this is required, I'll rework my patch.
> 
> I guess there isn't any property of the descriptors to distinguish DoP
> from PCM?  How does the generic Windows driver know which alternate
> settings are DoP?
Indeed. Unfortunately DoP support is not exposed in any way. That is why
the quirks mechanism was added to the kernel.
Windows still does not support UAC2 out of the box. For XMOS based
devices support comes through the commercial Thesycon driver. Each
vendor uses a tailored version specific for their devices.

Native DSD support on Windows works through Steinbergs ASIO 2.1/2.2
driver. This has to be supported by the Windows UAC2 driver.

Regards,
Jurgen

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

end of thread, other threads:[~2014-09-05 11:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05  8:49 [PATCH] add native DSD support for XMOS based DACs Jurgen Kramer
2014-09-05  9:36 ` Clemens Ladisch
2014-09-05  9:53   ` Jurgen Kramer
2014-09-05 10:29     ` Clemens Ladisch
2014-09-05 11:01       ` Jurgen Kramer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.