Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ae065d0

Browse files
soyersoyertiwai
authored andcommitted
ALSA: hda/tas2781: remove digital gain kcontrol
The "Speaker Digital Gain" kcontrol controls the TAS2781_DVC_LVL (0x1A) register. Unfortunately the tas2563 does not have DVC_LVL, but has INT_MASK0 in 0x1A, which has been misused so far. Since commit c1947ce ("ALSA: hda/realtek: tas2781: enable subwoofer volume control") the volume of the tas2781 amplifiers can be controlled by the master volume, so this digital gain kcontrol is not needed. Remove it. Fixes: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver") CC: [email protected] Signed-off-by: Gergo Koteles <[email protected]> Message-ID: <741fc21db994efd58f83e7aef38931204961e5b2.1711469583.git.soyer@irl.hu> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 7590ac2 commit ae065d0

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct tas2781_hda {
8989
struct snd_kcontrol *dsp_prog_ctl;
9090
struct snd_kcontrol *dsp_conf_ctl;
9191
struct snd_kcontrol *prof_ctl;
92-
struct snd_kcontrol *snd_ctls[3];
92+
struct snd_kcontrol *snd_ctls[2];
9393
};
9494

9595
static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data)
@@ -294,27 +294,6 @@ static int tasdevice_config_put(struct snd_kcontrol *kcontrol,
294294
return ret;
295295
}
296296

297-
/*
298-
* tas2781_digital_getvol - get the volum control
299-
* @kcontrol: control pointer
300-
* @ucontrol: User data
301-
* Customer Kcontrol for tas2781 is primarily for regmap booking, paging
302-
* depends on internal regmap mechanism.
303-
* tas2781 contains book and page two-level register map, especially
304-
* book switching will set the register BXXP00R7F, after switching to the
305-
* correct book, then leverage the mechanism for paging to access the
306-
* register.
307-
*/
308-
static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol,
309-
struct snd_ctl_elem_value *ucontrol)
310-
{
311-
struct tasdevice_priv *tas_priv = snd_kcontrol_chip(kcontrol);
312-
struct soc_mixer_control *mc =
313-
(struct soc_mixer_control *)kcontrol->private_value;
314-
315-
return tasdevice_digital_getvol(tas_priv, ucontrol, mc);
316-
}
317-
318297
static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
319298
struct snd_ctl_elem_value *ucontrol)
320299
{
@@ -325,17 +304,6 @@ static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
325304
return tasdevice_amp_getvol(tas_priv, ucontrol, mc);
326305
}
327306

328-
static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol,
329-
struct snd_ctl_elem_value *ucontrol)
330-
{
331-
struct tasdevice_priv *tas_priv = snd_kcontrol_chip(kcontrol);
332-
struct soc_mixer_control *mc =
333-
(struct soc_mixer_control *)kcontrol->private_value;
334-
335-
/* The check of the given value is in tasdevice_digital_putvol. */
336-
return tasdevice_digital_putvol(tas_priv, ucontrol, mc);
337-
}
338-
339307
static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol,
340308
struct snd_ctl_elem_value *ucontrol)
341309
{
@@ -381,9 +349,6 @@ static const struct snd_kcontrol_new tas2781_snd_controls[] = {
381349
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Analog Gain", TAS2781_AMP_LEVEL,
382350
1, 0, 20, 0, tas2781_amp_getvol,
383351
tas2781_amp_putvol, amp_vol_tlv),
384-
ACARD_SINGLE_RANGE_EXT_TLV("Speaker Digital Gain", TAS2781_DVC_LVL,
385-
0, 0, 200, 1, tas2781_digital_getvol,
386-
tas2781_digital_putvol, dvc_tlv),
387352
ACARD_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0,
388353
tas2781_force_fwload_get, tas2781_force_fwload_put),
389354
};

0 commit comments

Comments
 (0)