All of lore.kernel.org
 help / color / mirror / Atom feed
* Pioneer DJ DJM-900NXS2 support patches
@ 2020-04-29  9:56 Dmitry Panchenko | d-Systems
  2020-04-30 17:18 ` Takashi Iwai
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dmitry Panchenko | d-Systems @ 2020-04-29  9:56 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB 
interfaces. Both have a MIDI controller, 10 playback and 12 capture 
channels. Audio endpoints are vendor-specific and 3 files need to be 
patched. All playback and capture channels work fine with all supported 
sample rates (44.1k, 48k, 96k). Patches are attached.

--
Kind regards,
Dmitry Panchenko

d-Systems Ltd
Lai 6, Tartu 51005, Estonia
www.d-systems.ee

[-- Attachment #2: pcm.c.patch --]
[-- Type: text/x-patch, Size: 442 bytes --]

--- /tmp/linux-5.4.0/sound/usb/pcm.c	2020-04-29 11:56:36.000000000 +0300
+++ linux-5.4.0/sound/usb/pcm.c	2020-04-29 12:01:31.916954625 +0300
@@ -355,6 +355,10 @@
 	case USB_ID(0x0582, 0x01d8): /* BOSS Katana */
 		/* BOSS Katana amplifiers do not need quirks */
 		return 0;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		ep = 0x82;
+		ifnum = 0;
+		goto add_sync_ep_from_ifnum;
 	}
 
 	if (attr == USB_ENDPOINT_SYNC_ASYNC &&

[-- Attachment #3: quirks.c.patch --]
[-- Type: text/x-patch, Size: 1181 bytes --]

--- /tmp/linux-5.4.0/sound/usb/quirks.c	2020-04-29 11:56:36.000000000 +0300
+++ linux-5.4.0/sound/usb/quirks.c	2020-04-29 12:00:04.232521294 +0300
@@ -1414,6 +1414,29 @@
 	subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
 }
 
+
+/* 
+ * Pioneer DJ DJM-900NXS2
+ * Device needs to know the sample rate when substream is started
+ */
+static int pioneer_djm_set_format_quirk (struct snd_usb_substream *subs)
+{
+
+    /* Convert sample rate to little endian */
+	u8 sr[3];
+	sr[0] = subs->cur_rate&0xff;
+	sr[1] = (subs->cur_rate>>8)&0xff;
+	sr[2] = (subs->cur_rate>>16)&0xff;
+	
+	/* Configure device */
+	usb_set_interface(subs->stream->chip->dev, 0, 1);
+	snd_usb_ctl_msg(subs->stream->chip->dev,
+	    usb_rcvctrlpipe(subs->stream->chip->dev, 0),
+	    0x01, 0x22, 0x0100, 0x0082, &sr, 0x0003);
+
+	return 0;
+}
+
 void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
 			      struct audioformat *fmt)
 {
@@ -1424,6 +1447,8 @@
 	case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
 		set_format_emu_quirk(subs, fmt);
 		break;
+    case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+        pioneer_djm_set_format_quirk(subs);
 	}
 }
 

[-- Attachment #4: quirks-table.h.patch --]
[-- Type: text/x-patch, Size: 1856 bytes --]

--- /tmp/linux-5.4.0/sound/usb/quirks-table.h	2020-04-29 11:56:36.000000000 +0300
+++ linux-5.4.0/sound/usb/quirks-table.h	2020-04-29 11:58:22.921621970 +0300
@@ -3592,5 +3592,65 @@
 		}
 	}
 },
+{
+	/*
+	 * Pioneer DJ DJM-900NXS2
+	 * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 10,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x01,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC|
+					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
+				}
+			},
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 12,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x82,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC|
+					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) { 44100, 48000, 96000 }
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
 
 #undef USB_DEVICE_VENDOR_SPEC

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

* Re: Pioneer DJ DJM-900NXS2 support patches
  2020-04-29  9:56 Pioneer DJ DJM-900NXS2 support patches Dmitry Panchenko | d-Systems
@ 2020-04-30 17:18 ` Takashi Iwai
  2020-04-30 17:40 ` Alexander Tsoy
  2020-05-01 12:14 ` Dmitry Panchenko | d-Systems
  2 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-04-30 17:18 UTC (permalink / raw)
  To: Dmitry Panchenko | d-Systems; +Cc: alsa-devel

On Wed, 29 Apr 2020 11:56:37 +0200,
Dmitry Panchenko | d-Systems wrote:
> 
> Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB
> interfaces. Both have a MIDI controller, 10 playback and 12 capture
> channels. Audio endpoints are vendor-specific and 3 files need to be
> patched. All playback and capture channels work fine with all
> supported sample rates (44.1k, 48k, 96k). Patches are attached.

