diff options
| author | Takashi Iwai <tiwai@suse.de> | 2026-05-26 07:49:22 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-05-26 08:00:51 +0200 |
| commit | dd1bfaf9413e9c8a0fcfb45dcb735c6768a45251 (patch) | |
| tree | 7ce07d9fca062f3d8d889bf43a16564b3ec01ef4 /sound | |
| parent | 3fcc84f1f8d28cc1966b859cef33c858ff531766 (diff) | |
| download | linux-next-history-dd1bfaf9413e9c8a0fcfb45dcb735c6768a45251.tar.gz | |
Revert "ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor gain on firmware 2417"
This reverts commit db37cf47b67e38ade40de5cd74a4d4d772ff1416.
The fix was needed only for 7.1, while 7.2 devel branch already
received a better fix series (732a6397a526..a895279d060d), hence it's
superfluous.
Link: https://lore.kernel.org/ahUytAir51SvJjd7@m.b4.vu
Link: https://patch.msgid.link/20260526054923.210493-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/usb/mixer_scarlett2.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c index 20fdf52f62129..78fb72e626cac 100644 --- a/sound/usb/mixer_scarlett2.c +++ b/sound/usb/mixer_scarlett2.c @@ -2737,27 +2737,6 @@ static int scarlett2_has_config_item( return !!private->config_set->items[config_item_num].offset; } -/* Return the configuration item's offset, applying any per-firmware - * overrides. - * - * Firmware 2417 for the 2i2 Gen 4 moved DIRECT_MONITOR_GAIN by 4 - * bytes. Apply that shift here so that the rest of the driver can - * keep using the single config set. This override can be removed - * once the multi-config-set framework lands. - */ -static int scarlett2_config_item_offset( - struct scarlett2_data *private, int config_item_num) -{ - int offset = private->config_set->items[config_item_num].offset; - - if (config_item_num == SCARLETT2_CONFIG_DIRECT_MONITOR_GAIN && - private->info == &s2i2_gen4_info && - private->firmware_version >= 2417) - offset = 0x2a4; - - return offset; -} - /* Send a USB message to get configuration parameters; result placed in *buf */ static int scarlett2_usb_get_config( struct usb_mixer_interface *mixer, @@ -2767,7 +2746,6 @@ static int scarlett2_usb_get_config( const struct scarlett2_config *config_item = &private->config_set->items[config_item_num]; int size, err, i; - int item_offset; u8 *buf_8; u8 value; @@ -2777,15 +2755,13 @@ static int scarlett2_usb_get_config( if (!config_item->offset) return -EFAULT; - item_offset = scarlett2_config_item_offset(private, config_item_num); - /* Writes to the parameter buffer are always 1 byte */ size = config_item->size ? config_item->size : 8; /* For byte-sized parameters, retrieve directly into buf */ if (size >= 8) { size = size / 8 * count; - err = scarlett2_usb_get(mixer, item_offset, buf, size); + err = scarlett2_usb_get(mixer, config_item->offset, buf, size); if (err < 0) return err; if (config_item->size == 16) { @@ -2803,7 +2779,7 @@ static int scarlett2_usb_get_config( } /* For bit-sized parameters, retrieve into value */ - err = scarlett2_usb_get(mixer, item_offset, &value, 1); + err = scarlett2_usb_get(mixer, config_item->offset, &value, 1); if (err < 0) return err; @@ -2953,8 +2929,7 @@ static int scarlett2_usb_set_config( */ if (config_item->size >= 8) { size = config_item->size / 8; - offset = scarlett2_config_item_offset(private, config_item_num) + - index * size; + offset = config_item->offset + index * size; /* If updating a bit, retrieve the old value, set/clear the * bit as needed, and update value @@ -2963,7 +2938,7 @@ static int scarlett2_usb_set_config( u8 tmp; size = 1; - offset = scarlett2_config_item_offset(private, config_item_num); + offset = config_item->offset; err = scarlett2_usb_get(mixer, offset, &tmp, 1); if (err < 0) |
