OSDN Git Service

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)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Feb 2021 22:17:31 +0000 (23:17 +0100)
commita07df82c799013236aa90a140785775eda9f9523
treec1d0c9139aac879654ea305586e2670798e2ed49
parentfb3c293b82c31a9a68fbcf4e7a45fadd8a47ea2b
ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk

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>
sound/usb/mixer_quirks.c