diff mbox series

ALSA: usb-audio: add mixer quirks for Pioneer DJM-900NXS2

Message ID 20210201212248.54364-1-fabian@lesniak-it.de (mailing list archive)
State New, archived
Headers show
Series ALSA: usb-audio: add mixer quirks for Pioneer DJM-900NXS2 | expand

Commit Message

Fabian Lesniak Feb. 1, 2021, 9:22 p.m. UTC
This commit adds mixer quirks for the Pioneer DJM-900NXS2 mixer. This
device has 6 capture channels, 5 of them allow setting the signal
source. This adds controls for these, similar to the DJM-250Mk2.
However, playpack channels are not controllable via software like on the
250Mk2, as they can only be set manually on the mixing console.
Read-only controls showing the currently selected playback channels are
omitted.

This patch is built on top of the DJM750 mixer quirk support and
requires it to be applied first.

Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de>
---
 sound/usb/mixer_quirks.c | 73 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 72 insertions(+), 1 deletion(-)

Comments

Takashi Iwai Feb. 2, 2021, 11:37 a.m. UTC | #1
On Mon, 01 Feb 2021 22:22:47 +0100,
Fabian Lesniak wrote:
> 
> This commit adds mixer quirks for the Pioneer DJM-900NXS2 mixer. This
> device has 6 capture channels, 5 of them allow setting the signal
> source. This adds controls for these, similar to the DJM-250Mk2.
> However, playpack channels are not controllable via software like on the
> 250Mk2, as they can only be set manually on the mixing console.
> Read-only controls showing the currently selected playback channels are
> omitted.
> 
> This patch is built on top of the DJM750 mixer quirk support and
> requires it to be applied first.
> 
> Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de>

Which tree / branch is this patch based on?  It doesn't seem applying
cleanly either on for-linus or for-next branch.


thanks,

Takashi
Fabian Lesniak Feb. 2, 2021, 11:49 a.m. UTC | #2
This patch is based upon Olivia's patch "ALSA: usb-audio: Add DJM750 to 
Pioneer mixer quirk" and applies cleanly after that one on v5.11-rc6. If 
Olivia improves the original patch, I will send this one again as well.

If there is some means to express such dependencies between patches, I'm sorry 
for not doing so.

Cheers
Fabian

Am Dienstag, 2. Februar 2021, 12:37:12 CET schrieb Takashi Iwai:
> On Mon, 01 Feb 2021 22:22:47 +0100,
> 
> Fabian Lesniak wrote:
> > This commit adds mixer quirks for the Pioneer DJM-900NXS2 mixer. This
> > device has 6 capture channels, 5 of them allow setting the signal
> > source. This adds controls for these, similar to the DJM-250Mk2.
> > However, playpack channels are not controllable via software like on the
> > 250Mk2, as they can only be set manually on the mixing console.
> > Read-only controls showing the currently selected playback channels are
> > omitted.
> > 
> > This patch is built on top of the DJM750 mixer quirk support and
> > requires it to be applied first.
> > 
> > Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de>
> 
> Which tree / branch is this patch based on?  It doesn't seem applying
> cleanly either on for-linus or for-next branch.
> 
> 
> thanks,
> 
> Takashi
Takashi Iwai Feb. 2, 2021, 12:12 p.m. UTC | #3
On Tue, 02 Feb 2021 12:49:03 +0100,
Fabian Lesniak wrote:
> 
> This patch is based upon Olivia's patch "ALSA: usb-audio: Add DJM750 to 
> Pioneer mixer quirk" and applies cleanly after that one on v5.11-rc6. If 
> Olivia improves the original patch, I will send this one again as well.
> 
> If there is some means to express such dependencies between patches, I'm sorry 
> for not doing so.

Alright, let's wait until Olivia's patches get merged.


thanks,

Takashi

> 
> Cheers
> Fabian
> 
> Am Dienstag, 2. Februar 2021, 12:37:12 CET schrieb Takashi Iwai:
> > On Mon, 01 Feb 2021 22:22:47 +0100,
> > 
> > Fabian Lesniak wrote:
> > > This commit adds mixer quirks for the Pioneer DJM-900NXS2 mixer. This
> > > device has 6 capture channels, 5 of them allow setting the signal
> > > source. This adds controls for these, similar to the DJM-250Mk2.
> > > However, playpack channels are not controllable via software like on the
> > > 250Mk2, as they can only be set manually on the mixing console.
> > > Read-only controls showing the currently selected playback channels are
> > > omitted.
> > > 
> > > This patch is built on top of the DJM750 mixer quirk support and
> > > requires it to be applied first.
> > > 
> > > Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de>
> > 
> > Which tree / branch is this patch based on?  It doesn't seem applying
> > cleanly either on for-linus or for-next branch.
> > 
> > 
> > thanks,
> > 
> > Takashi
> 
>
diff mbox series

Patch

diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 10e472feb757..6688a38321a4 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -2777,9 +2777,76 @@  static const struct snd_pioneer_djm_option_group snd_pioneer_djm750_option_group
 	snd_pioneer_djm_option_group_item("CH4 Input", djm750_capture_ch4, 0),
 };
 
