Skip to content

Commit 2de5185

Browse files
tiwaigregkh
authored andcommitted
ALSA: usb-audio: Add missing proc text entry for BESPOKEN type
commit 64752a9 upstream. Recently we've added a new usb_mixer element type, USB_MIXER_BESPOKEN, but it wasn't added in the table in snd_usb_mixer_dump_cval(). This is no big problem since each bespoken type should have its own dump method, but it still isn't disallowed to use the standard one, so we should cover it as well. Along with it, define the table with the explicit array initializer for avoiding other pitfalls. Fixes: 785b6f2 ("ALSA: usb-audio: scarlett2: Fix wrong resume call") Reported-by: Pavel Machek <pavel@denx.de> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210714084836.1977-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 37a88b4 commit 2de5185

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎sound/usb/mixer.c‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3274,7 +3274,15 @@ static void snd_usb_mixer_dump_cval(struct snd_info_buffer *buffer,
32743274
{
32753275
struct usb_mixer_elem_info *cval = mixer_elem_list_to_info(list);
32763276
static const char * const val_types[] = {
3277-
"BOOLEAN", "INV_BOOLEAN", "S8", "U8", "S16", "U16", "S32", "U32",
3277+
[USB_MIXER_BOOLEAN] = "BOOLEAN",
3278+
[USB_MIXER_INV_BOOLEAN] = "INV_BOOLEAN",
3279+
[USB_MIXER_S8] = "S8",
3280+
[USB_MIXER_U8] = "U8",
3281+
[USB_MIXER_S16] = "S16",
3282+
[USB_MIXER_U16] = "U16",
3283+
[USB_MIXER_S32] = "S32",
3284+
[USB_MIXER_U32] = "U32",
3285+
[USB_MIXER_BESPOKEN] = "BESPOKEN",
32783286
};
32793287
snd_iprintf(buffer, " Info: id=%i, control=%i, cmask=0x%x, "
32803288
"channels=%i, type=\"%s\"\n", cval->head.id,

0 commit comments

Comments
 (0)