Skip to contentSkip to conversation

ALSA: usb-audio : Add support for the Pioneer DJ DDJ-RR controller.

PATCH In review Daniel 2 participants 3 messages Nov 10, 2020 – Nov 21, 2020 Sound

lore
Share & tools
lore

Daniel

author
#0 lore raw

PATCH 1/1 ALSA: usb-audio : Add support for the Pioneer DJ DDJ-RR controller.

---
 sound/usb/quirks-table.h | 56 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +55 -1
index 3c1697f6b60c..a39233cb4d72 100644
@@ -3530,7 +3530,61 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 		}
 	}
 },
-
+{
+	/*
+	 * PIONEER DJ DDJ-RR
+     * PCM is 6 channels out & 4 channels in @ 44.1 fixed
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000d),
+	.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, //Master, Headphones & Booth
+					.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 = 4, //2x RCA inputs (CH1 & CH2)
+					.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,
+					.rate_min = 44100,
+					.rate_max = 44100,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 44100 }
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
 {
 	/*
 	 * Pioneer DJ DJM-900NXS2
Signature · 1 line
2.29.2
#1 lore raw
Quoted 59 lines · Daniel
---
 sound/usb/quirks-table.h | 56 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +45 -1
index 3c1697f6b60c..a39233cb4d72 100644
@@ -3530,7 +3530,61 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 		}
 	}
 },
-
+{
+	/*
+	 * PIONEER DJ DDJ-RR
+     * PCM is 6 channels out & 4 channels in @ 44.1 fixed
+	 */
+	USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000d),
+	.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, //Master, Headphones & Booth
+					.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 = 4, //2x RCA inputs (CH1 & CH2)
+					.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,
+					.rate_min = 44100,
+					.rate_max = 44100,

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), · line 3587

Quoted 10 lines
sound/usb/quirks-table.h +10 -0
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) { 44100 }
+				}
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},

The code change itself looks reasonable, but the patch misses the description completely. Could you give the patch description? Also, a signed-off-by line is mandatory from the legal reason, so please add this together and resubmit the patch.

Thanks!

Takashi

#2 lore raw

Hi Takashi,

It will be a while before I can amend as my Linux PC with the kernel git gave up the ghost this weekend.
Currently I don't have a PC to access my Arch Linux drive for continuity.

SInce this is just an audio quirk, can you make the necessary amendments for me in this patch?

Description: Allows the Pioneer DJ DDJ-RR to be seen as a USB audio device under Linux and therefore usable in such applications as Mixxx.
- Tested Master Audio out, headphones (both output jacks) and microphone input. All work perfectly.

Or alternatively, how can I do this via a web browser in a patch submission portal?

Thanks in advance,

Dan

Quoted 91 lines · Takashi Iwai

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge",

Quoted 10 lines · Daniel
---
 sound/usb/quirks-table.h | 56 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)
sound/usb/quirks-table.h +0 -0
index 3c1697f6b60c..a39233cb4d72 100644
@@ -3530,7 +3530,61 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge",

"HVR-950Q"),

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 11 lines
sound/usb/quirks-table.h +7 -1
              }
      }
 },
-
+{
+     /*
+      * PIONEER DJ DDJ-RR
+     * PCM is 6 channels out & 4 channels in @ 44.1 fixed
+      */
+     USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000d),
+     .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk)

{

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 8 lines
sound/usb/quirks-table.h +8 -0
+             .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,

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", · line 3548

Quoted 1 line
sound/usb/quirks-table.h +1 -0
+                                     .channels = 6, //Master,

Headphones & Booth

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 11 lines
sound/usb/quirks-table.h +11 -0
+                                     .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 }

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 7 lines
sound/usb/quirks-table.h +7 -0
+                             }
+                     },
+                     {
+                             .ifnum = 0,
+                             .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+                             .data = &(const struct audioformat) {
+                                     .formats =

SNDRV_PCM_FMTBIT_S24_3LE,

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", · line 3567

Quoted 1 line
sound/usb/quirks-table.h +1 -0
+                                     .channels = 4, //2x RCA inputs

(CH1 & CH2)

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 7 lines
sound/usb/quirks-table.h +7 -0
+                                     .iface = 0,
+                                     .altsetting = 1,
+                                     .altset_idx = 1,
+                                     .endpoint = 0x82,
+                                     .ep_attr = USB_ENDPOINT_XFER_ISOC|
+                                              USB_ENDPOINT_SYNC_ASYNC|
+

USB_ENDPOINT_USAGE_IMPLICIT_FB,

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),

Quoted 5 lines
sound/usb/quirks-table.h +5 -0
+                                     .rates = SNDRV_PCM_RATE_44100,
+                                     .rate_min = 44100,
+                                     .rate_max = 44100,
+                                     .nr_rates = 1,
+                                     .rate_table = (unsigned int[]) {

44100 }

sound/usb/quirks-table.h AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), · line 3587

Quoted 8 lines
sound/usb/quirks-table.h +8 -0
+                             }
+                     },
+                     {
+                             .ifnum = -1
+                     }
+             }
+     }
+},

The code change itself looks reasonable, but the patch misses the description completely. Could you give the patch description? Also, a signed-off-by line is mandatory from the legal reason, so please add this together and resubmit the patch.

Thanks!

Takashi

Signature · 4 lines
Kind Regards,

Daniel
+61 (0)409611884