These are being reported as being so noisy at high mic boost levels, so they are unusable in practice. Therefore artificially limit the boosts.
BugLink: https://bugs.launchpad.net/bugs/1089795 Signed-off-by: David Henningsson <email address hidden> --- sound/pci/hda/patch_realtek.c | 42 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 28b3f5a..6e5d383 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3156,6 +3156,38 @@ static void alc271_hp_gate_mic_jack(struct hda_codec *codec, } }
+static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, + const struct hda_fixup *fix, + int action) +{ + struct alc_spec *spec = codec->spec; + struct auto_pin_cfg *cfg = &spec->gen.autocfg; + int i; + + /* The mic boosts on level 2 and 3 are too noisy + on the internal mic input. + Therefore limit the boost to 0 or 1. */ + + if (action != HDA_FIXUP_ACT_PROBE) + return; + + for (i = 0; i < cfg->num_inputs; i++) { + hda_nid_t nid = cfg->inputs[i].pin; + unsigned int defcfg; + if (cfg->inputs[i].type != AUTO_PIN_MIC) + continue; + defcfg = snd_hda_codec_get_pincfg(codec, nid); + if (snd_hda_get_input_pin_attr(defcfg) != INPUT_PIN_ATTR_INT) + continue; + + snd_hda_override_amp_caps(codec, nid, HDA_INPUT, + (0x00 << AC_AMPCAP_OFFSET_SHIFT) | + (0x01 << AC_AMPCAP_NUM_STEPS_SHIFT) | + (0x2f << AC_AMPCAP_STEP_SIZE_SHIFT) | + (0 << AC_AMPCAP_MUTE_SHIFT)); + } +} + enum { ALC269_FIXUP_SONY_VAIO, ALC275_FIXUP_SONY_VAIO_GPIO2, @@ -3190,6 +3222,7 @@ enum { ALC271_FIXUP_AMIC_MIC2, ALC271_FIXUP_HP_GATE_MIC_JACK, ALC269_FIXUP_ACER_AC700, + ALC269_FIXUP_LIMIT_INT_MIC_BOOST, };
static const struct hda_fixup alc269_fixups[] = { @@ -3428,6 +3461,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC271_FIXUP_DMIC, }, + [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc269_fixup_limit_int_mic_boost, + }, };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -3458,11 +3495,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { 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_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), SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), + SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), - SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), -- 1.7.9.5
These are being reported as being so noisy at high mic boost levels,
so they are unusable in practice.
Therefore artificially limit the boosts.
BugLink: https:/ /bugs.launchpad .net/bugs/ 1089795 pci/hda/ patch_realtek. c | 42 +++++++ +++++++ +++++++ +++++++ +++++++ +++++-
Signed-off-by: David Henningsson <email address hidden>
---
sound/
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c hp_gate_ mic_jack( struct hda_codec *codec,
index 28b3f5a..6e5d383 100644
--- a/sound/
+++ b/sound/
@@ -3156,6 +3156,38 @@ static void alc271_
}
}
+static void alc269_ fixup_limit_ int_mic_ boost(struct hda_codec *codec, ACT_PROBE) i].type != AUTO_PIN_MIC) codec_get_ pincfg( codec, nid); get_input_ pin_attr( defcfg) != INPUT_PIN_ATTR_INT) override_ amp_caps( codec, nid, HDA_INPUT, OFFSET_ SHIFT) | NUM_STEPS_ SHIFT) | STEP_SIZE_ SHIFT) | MUTE_SHIFT) ); FIXUP_SONY_ VAIO, FIXUP_SONY_ VAIO_GPIO2, FIXUP_AMIC_ MIC2, FIXUP_HP_ GATE_MIC_ JACK, FIXUP_ACER_ AC700, FIXUP_LIMIT_ INT_MIC_ BOOST,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ struct auto_pin_cfg *cfg = &spec->gen.autocfg;
+ int i;
+
+ /* The mic boosts on level 2 and 3 are too noisy
+ on the internal mic input.
+ Therefore limit the boost to 0 or 1. */
+
+ if (action != HDA_FIXUP_
+ return;
+
+ for (i = 0; i < cfg->num_inputs; i++) {
+ hda_nid_t nid = cfg->inputs[i].pin;
+ unsigned int defcfg;
+ if (cfg->inputs[
+ continue;
+ defcfg = snd_hda_
+ if (snd_hda_
+ continue;
+
+ snd_hda_
+ (0x00 << AC_AMPCAP_
+ (0x01 << AC_AMPCAP_
+ (0x2f << AC_AMPCAP_
+ (0 << AC_AMPCAP_
+ }
+}
+
enum {
ALC269_
ALC275_
@@ -3190,6 +3222,7 @@ enum {
ALC271_
ALC271_
ALC269_
+ ALC269_
};
static const struct hda_fixup alc269_fixups[] = { FIXUP_LIMIT_ INT_MIC_ BOOST] = { fixup_limit_ int_mic_ boost,
@@ -3428,6 +3461,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC271_FIXUP_DMIC,
},
+ [ALC269_
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc269_
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = { QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_ FIXUP_HP_ MUTE_LED_ MIC1), QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_ FIXUP_HP_ MUTE_LED_ MIC1), QUIRK_VENDOR( 0x103c, "HP", ALC269_ FIXUP_HP_ MUTE_LED) , QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_ FIXUP_LIMIT_ INT_MIC_ BOOST), QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_ FIXUP_LIMIT_ INT_MIC_ BOOST), QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_ FIXUP_DMIC) , QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_ FIXUP_DMIC) , QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_ FIXUP_ASUS_ G73JW), QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_ FIXUP_INV_ DMIC), QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_ FIXUP_LIMIT_ INT_MIC_ BOOST), QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_ FIXUP_STEREO_ DMIC),
@@ -3458,11 +3495,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_
SND_PCI_
SND_PCI_
+ SND_PCI_
+ SND_PCI_
SND_PCI_
SND_PCI_
+ SND_PCI_
SND_PCI_
SND_PCI_
- SND_PCI_
+ SND_PCI_
SND_PCI_
SND_PCI_
SND_PCI_
--
1.7.9.5