Skip to content

Commit 1c4f29e

Browse files
marcanbroonie
authored andcommitted
ASoC: tas2764: Fix amp gain register offset & default
The register default is 0x28 per the datasheet, and the amp gain field is supposed to be shifted left by one. With the wrong default, the ALSA controls lie about the power-up state. With the wrong shift, we get only half the gain we expect. 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]>
1 parent 3e99e56 commit 1c4f29e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/tas2764.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ static DECLARE_TLV_DB_SCALE(tas2764_playback_volume, -10050, 50, 1);
541541
static const struct snd_kcontrol_new tas2764_snd_controls[] = {
542542
SOC_SINGLE_TLV("Speaker Volume", TAS2764_DVC, 0,
543543
TAS2764_DVC_MAX, 1, tas2764_playback_volume),
544-
SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0, 0, 0x14, 0,
544+
SOC_SINGLE_TLV("Amp Gain Volume", TAS2764_CHNL_0, 1, 0x14, 0,
545545
tas2764_digital_tlv),
546546
};
547547

@@ -566,7 +566,7 @@ static const struct reg_default tas2764_reg_defaults[] = {
566566
{ TAS2764_SW_RST, 0x00 },
567567
{ TAS2764_PWR_CTRL, 0x1a },
568568
{ TAS2764_DVC, 0x00 },
569-
{ TAS2764_CHNL_0, 0x00 },
569+
{ TAS2764_CHNL_0, 0x28 },
570570
{ TAS2764_TDM_CFG0, 0x09 },
571571
{ TAS2764_TDM_CFG1, 0x02 },
572572
{ TAS2764_TDM_CFG2, 0x0a },

0 commit comments

Comments
 (0)