Skip to content

ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor on firmware 2417

Geoffrey D. Bennett linux-sound 1 version Applied

Status from this message: Applied all to for-next branch now. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3ALSA: scarlett2: Allow selecting config_set by firmware versionsound/usb/mixer_scarlett2.c+121 -220 replies
2/3ALSA: scarlett2: Fold min_firmware_version into config_setssound/usb/mixer_scarlett2.c+9 -120 replies
3/3ALSA: scarlett2: Update offsets for 2i2 Gen 4 firmware 2417sound/usb/mixer_scarlett2.c+58 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor on firmware 2417

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(-)
Signature · 1 line
2.53.0