mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: Fix Scarlett 8i6 Gen 1 router source numbering
@ 2026-10-18 11:20 Walter Weber
  2026-10-19  8:40 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Walter Weber @ 2026-10-18 11:20 UTC (permalink / raw)
  To: linux-sound
  Cc: Geoffrey D . Bennett, Walter Weber, stable, Jaroslav Kysela,
	Takashi Iwai, Vasiliy Kovalev, linux-kernel

The router source numbering in s8i6_info is identical to the 6i6 entry
and was never verified on hardware (it is marked "untested..."). On a
Scarlett 8i6 1st Gen everything after the analog inputs is off by two:

  - "SPDIF 1/2" select values 16/17, which carry no signal;
  - "Mix A/B" select values 18/19, which are the actual S/PDIF inputs;
  - "Mix C-F" select the actual Mix A-D, and Mix E/F cannot be
    selected at all;
  - the matrix inputs cannot be fed from S/PDIF.

The real numbering was measured on the device by routing known signals
(PCM test tones, mixes with distinct gains, an S/PDIF out-to-in
loopback) and checking which source value arrives in the capture
stream:

  PCM 1-12      0-11
  Analog 1-4   12-15
  (no signal)  16-17
  S/PDIF 1-2   18-19
  Mix A-F      20-25

Correct the offsets and enum lengths accordingly, and update the
(currently unused) matrix_mux_init table to match. Values 16/17
remain as placeholders (shown as "Analog 5/6") since the enum maps
items to source values linearly.

The 6i6 entry uses the same layout and is also marked untested. It is
left unchanged since I have no 6i6 to verify it.

Tested on a Scarlett 8i6 1st Gen (bcdDevice 2.60) with v7.2.11.

Fixes: 76b188c4b370 ("ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20")
Cc: stable@vger.kernel.org
Signed-off-by: Walter Weber <walter.weber@rwth-aachen.de>
---
 sound/usb/mixer_scarlett.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/sound/usb/mixer_scarlett.c b/sound/usb/mixer_scarlett.c
index 6808730ef..ac0fb2e88 100644
--- a/sound/usb/mixer_scarlett.c
+++ b/sound/usb/mixer_scarlett.c
@@ -999,7 +999,11 @@ static const struct scarlett_device_info s6i6_info = {
 	}
 };
 
-/*  untested...  */
+/*
+ * Router source numbering, measured on hardware: PCM 1-12 = 0-11,
+ * Analog 1-4 = 12-15, 16-17 carry no signal (shown as "Analog 5/6"),
+ * S/PDIF 1-2 = 18-19, Mix A-F = 20-25.
+ */
 static const struct scarlett_device_info s8i6_info = {
 	.matrix_in = 18,
 	.matrix_out = 6,
@@ -1009,15 +1013,15 @@ static const struct scarlett_device_info s8i6_info = {
 
 	.opt_master = {
 		.start = -1,
-		.len = 25,
-		.offsets = {0, 12, 16, 18, 18},
+		.len = 27,
+		.offsets = {0, 12, 18, 20, 20},
 		.names = NULL
 	},
 
 	.opt_matrix = {
 		.start = -1,
-		.len = 19,
-		.offsets = {0, 12, 16, 18, 18},
+		.len = 21,
+		.offsets = {0, 12, 18, 20, 20},
 		.names = NULL
 	},
 
@@ -1034,7 +1038,7 @@ static const struct scarlett_device_info s8i6_info = {
 
 	.matrix_mux_init = {
 		12, 13, 14, 15,                 /* Analog -> 1..4 */
-		16, 17,                          /* SPDIF -> 5,6 */
+		18, 19,                          /* SPDIF -> 5,6 */
 		0, 1, 2, 3, 4, 5, 6, 7,     /* PCM[1..12] -> 7..18 */
 		8, 9, 10, 11
 	}
-- 
2.56.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: usb-audio: Fix Scarlett 8i6 Gen 1 router source numbering
  2026-10-18 11:20 [PATCH] ALSA: usb-audio: Fix Scarlett 8i6 Gen 1 router source numbering Walter Weber
@ 2026-10-19  8:40 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-10-19  8:40 UTC (permalink / raw)
  To: Walter Weber
  Cc: linux-sound, Geoffrey D . Bennett, stable, Jaroslav Kysela,
	Takashi Iwai, Vasiliy Kovalev, linux-kernel

On Sun, 18 Oct 2026 13:20:09 +0200,
Walter Weber wrote:
> 
> The router source numbering in s8i6_info is identical to the 6i6 entry
> and was never verified on hardware (it is marked "untested..."). On a
> Scarlett 8i6 1st Gen everything after the analog inputs is off by two:
> 
>   - "SPDIF 1/2" select values 16/17, which carry no signal;
>   - "Mix A/B" select values 18/19, which are the actual S/PDIF inputs;
>   - "Mix C-F" select the actual Mix A-D, and Mix E/F cannot be
>     selected at all;
>   - the matrix inputs cannot be fed from S/PDIF.
> 
> The real numbering was measured on the device by routing known signals
> (PCM test tones, mixes with distinct gains, an S/PDIF out-to-in
> loopback) and checking which source value arrives in the capture
> stream:
> 
>   PCM 1-12      0-11
>   Analog 1-4   12-15
>   (no signal)  16-17
>   S/PDIF 1-2   18-19
>   Mix A-F      20-25
> 
> Correct the offsets and enum lengths accordingly, and update the
> (currently unused) matrix_mux_init table to match. Values 16/17
> remain as placeholders (shown as "Analog 5/6") since the enum maps
> items to source values linearly.
> 
> The 6i6 entry uses the same layout and is also marked untested. It is
> left unchanged since I have no 6i6 to verify it.
> 
> Tested on a Scarlett 8i6 1st Gen (bcdDevice 2.60) with v7.2.11.
> 
> Fixes: 76b188c4b370 ("ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20")
> Cc: stable@vger.kernel.org
> Signed-off-by: Walter Weber <walter.weber@rwth-aachen.de>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-19  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-18 11:20 [PATCH] ALSA: usb-audio: Fix Scarlett 8i6 Gen 1 router source numbering Walter Weber
2026-10-19  8:40 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®