At Mon, 15 Apr 2013 12:50:02 +0200,
David Henningsson wrote:
>
> With this patch, a TRRS headset mic cannot be successfully detected
> on the Asus X101CH, and we can also distinguish between headphone
> and headset automatically.
>
> Buglink: https://bugs.launchpad.net/bugs/1169138
> Co-authored-by: Kailang <email address hidden>
> Tested-by: Luis Henriques <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>
> ---
>
> Now that we have better headset mic support infrastructure, I remembered I forgot
> to upstream this patch. It was originally provided by Realtek (therefore, I cannot
> answer for the msleeps and exactly why this is needed). I just rewrote it for the
> current kernel version.
Applied now , but I had to rebase again after applying your headset
mic patch. Please check whether it's OK later.
At Mon, 15 Apr 2013 12:50:02 +0200, /bugs.launchpad .net/bugs/ 1169138
David Henningsson wrote:
>
> With this patch, a TRRS headset mic cannot be successfully detected
> on the Asus X101CH, and we can also distinguish between headphone
> and headset automatically.
>
> Buglink: https:/
> Co-authored-by: Kailang <email address hidden>
> Tested-by: Luis Henriques <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>
> ---
>
> Now that we have better headset mic support infrastructure, I remembered I forgot
> to upstream this patch. It was originally provided by Realtek (therefore, I cannot
> answer for the msleeps and exactly why this is needed). I just rewrote it for the
> current kernel version.
Applied now , but I had to rebase again after applying your headset
mic patch. Please check whether it's OK later.
thanks,
Takashi
> hda/patch_ realtek. c | 56 +++++++ +++++++ +++++++ +++++++ +++++++ ++++++ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c fixup_quanta_ mute(struct hda_codec *codec, automute_ hook = alc269_ quanta_ automute; x101_hp_ automute_ hook(struct hda_codec *codec, gen_hp_ automute( codec, jack); hp_jack_ present ? PIN_VREF80 : 0; codec_write( codec, 0x18, 0, AC_VERB_ SET_PIN_ WIDGET_ CONTROL, codec_write( codec, 0x18, 0, AC_VERB_ SET_PIN_ WIDGET_ CONTROL, fixup_x101_ headset_ mic(struct hda_codec *codec, ACT_PRE_ PROBE) { HEADSET_ MIC; hp_automute_ hook = alc269_ x101_hp_ automute_ hook; fixup_mic_ mute_hook( void *private_data, int enabled) FIXUP_INV_ DMIC, FIXUP_LENOVO_ DOCK, FIXUP_PINCFG_ NO_HP_TO_ LINEOUT, FIXUP_ASUS_ X101_FUNC, FIXUP_ASUS_ X101_VERB, FIXUP_ASUS_ X101, FIXUP_AMIC_ MIC2, FIXUP_HP_ GATE_MIC_ JACK, FIXUP_ACER_ AC700, fixup_pincfg_ no_hp_to_ lineout, FIXUP_ASUS_ X101_FUNC] = { fixup_x101_ headset_ mic, FIXUP_ASUS_ X101_VERB] = { SET_PIN_ WIDGET_ CONTROL, 0}, SET_COEF_ INDEX, 0x08}, SET_PROC_ COEF, 0x0310}, FIXUP_ASUS_ X101_FUNC FIXUP_ASUS_ X101] = { FIXUP_ASUS_ X101_VERB FIXUP_AMIC_ MIC2] = { QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_ FIXUP_STEREO_ DMIC), QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_ FIXUP_ASUS_ X101), QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_ FIXUP_SONY_ VAIO_GPIO2) , QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_ FIXUP_SONY_ HWEQ), QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_ FIXUP_SONY_ HWEQ),
> sound/pci/
> 1 file changed, 56 insertions(+)
>
> diff --git a/sound/
> index 6cf27f5..1b7aed5 100644
> --- a/sound/
> +++ b/sound/
> @@ -2680,6 +2680,34 @@ static void alc269_
> spec->gen.
> }
>
> +static void alc269_
> + struct hda_jack_tbl *jack)
> +{
> + struct alc_spec *spec = codec->spec;
> + int vref;
> + msleep(200);
> + snd_hda_
> +
> + vref = spec->gen.
> + msleep(100);
> + snd_hda_
> + vref);
> + msleep(500);
> + snd_hda_
> + vref);
> +}
> +
> +static void alc269_
> + const struct hda_fixup *fix, int action)
> +{
> + struct alc_spec *spec = codec->spec;
> + if (action == HDA_FIXUP_
> + spec->parse_flags |= HDA_PINCFG_
> + spec->gen.
> + }
> +}
> +
> +
> /* update mute-LED according to the speaker mute state via mic VREF pin */
> static void alc269_
> {
> @@ -2837,6 +2865,9 @@ enum {
> ALC269_
> ALC269_
> ALC269_
> + ALC269_
> + ALC269_
> + ALC269_
> ALC271_
> ALC271_
> ALC269_
> @@ -2996,6 +3027,30 @@ static const struct hda_fixup alc269_fixups[] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc269_
> },
> + [ALC269_
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc269_
> + },
> + [ALC269_
> + .type = HDA_FIXUP_VERBS,
> + .v.verbs = (const struct hda_verb[]) {
> + {0x18, AC_VERB_
> + {0x20, AC_VERB_
> + {0x20, AC_VERB_
> + { }
> + },
> + .chained = true,
> + .chain_id = ALC269_
> + },
> + [ALC269_
> + .type = HDA_FIXUP_PINS,
> + .v.pins = (const struct hda_pintbl[]) {
> + { 0x18, 0x04a1182c }, /* Headset mic */
> + { }
> + },
> + .chained = true,
> + .chain_id = ALC269_
> + },
> [ALC271_
> .type = HDA_FIXUP_PINS,
> .v.pins = (const struct hda_pintbl[]) {
> @@ -3044,6 +3099,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> SND_PCI_
> SND_PCI_
> SND_PCI_
> + SND_PCI_
> SND_PCI_
> SND_PCI_
> SND_PCI_
> --
> 1.7.9.5
>