public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor on firmware 2417
@ 2026-04-25 21:07 Geoffrey D. Bennett
  2026-04-25 21:16 ` [PATCH 1/3] ALSA: scarlett2: Allow selecting config_set by firmware version Geoffrey D. Bennett
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Geoffrey D. Bennett @ 2026-04-25 21:07 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Takashi Iwai, linux-sound

Hi Takashi,

Firmware 2417 for the Scarlett 4th Gen 2i2 moved the direct monitor
gain parameters, breaking that control's functionality.

The driver already has per-device scarlett2_config_set tables
describing each parameter's offset, but only one table per device, so
there was no way to express "this offset changed at firmware version
N". This series adds that capability and uses it to fix the 2i2 Gen 4.

Patches
-------

1/3: Replace the device info's single config_set pointer with a
config_sets array of {from_firmware_version, config_set} entries, and
resolve the running config_set at probe time once the firmware version
has been read. Each device gets a single entry matching its previous
min_firmware_version (or 0), so this is a no-op preparation step.

2/3: Drop the now-redundant min_firmware_version field from
scarlett2_device_info; config_sets[0].from_firmware_version carries
the same meaning. No functional change.

3/3: Add a second 2i2 Gen 4 config_set with DIRECT_MONITOR_GAIN at the
new offset, gated on firmware >= 2417. All other offsets are
unchanged.

Patch 1 is a prerequisite for patch 3. Patch 2 isn't a strict
dependency, but it removes a now-redundant field, so patch 3's Cc:
stable trailer names both 1 and 2 as prereqs by subject (please
substitute SHAs at apply time). Patch 2 can be dropped from the stable
backport if you'd prefer.

Tested
------

Verified on a Scarlett 2i2 4th Gen by writing to Monitor 1 Mix A Input
01 and observing with usbmon:

- Firmware 2128, patched driver:   write targets offset 0x2A0
- Firmware 2417, patched driver:   write targets offset 0x2A4
- Firmware 2417, unpatched driver: write targets offset 0x2A0 (bug)

Regards,
Geoffrey

Geoffrey D. Bennett (3):
  ALSA: scarlett2: Allow selecting config_set by firmware version
  ALSA: scarlett2: Fold min_firmware_version into config_sets
  ALSA: scarlett2: Update offsets for 2i2 Gen 4 firmware 2417

 sound/usb/mixer_scarlett2.c | 222 ++++++++++++++++++++++++++++++------
 1 file changed, 188 insertions(+), 34 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-04-27 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-25 21:07 [PATCH 0/3] ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor on firmware 2417 Geoffrey D. Bennett
2026-04-25 21:16 ` [PATCH 1/3] ALSA: scarlett2: Allow selecting config_set by firmware version Geoffrey D. Bennett
2026-04-25 21:16 ` [PATCH 2/3] ALSA: scarlett2: Fold min_firmware_version into config_sets Geoffrey D. Bennett
2026-04-25 21:17 ` [PATCH 3/3] ALSA: scarlett2: Update offsets for 2i2 Gen 4 firmware 2417 Geoffrey D. Bennett
2026-04-27 12:20 ` [PATCH 0/3] ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor on " Takashi Iwai

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