Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: scarlett2: Fix Scarlett 4th Gen input gain range

The input gain range TLV was declared as -70dB to 0dB, but the preamp
gain range is actually 0dB to +70dB. Rename SCARLETT2_GAIN_BIAS to
SCARLETT2_MAX_GAIN and update the TLV to fix.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Fixes: 0a995e38dc44 ("ALSA: scarlett2: Add support for software-controllable input gain")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <9168317b5ac5335943d3f14dbcd1cc2d9b2299d0.1710047969.git.g@b4.vu>

authored by

Geoffrey D. Bennett and committed by
Takashi Iwai
a45cf0a0 be157c46

+5 -3
+5 -3
sound/usb/mixer_scarlett2.c
··· 173 173 174 174 /* some gui mixers can't handle negative ctl values */ 175 175 #define SCARLETT2_VOLUME_BIAS 127 176 - #define SCARLETT2_GAIN_BIAS 70 176 + 177 + /* maximum preamp input gain */ 178 + #define SCARLETT2_MAX_GAIN 70 177 179 178 180 /* mixer range from -80dB to +6dB in 0.5dB steps */ 179 181 #define SCARLETT2_MIXER_MIN_DB -80 ··· 3466 3464 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 3467 3465 uinfo->count = elem->channels; 3468 3466 uinfo->value.integer.min = 0; 3469 - uinfo->value.integer.max = SCARLETT2_GAIN_BIAS; 3467 + uinfo->value.integer.max = SCARLETT2_MAX_GAIN; 3470 3468 uinfo->value.integer.step = 1; 3471 3469 3472 3470 unlock: ··· 3543 3541 } 3544 3542 3545 3543 static const DECLARE_TLV_DB_MINMAX( 3546 - db_scale_scarlett2_gain, -SCARLETT2_GAIN_BIAS * 100, 0 3544 + db_scale_scarlett2_gain, 0, SCARLETT2_MAX_GAIN * 100 3547 3545 ); 3548 3546 3549 3547 static const struct snd_kcontrol_new scarlett2_input_gain_ctl = {