Skip to content

Commit 5dc50b1

Browse files
jimxbj-dottiwai
authored andcommitted
ALSA: hda: Fix the wrong register was used for DVC of TAS2770
The wrong register was used for digital volume control of TAS2770, The definition was changed, and usage was also updated. Fixes: ab29b34 ("ALSA: hda: Add TAS2770 support") Signed-off-by: Baojun Xu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent d35cdd6 commit 5dc50b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/sound/tas2770-tlv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#ifndef __TAS2770_TLV_H__
1515
#define __TAS2770_TLV_H__
1616

17-
#define TAS2770_DVC_LEVEL TASDEVICE_REG(0x0, 0x0, 0x17)
17+
#define TAS2770_DVC_LEVEL TASDEVICE_REG(0x0, 0x0, 0x05)
1818
#define TAS2770_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x03)
1919

20-
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_dvc_tlv, 1650, 50, 0);
20+
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_dvc_tlv, -10000, 50, 0);
2121
static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2770_amp_tlv, 1100, 50, 0);
2222

2323
#endif

sound/hda/codecs/side-codecs/tas2781_hda_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static const struct snd_kcontrol_new tas2770_snd_controls[] = {
260260
0, 0, 20, 0, tas2781_amp_getvol,
261261
tas2781_amp_putvol, tas2770_amp_tlv),
262262
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2770_DVC_LEVEL,
263-
0, 0, 31, 0, tas2781_amp_getvol,
263+
0, 0, 200, 1, tas2781_amp_getvol,
264264
tas2781_amp_putvol, tas2770_dvc_tlv),
265265
};
266266

0 commit comments

Comments
 (0)