From: Takashi Iwai <tiwai@suse.de>
To: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: alsa-devel@alsa-project.org, Chris Chiu <chiu@endlessm.com>,
Hui Wang <hui.wang@canonical.com>,
Jian-Hong Pan <jian-hong@endlessm.com>,
Daniel Drake <drake@endlessm.com>
Subject: Re: [alsa-devel] RfC / [PATCH] Jack sense support for Medion E4254
Date: Mon, 16 Sep 2019 23:55:50 +0200 [thread overview]
Message-ID: <s5hd0fzykgp.wl-tiwai@suse.de> (raw)
In-Reply-To: <8f4f9b20-0aeb-f8f1-c02f-fd53c09679f1@fbihome.de>
On Mon, 16 Sep 2019 10:38:07 +0200,
Jan-Marek Glogowski wrote:
>
> Hi everybody,
>
> I recently bought the laptop. It has one jack for attaching a headset. Jack
> sense is announced by the HDA config but not working. Except for some
> positioning, and color information, the PIN config seemed to be sensible, and
> everything I tried to override, didn't result in a working jack.
>
> Manually unmuting the jack using hda-analyser resulted in working output, so
> generally the config seemed to work.
>
> Reading the patch-realtek code, if found ALC256_FIXUP_ASUS_HEADSET_MODE, which
> somehow changed the pin 0x19 to be associated with the 0x21 headset out pin,
> resulting in this dmesg change:
>
> -snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
> +snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19
What are the initial pin config values for these?
> And for whatever reason jack sense is now working, at least for some normal
> output-only headset (currently I don't have one included a mic with me, so
> actually can't test that mic volume works correctly).
>
> I was just wondering, if my pin values are actually correct, because they still
> define different association, as I understand it, but the ASUS fix even works
> with these wrong channels /associations 2 and 4.
>
> So the attached patch works for me, but I'm still wondering, if this is the
> correct solution. FWIW, jack sense works fine in Windows.
>
> Anything I might be missing here?
I don't think anything wrong here, as long as your quirk actually
works. I can double-check if I get alsa-info.sh output (run with
--no-upload option) with hda-emu, too.
thanks,
Takashi
>
> Jan-Marek
>
> -------
>
> >From 0ccc5f07d8737690bd2df6d88a5af0f1f36d0e40 Mon Sep 17 00:00:00 2001
> From: Jan-Marek Glogowski <glogow@fbihome.de>
> Date: Sun, 15 Sep 2019 16:57:28 +0200
> Subject: [PATCH] ALSA: hda/realtek: PCI quirk for Medion E4254
>
> The laptop has a combined jack to attach headsets on the right.
> The BIOS encodes them as two different colored jacks at the front,
> but otherwise it seems to be configured ok. But any adaption of
> the pins config on its own doesn't fix the jack detection to work
> in Linux. Still Windows works correct.
>
> This is somehow fixed by chaining ALC256_FIXUP_ASUS_HEADSET_MODE,
> which seems to register the microphone jack as a headset part and
> also results in fixing jack sensing, visible in dmesg as:
>
> -snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
> +snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19
>
> Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
> ---
> sound/pci/hda/patch_realtek.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index c1ddfd2fac52..448e0146dab2 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5800,6 +5800,7 @@ enum {
> ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
> ALC299_FIXUP_PREDATOR_SPK,
> ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
> + ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
> };
>
> static const struct hda_fixup alc269_fixups[] = {
> @@ -6850,6 +6851,16 @@ static const struct hda_fixup alc269_fixups[] = {
> .chained = true,
> .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
> },
> + [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
> + .type = HDA_FIXUP_PINS,
> + .v.pins = (const struct hda_pintbl[]) {
> + { 0x19, 0x04a11040 },
> + { 0x21, 0x04211020 },
> + { }
> + },
> + .chained = true,
> + .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
> + },
> };
>
> static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -7113,6 +7124,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
> SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
> SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
> + SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
>
> #if 0
> /* Below is a quirk table taken from the old code.
> @@ -7280,6 +7292,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
> {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"},
> {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
> {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
> + {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
> {}
> };
> #define ALC225_STANDARD_PINS \
> --
> 2.20.1
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-09-16 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 8:38 [alsa-devel] RfC / [PATCH] Jack sense support for Medion E4254 Jan-Marek Glogowski
2019-09-16 21:55 ` Takashi Iwai [this message]
2019-09-17 10:18 ` Jan-Marek Glogowski
2019-09-20 8:08 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hd0fzykgp.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=chiu@endlessm.com \
--cc=drake@endlessm.com \
--cc=glogow@fbihome.de \
--cc=hui.wang@canonical.com \
--cc=jian-hong@endlessm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox