Skip to content

Commit bce54f0

Browse files
hmbeddedpopcornmix
authored andcommitted
Use a range macro for Playback Volume.
This allows limiting the output gain to avoid clipping in the DAC ouput stages.
1 parent 6808787 commit bce54f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎sound/soc/codecs/pcm512x.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ static const struct soc_enum pcm512x_veds =
240240
pcm512x_ramp_step_text);
241241

242242
static const struct snd_kcontrol_new pcm512x_controls[] = {
243-
SOC_DOUBLE_R_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2,
244-
PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv),
243+
SOC_DOUBLE_R_RANGE_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2,
244+
PCM512x_DIGITAL_VOLUME_3, 0, 48, 255, 1, digital_tlv),
245245
SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT,
246246
PCM512x_RQMR_SHIFT, 1, 1),
247247

0 commit comments

Comments
 (0)