diff mbox series

ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support

Message ID 48ab19ff-3303-9bf8-ed0e-bcb31d8537eb@d-systems.ee (mailing list archive)
State New, archived
Headers show
Series ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 support | expand

Commit Message

Dmitry Panchenko | d-Systems June 1, 2020, 10:22 a.m. UTC
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

Comments

Takashi Iwai June 1, 2020, 6:44 p.m. UTC | #1
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
diff mbox series

Patch

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