Thanks for the patch.
The code changes look good in general.

Some nitpicking:

> --- /tmp/linux-5.4.0/sound/usb/pcm.c	2020-04-29 11:56:36.000000000 +0300
> +++ linux-5.4.0/sound/usb/pcm.c	2020-04-29 12:01:31.916954625 +0300
> @@ -355,6 +355,10 @@
>  	case USB_ID(0x0582, 0x01d8): /* BOSS Katana */
>  		/* BOSS Katana amplifiers do not need quirks */
>  		return 0;
> +	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
> +		ep = 0x82;
> +		ifnum = 0;
> +		goto add_sync_ep_from_ifnum;

I'd put this entry before BOSS Katana, right after other
sync_ep_from_ifnum entries.

> --- /tmp/linux-5.4.0/sound/usb/quirks.c	2020-04-29 11:56:36.000000000 +0300
> +++ linux-5.4.0/sound/usb/quirks.c	2020-04-29 12:00:04.232521294 +0300
> @@ -1414,6 +1414,29 @@
>  	subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
>  }
>  
> +
> +/* 
> + * Pioneer DJ DJM-900NXS2
> + * Device needs to know the sample rate when substream is started
> + */
> +static int pioneer_djm_set_format_quirk (struct snd_usb_substream *subs)
> +{
> +
> +    /* Convert sample rate to little endian */
> +	u8 sr[3];
> +	sr[0] = subs->cur_rate&0xff;
> +	sr[1] = (subs->cur_rate>>8)&0xff;
> +	sr[2] = (subs->cur_rate>>16)&0xff;

Some minor coding style issues (need space, remove space, use tab,
etc).  Please check once scripts/checkpatch.pl and try to fix the
errors.  The error in the quirk table format is known and can be left
as is, though.

> +	
> +	/* Configure device */
> +	usb_set_interface(subs->stream->chip->dev, 0, 1);

You can use subs->dev.

> +	snd_usb_ctl_msg(subs->stream->chip->dev,
> +	    usb_rcvctrlpipe(subs->stream->chip->dev, 0),
> +	    0x01, 0x22, 0x0100, 0x0082, &sr, 0x0003);
> +
> +	return 0;
> +}
> +
>  void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
>  			      struct audioformat *fmt)
>  {
> @@ -1424,6 +1447,8 @@
>  	case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
>  		set_format_emu_quirk(subs, fmt);
>  		break;
> +    case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
> +        pioneer_djm_set_format_quirk(subs);
break is missing here.

Could you address the problems above, and most importantly, give your
Signed-off-by line and resumit?  The SOB is mandatory for merging to
upstream.  See Documentation/process/submitting-patches.rst for
details.


thanks,

Takashi

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

* Re: Pioneer DJ DJM-900NXS2 support patches
  2020-04-29  9:56 Pioneer DJ DJM-900NXS2 support patches Dmitry Panchenko | d-Systems
  2020-04-30 17:18 ` Takashi Iwai
@ 2020-04-30 17:40 ` Alexander Tsoy
  2020-05-01 12:14 ` Dmitry Panchenko | d-Systems
  2 siblings, 0 replies; 6+ messages in thread
From: Alexander Tsoy @ 2020-04-30 17:40 UTC (permalink / raw)
  To: Dmitry Panchenko | d-Systems, alsa-devel

В Ср, 29/04/2020 в 12:56 +0300, Dmitry Panchenko | d-Systems пишет:
> Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB 
> interfaces. Both have a MIDI controller, 10 playback and 12 capture 
> channels. Audio endpoints are vendor-specific and 3 files need to be 
> patched. All playback and capture channels work fine with all
> supported 
> sample rates (44.1k, 48k, 96k). Patches are attached.

Thanks for the patch.

> +                                       .endpoint = 0x01,
> +                                       .ep_attr = USB_ENDPOINT_XFER_ISOC|
> +                                           USB_ENDPOINT_SYNC_ASYNC|
> +                                           USB_ENDPOINT_USAGE_IMPLICIT_FB,

Playback endpoint shouldn't have a USB_ENDPOINT_USAGE_IMPLICIT_FB
attribute.


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

* Re: Pioneer DJ DJM-900NXS2 support patches
  2020-04-29  9:56 Pioneer DJ DJM-900NXS2 support patches Dmitry Panchenko | d-Systems
  2020-04-30 17:18 ` Takashi Iwai
  2020-04-30 17:40 ` Alexander Tsoy
@ 2020-05-01 12:14 ` Dmitry Panchenko | d-Systems
  2020-06-01 10:22   ` ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support Dmitry Panchenko | d-Systems
  2 siblings, 1 reply; 6+ messages in thread
From: Dmitry Panchenko | d-Systems @ 2020-05-01 12:14 UTC (permalink / raw)
  To: dmitry; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Takashi and Alexander, thanks for feedback! The updated patches are 
attached.

Signed-off-by: Dmitry Panchenko <dmitry@d-systems.ee>

--
Kind regards,
Dmitry Panchenko

d-Systems Ltd
Lai 6, Tartu 51005, Estonia
www.d-systems.ee

[-- Attachment #2: pcm.c.patch --]
[-- Type: text/x-patch, Size: 444 bytes --]

--- sound/usb/pcm.c	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/pcm.c	2020-05-01 14:17:54.785566648 +0300
@@ -365,6 +365,10 @@
 		ep = 0x81;
 		ifnum = 2;
 		goto add_sync_ep_from_ifnum;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		ep = 0x82;
+		ifnum = 0;
+		goto add_sync_ep_from_ifnum;
 	case USB_ID(0x0582, 0x01d8): /* BOSS Katana */
 		/* BOSS Katana amplifiers do not need quirks */
 		return 0;

[-- Attachment #3: quirks.c.patch --]
[-- Type: text/x-patch, Size: 1158 bytes --]

--- sound/usb/quirks.c	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/quirks.c	2020-05-01 14:45:57.545650031 +0300
@@ -1414,6 +1414,30 @@
 	subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
 }
 
+
+/*
+ * Pioneer DJ DJM-900NXS2
+ * Device needs to know the sample rate each time substream is started
+ */
+static int pioneer_djm_set_format_quirk(struct snd_usb_substream *subs)
+{
+
+	/* Convert sample rate value to little endian */
+	u8 sr[3];
+
+	sr[0] = subs->cur_rate&0xff;
+	sr[1] = (subs->cur_rate>>8)&0xff;
+	sr[2] = (subs->cur_rate>>16)&0xff;
+
+	/* Configure device */
+	usb_set_interface(subs->dev, 0, 1);
+	snd_usb_ctl_msg(subs->stream->chip->dev,
+		usb_rcvctrlpipe(subs->stream->chip->dev, 0),
+		0x01, 0x22, 0x0100, 0x0082, &sr, 0x0003);
+
+	return 0;
+}
+
 void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
 			      struct audioformat *fmt)
 {
@@ -1424,6 +1448,9 @@
 	case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
 		set_format_emu_quirk(subs, fmt);
 		break;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		pioneer_djm_set_format_quirk(subs);
+		break;
 	}
 }
 

[-- Attachment #4: quirks-table.h.patch --]
[-- Type: text/x-patch, Size: 1829 bytes --]

--- sound/usb/quirks-table.h	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/quirks-table.h	2020-05-01 14:48:44.665672833 +0300
@@ -3592,5 +3592,68 @@
 		}
 	}
 },
+{
+	/*
+	 * Pioneer DJ DJM-900NXS2
+	 * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 10,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x01,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) {
+						44100, 48000, 96000
+					}
+				}
+			},
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 12,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x82,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC|
+					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) {
+						44100, 48000, 96000
+					}
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
 
 #undef USB_DEVICE_VENDOR_SPEC

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

* ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support
  2020-05-01 12:14 ` Dmitry Panchenko | d-Systems
@ 2020-06-01 10:22   ` Dmitry Panchenko | d-Systems
  2020-06-01 18:44     ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Panchenko | d-Systems @ 2020-06-01 10:22 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, alexander

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB
interfaces. Both have a MIDI controller, 10 playback and 12 capture
channels. Audio endpoints are vendor-specific and 3 files need to be
patched. All playback and capture channels work fine with all supported
sample rates (44.1k, 48k, 96k). Patches are attached.

Signed-off-by: Dmitry Panchenko <dmitry@d-systems.ee>

--
Kind regards,
Dmitry Panchenko

d-Systems Ltd
Lai 6, Tartu 51005, Estonia
www.d-systems.ee


[-- Attachment #2: pcm.c.patch --]
[-- Type: text/x-patch, Size: 445 bytes --]

--- sound/usb/pcm.c	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/pcm.c	2020-05-01 14:17:54.785566648 +0300
@@ -365,6 +365,10 @@
 		ep = 0x81;
 		ifnum = 2;
 		goto add_sync_ep_from_ifnum;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		ep = 0x82;
+		ifnum = 0;
+		goto add_sync_ep_from_ifnum;
 	case USB_ID(0x0582, 0x01d8): /* BOSS Katana */
 		/* BOSS Katana amplifiers do not need quirks */
 		return 0;


[-- Attachment #3: quirks.c.patch --]
[-- Type: text/x-patch, Size: 1159 bytes --]

--- sound/usb/quirks.c	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/quirks.c	2020-05-01 14:45:57.545650031 +0300
@@ -1414,6 +1414,30 @@
 	subs->pkt_offset_adj = (emu_samplerate_id >= EMU_QUIRK_SR_176400HZ) ? 4 : 0;
 }
 
+
+/*
+ * Pioneer DJ DJM-900NXS2
+ * Device needs to know the sample rate each time substream is started
+ */
+static int pioneer_djm_set_format_quirk(struct snd_usb_substream *subs)
+{
+
+	/* Convert sample rate value to little endian */
+	u8 sr[3];
+
+	sr[0] = subs->cur_rate&0xff;
+	sr[1] = (subs->cur_rate>>8)&0xff;
+	sr[2] = (subs->cur_rate>>16)&0xff;
+
+	/* Configure device */
+	usb_set_interface(subs->dev, 0, 1);
+	snd_usb_ctl_msg(subs->stream->chip->dev,
+		usb_rcvctrlpipe(subs->stream->chip->dev, 0),
+		0x01, 0x22, 0x0100, 0x0082, &sr, 0x0003);
+
+	return 0;
+}
+
 void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
 			      struct audioformat *fmt)
 {
@@ -1424,6 +1448,9 @@
 	case USB_ID(0x041e, 0x3f19): /* E-Mu 0204 USB */
 		set_format_emu_quirk(subs, fmt);
 		break;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		pioneer_djm_set_format_quirk(subs);
+		break;
 	}
 }
 


[-- Attachment #4: quirks-table.h.patch --]
[-- Type: text/x-patch, Size: 1830 bytes --]

--- sound/usb/quirks-table.h	2020-04-23 11:38:27.000000000 +0300
+++ /root/linux-5.6.7/sound/usb/quirks-table.h	2020-05-01 14:48:44.665672833 +0300
@@ -3592,5 +3592,68 @@
 		}
 	}
 },
+{
+	/*
+	 * Pioneer DJ DJM-900NXS2
+	 * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 10,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x01,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) {
+						44100, 48000, 96000
+					}
+				}
+			},
+			{
+				.ifnum = 0,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 12,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x82,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+					    USB_ENDPOINT_SYNC_ASYNC|
+					    USB_ENDPOINT_USAGE_IMPLICIT_FB,
+					.rates = SNDRV_PCM_RATE_44100|
+					    SNDRV_PCM_RATE_48000|
+					    SNDRV_PCM_RATE_96000,
+					.rate_min = 44100,
+					.rate_max = 96000,
+					.nr_rates = 3,
+					.rate_table = (unsigned int[]) {
+						44100, 48000, 96000
+					}
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
 
 #undef USB_DEVICE_VENDOR_SPEC


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

* Re: ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support
  2020-06-01 10:22   ` ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support Dmitry Panchenko | d-Systems
@ 2020-06-01 18:44     ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-06-01 18:44 UTC (permalink / raw)
  To: Dmitry Panchenko | d-Systems; +Cc: alsa-devel, alexander

On Mon, 01 Jun 2020 12:22:24 +0200,
Dmitry Panchenko | d-Systems wrote:
> 
> Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB
> interfaces. Both have a MIDI controller, 10 playback and 12 capture
> channels. Audio endpoints are vendor-specific and 3 files need to be
> patched. All playback and capture channels work fine with all supported
> sample rates (44.1k, 48k, 96k). Patches are attached.
> 
> Signed-off-by: Dmitry Panchenko <dmitry@d-systems.ee>

Applied now.

But, at the next time, please keep the following in mind:
- Make a patch applicable with -p1 option, i.e. diff between
  a/sound/usb and b/sound/usb

- Align both From and Signed-off-by name and address consistently

I fixed manually at this time, so no resubmission needed.


thanks,

Takashi

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

end of thread, other threads:[~2020-06-01 18:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29  9:56 Pioneer DJ DJM-900NXS2 support patches Dmitry Panchenko | d-Systems
2020-04-30 17:18 ` Takashi Iwai
2020-04-30 17:40 ` Alexander Tsoy
2020-05-01 12:14 ` Dmitry Panchenko | d-Systems
2020-06-01 10:22   ` ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support Dmitry Panchenko | d-Systems
2020-06-01 18:44     ` Takashi Iwai

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.