|
174 | 174 | /* some gui mixers can't handle negative ctl values */
|
175 | 175 | #define SCARLETT2_VOLUME_BIAS 127
|
176 | 176 |
|
177 |
| -/* maximum preamp input gain */ |
178 |
| -#define SCARLETT2_MAX_GAIN 70 |
| 177 | +/* maximum preamp input gain and value |
| 178 | + * values are from 0 to 70, preamp gain is from 0 to 69 dB |
| 179 | + */ |
| 180 | +#define SCARLETT2_MAX_GAIN_VALUE 70 |
| 181 | +#define SCARLETT2_MAX_GAIN_DB 69 |
179 | 182 |
|
180 | 183 | /* mixer range from -80dB to +6dB in 0.5dB steps */
|
181 | 184 | #define SCARLETT2_MIXER_MIN_DB -80
|
@@ -3466,7 +3469,7 @@ static int scarlett2_input_gain_ctl_info(struct snd_kcontrol *kctl,
|
3466 | 3469 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
|
3467 | 3470 | uinfo->count = elem->channels;
|
3468 | 3471 | uinfo->value.integer.min = 0;
|
3469 |
| - uinfo->value.integer.max = SCARLETT2_MAX_GAIN; |
| 3472 | + uinfo->value.integer.max = SCARLETT2_MAX_GAIN_VALUE; |
3470 | 3473 | uinfo->value.integer.step = 1;
|
3471 | 3474 |
|
3472 | 3475 | unlock:
|
@@ -3543,7 +3546,7 @@ static int scarlett2_input_gain_ctl_put(struct snd_kcontrol *kctl,
|
3543 | 3546 | }
|
3544 | 3547 |
|
3545 | 3548 | static const DECLARE_TLV_DB_MINMAX(
|
3546 |
| - db_scale_scarlett2_gain, 0, SCARLETT2_MAX_GAIN * 100 |
| 3549 | + db_scale_scarlett2_gain, 0, SCARLETT2_MAX_GAIN_DB * 100 |
3547 | 3550 | );
|
3548 | 3551 |
|
3549 | 3552 | static const struct snd_kcontrol_new scarlett2_input_gain_ctl = {
|
|
0 commit comments