ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk
authorOlivia Mackintosh <livvy@base.nu>
Fri, 5 Feb 2021 18:42:56 +0000 (18:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Mar 2021 13:17:28 +0000 (14:17 +0100)
commitd78acca2afe50a73e89617732ba029098e7abaac
tree8ac2f8ae46191ecf58959bb59564f459eb9b305b
parent96c4c0a9405e0a5b9c8fcb6d338628a799a3b350
ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk

[ Upstream commit a07df82c799013236aa90a140785775eda9f9523 ]

This allows for N different devices to use the pioneer mixer quirk for
setting capture/record type and recording level. The impementation has
not changed much with the exception of an additional mask on
private_value to allow storing of a device index:
DEVICE MASK 0xff000000
GROUP_MASK 0x00ff0000
VALUE_MASK 0x0000ffff

This could be improved by changing the arrays of wValues for each
channel to contain named definitions (e.g. SND_DJM_CAP_LINE). It would
improve readability and perhaps would allow using the same array for
multiple channels. The channel number can be specified on the control
next to the wIndex.

Feedback is very much appreciated as I'm not the most proficient C
programmer but am learning as I go.

Signed-off-by: Olivia Mackintosh <livvy@base.nu>
Link: https://lore.kernel.org/r/20210205184256.10201-2-livvy@base.nu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/mixer_quirks.c