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@xxxxxxxxxxxxx> --- sound/usb/mixer_quirks.c | 73 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) 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; -- 2.30.0