Skip to content

Commit

Permalink
ASoC: tas2764: Correct playback volume range
Browse files Browse the repository at this point in the history
DVC value 0xc8 is -100dB and 0xc9 is mute; this needs to map to
-100.5dB as far as the dB scale is concerned. Fix that and enable
the mute flag, so alsamixer correctly shows the control as
<0 dB .. -100 dB, mute>.

Signed-off-by: Hector Martin <[email protected]>
Fixes: 827ed8a ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
marcan authored and broonie committed Jul 7, 2022
1 parent d1a10f1 commit 3e99e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/tas2764.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static int tas2764_codec_probe(struct snd_soc_component *component)
}

static DECLARE_TLV_DB_SCALE(tas2764_digital_tlv, 1100, 50, 0);
static DECLARE_TLV_DB_SCALE(tas2764_playback_volume, -10000, 50, 0);
static DECLARE_TLV_DB_SCALE(tas2764_playback_volume, -10050, 50, 1);

static const struct snd_kcontrol_new tas2764_snd_controls[] = {
SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC, 0,
Expand Down

0 comments on commit 3e99e56

Please sign in to comment.