mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 19:41:54 +00:00
ALSA: hda - Add workarounds for pop-noise on Chromebook with ALC283
The headphone automute on this machine triggers annoying pop noises. It seems that only the first DAC can be used, the secondary DAC always results in this problem. This patch disables the secondary DAC with a few additional workarounds. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2af02be71a
commit
cd217a6395
@ -3394,6 +3394,45 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
static void alc283_hp_automute_hook(struct hda_codec *codec,
|
||||
struct hda_jack_tbl *jack)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
int vref;
|
||||
|
||||
msleep(200);
|
||||
snd_hda_gen_hp_automute(codec, jack);
|
||||
|
||||
vref = spec->gen.hp_jack_present ? PIN_VREF80 : 0;
|
||||
|
||||
msleep(600);
|
||||
snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
|
||||
vref);
|
||||
}
|
||||
|
||||
static void alc283_chromebook_caps(struct hda_codec *codec)
|
||||
{
|
||||
snd_hda_override_wcaps(codec, 0x03, 0);
|
||||
}
|
||||
|
||||
static void alc283_fixup_chromebook(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
int val;
|
||||
|
||||
switch (action) {
|
||||
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||
alc283_chromebook_caps(codec);
|
||||
spec->gen.hp_automute_hook = alc283_hp_automute_hook;
|
||||
/* MIC2-VREF control */
|
||||
/* Set to manual mode */
|
||||
val = alc_read_coef_idx(codec, 0x06);
|
||||
alc_write_coef_idx(codec, 0x06, val & ~0x000c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
enum {
|
||||
ALC269_FIXUP_SONY_VAIO,
|
||||
ALC275_FIXUP_SONY_VAIO_GPIO2,
|
||||
@ -3430,6 +3469,7 @@ enum {
|
||||
ALC269_FIXUP_ACER_AC700,
|
||||
ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
|
||||
ALC269VB_FIXUP_ORDISSIMO_EVE2,
|
||||
ALC283_FIXUP_CHROME_BOOK,
|
||||
};
|
||||
|
||||
static const struct hda_fixup alc269_fixups[] = {
|
||||
@ -3681,6 +3721,10 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
{ }
|
||||
},
|
||||
},
|
||||
[ALC283_FIXUP_CHROME_BOOK] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc283_fixup_chromebook,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
@ -3728,6 +3772,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
|
||||
SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
|
||||
SND_PCI_QUIRK(0x103c, 0x21ed, "HP Falco Chromebook", ALC283_FIXUP_CHROME_BOOK),
|
||||
SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
|
||||
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||
SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
|
||||
|
Loading…
Reference in New Issue
Block a user