+
+/* DJM-900NXS2 */
+static const struct snd_pioneer_djm_option snd_pioneer_djm_options_djm900nxs2_capture_ch1[] = {
+	{ .name =  "CH1 Control Tone LINE",    .wValue = 0x0100, .wIndex = 0x8002 },
+	{ .name =  "CH1 Control Tone DITITAL", .wValue = 0x0102, .wIndex = 0x8002 },
+	{ .name =  "CH1 Control Tone PHONO",   .wValue = 0x0103, .wIndex = 0x8002 },
+	{ .name =  "Post CH1 Fader",           .wValue = 0x0106, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader A",            .wValue = 0x0107, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader B",            .wValue = 0x0108, .wIndex = 0x8002 },
+	{ .name =  "MIC",                      .wValue = 0x0109, .wIndex = 0x8002 },
+	{ .name =  "REC OUT",                  .wValue = 0x010a, .wIndex = 0x8002 },
+};
+
+static const struct snd_pioneer_djm_option snd_pioneer_djm_options_djm900nxs2_capture_ch2[] = {
+	{ .name =  "CH2 Control Tone LINE",    .wValue = 0x0200, .wIndex = 0x8002 },
+	{ .name =  "CH2 Control Tone DITITAL", .wValue = 0x0202, .wIndex = 0x8002 },
+	{ .name =  "CH2 Control Tone PHONO",   .wValue = 0x0203, .wIndex = 0x8002 },
+	{ .name =  "Post CH2 Fader",           .wValue = 0x0206, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader A",            .wValue = 0x0207, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader B",            .wValue = 0x0208, .wIndex = 0x8002 },
+	{ .name =  "MIC",                      .wValue = 0x0209, .wIndex = 0x8002 },
+	{ .name =  "REC OUT",                  .wValue = 0x020a, .wIndex = 0x8002 },
+};
+
+static const struct snd_pioneer_djm_option snd_pioneer_djm_options_djm900nxs2_capture_ch3[] = {
+	{ .name =  "CH3 Control Tone LINE",    .wValue = 0x0300, .wIndex = 0x8002 },
+	{ .name =  "CH3 Control Tone DITITAL", .wValue = 0x0302, .wIndex = 0x8002 },
+	{ .name =  "CH3 Control Tone PHONO",   .wValue = 0x0303, .wIndex = 0x8002 },
+	{ .name =  "Post CH3 Fader",           .wValue = 0x0306, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader A",            .wValue = 0x0307, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader B",            .wValue = 0x0308, .wIndex = 0x8002 },
+	{ .name =  "MIC",                      .wValue = 0x0309, .wIndex = 0x8002 },
+	{ .name =  "REC OUT",                  .wValue = 0x030a, .wIndex = 0x8002 },
+};
+
+static const struct snd_pioneer_djm_option snd_pioneer_djm_options_djm900nxs2_capture_ch4[] = {
+	{ .name =  "CH4 Control Tone LINE",    .wValue = 0x0400, .wIndex = 0x8002 },
+	{ .name =  "CH4 Control Tone DITITAL", .wValue = 0x0402, .wIndex = 0x8002 },
+	{ .name =  "CH4 Control Tone PHONO",   .wValue = 0x0403, .wIndex = 0x8002 },
+	{ .name =  "Post CH4 Fader",           .wValue = 0x0406, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader A",            .wValue = 0x0407, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader B",            .wValue = 0x0408, .wIndex = 0x8002 },
+	{ .name =  "MIC",                      .wValue = 0x0409, .wIndex = 0x8002 },
+	{ .name =  "REC OUT",                  .wValue = 0x040a, .wIndex = 0x8002 },
+};
+
+static const struct snd_pioneer_djm_option snd_pioneer_djm_options_djm900nxs2_capture_ch5[] = {
+	{ .name =  "Cross Fader A",            .wValue = 0x0507, .wIndex = 0x8002 },
+	{ .name =  "Cross Fader B",            .wValue = 0x0508, .wIndex = 0x8002 },
+	{ .name =  "MIC",                      .wValue = 0x0509, .wIndex = 0x8002 },
+	{ .name =  "REC OUT",                  .wValue = 0x050a, .wIndex = 0x8002 },
+	{ .name =  "Post Fader A",             .wValue = 0x050b, .wIndex = 0x8002 },
+	{ .name =  "Post Fader B",             .wValue = 0x050c, .wIndex = 0x8002 },
+	{ .name =  "Post Fader C",             .wValue = 0x050d, .wIndex = 0x8002 },
+	{ .name =  "Post Fader D",             .wValue = 0x050e, .wIndex = 0x8002 },
+};
+
+static const struct snd_pioneer_djm_option_group snd_pioneer_djm900nxs2_option_groups[] = {
+	snd_pioneer_djm_option_group_item("Capture Level", capture_level, 0),
+	snd_pioneer_djm_option_group_item("CH1 Input", djm900nxs2_capture_ch1, 2),
+	snd_pioneer_djm_option_group_item("CH2 Input", djm900nxs2_capture_ch2, 2),
+	snd_pioneer_djm_option_group_item("CH3 Input", djm900nxs2_capture_ch3, 2),
+	snd_pioneer_djm_option_group_item("CH4 Input", djm900nxs2_capture_ch4, 2),
+	snd_pioneer_djm_option_group_item("CH5 Input", djm900nxs2_capture_ch5, 3),
+};
+
 static const struct snd_pioneer_djm_device snd_pioneer_djm_devices[] = {
 	{ .name = "DJM-250Mk2", .controls = snd_pioneer_djm250mk2_option_groups, .ncontrols = 7},
-	{ .name = "DJM-750", .controls = snd_pioneer_djm750_option_groups, .ncontrols = 5}
+	{ .name = "DJM-750", .controls = snd_pioneer_djm750_option_groups, .ncontrols = 5},
+	{ .name = "DJM-900NXS2", .controls = snd_pioneer_djm900nxs2_option_groups, .ncontrols = 6}
 };
 
 // layout of the kcontrol->private_value:
@@ -3020,6 +3087,10 @@  int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 	case USB_ID(0x08e4, 0x017f): /* Pioneer DJ DJM-750 */
 		err = snd_pioneer_djm_controls_create(mixer, 0x01);
 		break;
+	case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */
+		err = snd_pioneer_djm_controls_create(mixer, 0x02);
+		break;
+
 	}
 
 	return err;