]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Reorder snd_djm_devices[] entries
authorGeraldo Nascimento <geraldogabriel@gmail.com>
Sat, 4 Dec 2021 18:52:24 +0000 (15:52 -0300)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 Dec 2021 09:06:20 +0000 (10:06 +0100)
commitfb15f2bb3c591115753d24a938965108aadf46e7
tree8942a7a9dc44c6cf7ce1cfbfcfe3ff8f1b933447
parentef041d17dcd9c1d858d5fb0d78181b3b75ba50ae
ALSA: usb-audio: Reorder snd_djm_devices[] entries

Olivia Mackintosh has posted to alsa-devel reporting that
there's a potential bug that could break mixer quirks for Pioneer
devices introduced by 718e6d0a79af94a8a36c7de87b09d9860eb8bd2a
"ALSA: usb-audio: Add support for the Pioneer DJM 750MK2
Mixer/Soundcard".

This happened because the DJM 750 MK2 was added last to the Pioneer DJM
device table index and defined as 0x4 but was added to snd_djm_devices[]
just after the DJM 750 (MK1) entry instead of last, after the DJM 900
NXS2. This escaped review.

To prevent that from ever happening again, Takashi Iwai suggested to use
C99 array designators in snd_djm_devices[] instead of simply reordering
the entries.

Fixes: 718e6d0a79af ("ALSA: usb-audio: Add support for the Pioneer DJM 750MK2")
Reported-by: Olivia Mackintosh <livvy@base.nu>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
Link: https://lore.kernel.org/r/Yau46FDzoql0SNnW@geday
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_quirks.c