ALSA: usb-audio: scarlett2: Fix union usage in mixer control callbacks
authorGeoffrey D. Bennett <g@b4.vu>
Sun, 20 Jun 2021 16:46:47 +0000 (02:16 +0930)
committerTakashi Iwai <tiwai@suse.de>
Mon, 21 Jun 2021 06:37:57 +0000 (08:37 +0200)
commit64c02a9d3f9c8ca167c216acb86da02c1b7299b9
treef4d6d9bc483ad8dc87cbabcef5497d584def595a
parentc5d8e008032f3cd5f266d552732973a960b0bd4b
ALSA: usb-audio: scarlett2: Fix union usage in mixer control callbacks

Fix mixer control callbacks to use the correct members of the struct
snd_ctl_elem_value. The use of value.integer and value.enumerated were
swapped in a few places.

Update scarlett2_mux_src_enum_ctl_put() to use min() instead of
clamp() as value.enumerated.item is unsigned.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/20210620164647.GA9226@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_scarlett_gen2.c