ALSA: scarlett2: Allow passing any output to line_out_remap()
authorGeoffrey D. Bennett <g@b4.vu>
Thu, 26 Oct 2023 18:06:16 +0000 (04:36 +1030)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:39 +0000 (15:35 -0800)
commit66fb87fac545583bfb441bc4d6dffd99a7b38a48
treea97821f9303814e48b5961e038f6bd735793b529
parent996fde492ad9b9563ee483b363af40d7696a8467
ALSA: scarlett2: Allow passing any output to line_out_remap()

[ Upstream commit 2190b9aea4eb92ccf3176e35c17c959e40f1a81b ]

Line outputs 3 & 4 on the Gen 3 18i8 are internally the analogue 7 and
8 outputs, and this renumbering is hidden from the user by
line_out_remap(). By allowing higher values (representing non-analogue
outputs) to be passed to line_out_remap(), repeated code from
scarlett2_mux_src_enum_ctl_get() and scarlett2_mux_src_enum_ctl_put()
can be removed.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/3b70267931f5994628ab27306c73cddd17b93c8f.1698342632.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stable-dep-of: 50603a67daef ("ALSA: scarlett2: Add missing error checks to *_ctl_get()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/mixer_scarlett_gen2.c