Skip to content

Commit 38e94ce

Browse files
livmackintoshtiwai
authored andcommitted
ALSA: usb-audio: separate DJM-A9 cap lvl options
Mixer quicks for the Pioneer DJM-A9 mixer was added in 5289d00 with additional capture level values added to the common DJM array of values. This breaks the existing DJM mixers however as alsa-utils relies on enumeration of the actual mixer options based on the value array which results in error when storing state. This commit just separates the A9 values into a separate array and references them in the corresponding mixer control. Fixes: 5289d00 ("ALSA: usb-audio: Add Pioneer DJ/AlphaTheta DJM-A9 Mixer") Signed-off-by: Olivia Mackintosh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 5a0c72c commit 38e94ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sound/usb/mixer_quirks.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,8 +3688,7 @@ static const char *snd_djm_get_label(u8 device_idx, u16 wvalue, u16 windex)
36883688

36893689
// common DJM capture level option values
36903690
static const u16 snd_djm_opts_cap_level[] = {
3691-
0x0000, 0x0100, 0x0200, 0x0300, 0x400, 0x500 };
3692-
3691+
0x0000, 0x0100, 0x0200, 0x0300 };
36933692

36943693
// DJM-250MK2
36953694
static const u16 snd_djm_opts_250mk2_cap1[] = {
@@ -3831,6 +3830,8 @@ static const struct snd_djm_ctl snd_djm_ctls_750mk2[] = {
38313830

38323831

38333832
// DJM-A9
3833+
static const u16 snd_djm_opts_a9_cap_level[] = {
3834+
0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500 };
38343835
static const u16 snd_djm_opts_a9_cap1[] = {
38353836
0x0107, 0x0108, 0x0109, 0x010a, 0x010e,
38363837
0x111, 0x112, 0x113, 0x114, 0x0131, 0x132, 0x133, 0x134 };
@@ -3844,7 +3845,7 @@ static const u16 snd_djm_opts_a9_cap5[] = {
38443845
0x0501, 0x0502, 0x0503, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050a, 0x050e };
38453846

38463847
static const struct snd_djm_ctl snd_djm_ctls_a9[] = {
3847-
SND_DJM_CTL("Capture Level", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
3848+
SND_DJM_CTL("Capture Level", a9_cap_level, 0, SND_DJM_WINDEX_CAPLVL),
38483849
SND_DJM_CTL("Master Input", a9_cap1, 3, SND_DJM_WINDEX_CAP),
38493850
SND_DJM_CTL("Ch1 Input", a9_cap2, 2, SND_DJM_WINDEX_CAP),
38503851
SND_DJM_CTL("Ch2 Input", a9_cap3, 2, SND_DJM_WINDEX_CAP),

0 commit comments

Comments
 (0)