All of lore.kernel.org
 help / color / mirror / Atom feed
From: rp@nrp.de
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de
Subject: [PATCH] ALSA: usb-audio: Add quirk for PioneerDJ DDJ-1000
Date: Wed, 31 Jan 2024 21:28:48 +0100	[thread overview]
Message-ID: <2322911.ElGaqSPkdT@pc> (raw)

Problems:
	- PioneerDJ DDJ-1000 audio channels are not recognized.
	- Jog dial displays are showing permanently "NO AUDIO DRIVER" 

The attached patch fixes this.
The jog displays and all output and input channels are working now.

Signed-off-by: Ralf Pachali <rp@nrp.de>

--- sound/usb/quirks-table.h
+++ sound/usb/quirks-table.h
@@ -3942,6 +3942,64 @@
 	}
 },
 
+{
+	/*
+	 * PIONEER DJ DDJ-1000
+	 * PCM is 6 channels out, 12 channels in @ 44.1 fixed
+	 * The Feedback for the output is the input
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0020),
+		.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 = 6,
+					.iface = 0,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.endpoint = 0x01,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+						USB_ENDPOINT_SYNC_ASYNC,
+					.rates = SNDRV_PCM_RATE_44100,
+					.rate_min = 44100,
+					.rate_max = 44100,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 44100 }
+				}
+			},
+			{
+				.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_idx = 1,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC|
+						USB_ENDPOINT_SYNC_ASYNC|
+					USB_ENDPOINT_USAGE_IMPLICIT_FB,
+					.rates = SNDRV_PCM_RATE_44100,
+					.rate_min = 44100,
+					.rate_max = 44100,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 44100 }
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+
 /*
  * MacroSilicon MS2100/MS2106 based AV capture cards
  *
--- sound/usb/quirks.c
+++ sound/usb/quirks.c
@@ -1390,6 +1390,16 @@
 	return 0;
 }
 
+static int snd_usb_pioneer_ddj1000_boot_quirk(struct usb_device *dev)
+{
+	/* disable "no audio driver" message on jog wheel displays */
+	snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0,
+			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+			0, 0x8003, NULL, 0);
+
+	return 0;
+}
+
 /*
  * Setup quirks
  */
@@ -1630,6 +1640,8 @@
 	switch (id) {
 	case USB_ID(0x07fd, 0x0008): /* MOTU M Series */
 		return snd_usb_motu_m_series_boot_quirk(dev);
+	case USB_ID(0x2b73, 0x0020): /* Pioneer DDJ-1000 */
+		return snd_usb_pioneer_ddj1000_boot_quirk(dev);
 	}
 
 	return 0;




             reply	other threads:[~2024-02-06 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 20:28 rp [this message]
2024-02-01 12:59 ` [PATCH] ALSA: usb-audio: Add quirk for PioneerDJ DDJ-1000 Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2322911.ElGaqSPkdT@pc \
    --to=rp@nrp.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.