ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671
Quoted 7 lines · huangwenhui
Hi Takashi,
if adjusting the mixer element or replugging the headset, the headphone would be unmuted.
But most users hope that the default state is unmuted.
Should this unconditional unmute be required?
It's the standard behavior for most of ALSA drivers.
The initial mute state is rather controlled via alsactl, restoring the previous state. Also, the sound server like PulseAudio or pipewire does unmute automatically. If this doesn't work as expected, that's a more problem to diagnose.
Takashi
Quoted 69 lines
Thanks.
------------------ Original ------------------
From: "Takashi Iwai"<[email protected]>; Date: Thu, Mar 10, 2022 10:03 PM To: "黄文辉"<[email protected]>;Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu" <[email protected]>; "hui.wang"<[email protected]>; "wse" <[email protected]>; "cam"<[email protected]>; "kailang" <[email protected]>; "tanureal"<[email protected]>; "sami" <[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel" <[email protected]>;
Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671Quoted 6 lines · huangwenhui
Hi Takashi,
Thank you for your reply.
When booting with plugged headset, the headphone will be muted.
The muted state is the default behavior. Wouldn't it be unmuted if you adjust the corresponding mixer element?
Takashi
Quoted 37 lines
Thanks.
------------------ Original ------------------
From: "Takashi Iwai"<[email protected]>; Date: Thu, Mar 10, 2022 09:29 PM To: "huangwenhui"<[email protected]>;Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu" <[email protected]>; "hui.wang"<[email protected]>; "wse" <[email protected]>; "cam"<[email protected]>; "kailang" <[email protected]>; "tanureal"<[email protected]>; "sami" <[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel" <[email protected]>;
Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671Quoted 4 lines · huangwenhui
On a HP 288 Pro G8, the front Mic could not be detected.
Signed-off-by huangwenhui <[email protected]>Thanks for the patch. Most of the changes look OK, but one thing I still don't get:
Quoted 5 lines
+ case
HDA_FIXUP_ACT_INIT:
+alc_write_coef_idx(codec, 0x19, 0xa054);
+ msleep(80);
+ snd_hda_codec_write(codec,hp_pin, 0,
+AC_VERB_SET_AMP_GAIN_MUTE,AMP_OUT_UNMUTE);Why this unconditional unmute is required for fixing the mic problem?
Takashi
Hi Takashi,
if adjusting the mixer element or replugging the headset, the headphone would be unmuted. But most users hope that the default state is unmuted.
Should this unconditional unmute be required?
Thanks.
------------------ Original ------------------
From: "Takashi Iwai"<[email protected]>;
Date: Thu, Mar 10, 2022 10:03 PM
To: "黄文辉"<[email protected]>;
Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu"<[email protected]>; "hui.wang"<[email protected]>; "wse"<[email protected]>; "cam"<[email protected]>; "kailang"<[email protected]>; "tanureal"<[email protected]>; "sami"<[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel"<[email protected]>;
Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671
On Thu, 10 Mar 2022 14:58:36 +0100,
huangwenhui wrote:
>
> Hi Takashi,
>
> Thank you for your reply.
>
> When booting with plugged headset, the headphone will be muted.
The muted state is the default behavior. Wouldn't it be unmuted if you adjust the corresponding mixer element?
Takashi
>
> Thanks.
>
> ------------------ Original ------------------
> From: "Takashi Iwai"<[email protected]>;
> Date: Thu, Mar 10, 2022 09:29 PM
> To: "huangwenhui"<[email protected]>;
> Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu" > <[email protected]>; "hui.wang"<[email protected]>; "wse" > <[email protected]>; "cam"<[email protected]>; "kailang" > <[email protected]>; "tanureal"<[email protected]>; "sami" > <[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel" > <[email protected]>;
> Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP > machine with alc671
>
> On Thu, 10 Mar 2022 14:03:01 +0100,
> huangwenhui wrote:
> >
> > On a HP 288 Pro G8, the front Mic could not be detected.
> >
> > Signed-off-by: huangwenhui <[email protected]> >
> Thanks for the patch. Most of the changes look OK, but one thing I > still don't get:
>
> > + case HDA_FIXUP_ACT_INIT:
> > + alc_write_coef_idx(codec, 0x19, 0xa054);
> > + msleep(80);
> > + snd_hda_codec_write(codec, hp_pin, 0,
> > + AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); >
> Why this unconditional unmute is required for fixing the mic problem? >
> Takashi
>
>
I will modify the patch and commit again.
Thanks.
------------------ Original ------------------
From: "Takashi Iwai"<[email protected]>;
Date: Fri, Mar 11, 2022 04:30 PM
To: "huangwenhui"<[email protected]>;
Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu"<[email protected]>; "hui.wang"<[email protected]>; "wse"<[email protected]>; "cam"<[email protected]>; "kailang"<[email protected]>; "tanureal"<[email protected]>; "sami"<[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel"<[email protected]>;
Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671
On Fri, 11 Mar 2022 02:20:42 +0100,
huangwenhui wrote:
>
> Hi Takashi,
>
> if adjusting the mixer element or replugging the headset, the headphone would > be unmuted.
> But most users hope that the default state is unmuted.
> Should this unconditional unmute be required?
It's the standard behavior for most of ALSA drivers.
The initial mute state is rather controlled via alsactl, restoring the previous state. Also, the sound server like PulseAudio or pipewire does unmute automatically. If this doesn't work as expected, that's a more problem to diagnose.
Takashi
>
> Thanks.
>
> ------------------ Original ------------------
> From: "Takashi Iwai"<[email protected]>;
> Date: Thu, Mar 10, 2022 10:03 PM
> To: "huangwenhui"<[email protected]>;
> Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu" > <[email protected]>; "hui.wang"<[email protected]>; "wse" > <[email protected]>; "cam"<[email protected]>; "kailang" > <[email protected]>; "tanureal"<[email protected]>; "sami" > <[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel" > <[email protected]>;
> Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP > machine with alc671
>
> On Thu, 10 Mar 2022 14:58:36 +0100,
> huangwenhui wrote:
> >
> > Hi Takashi,
> >
> > Thank you for your reply.
> >
> > When booting with plugged headset, the headphone will be muted. >
> The muted state is the default behavior. Wouldn't it be unmuted if > you adjust the corresponding mixer element?
>
> Takashi
>
> >
> > Thanks.
> >
> > ------------------ Original ------------------
> > From: "Takashi Iwai"<[email protected]>;
> > Date: Thu, Mar 10, 2022 09:29 PM
> > To: "huangwenhui"<[email protected]>;
> > Cc: "perex"<[email protected]>; "tiwai"<[email protected]>; "jeremy.szu" > > <[email protected]>; "hui.wang"<[email protected]>; "wse" > > <[email protected]>; "cam"<[email protected]>; "kailang" > > <[email protected]>; "tanureal"<[email protected]>; "sami" > > <[email protected]>; "alsa-devel"<[email protected]>; "linux-kernel" > > <[email protected]>;
> > Subject: Re: [PATCH] ALSA: hda/realtek - Fix headset mic problem for a HP > > machine with alc671
> >
> > On Thu, 10 Mar 2022 14:03:01 +0100,
> > huangwenhui wrote:
> > >
> > > On a HP 288 Pro G8, the front Mic could not be detected. > > >
> > > Signed-off-by: huangwenhui <[email protected]> > >
> > Thanks for the patch. Most of the changes look OK, but one thing I > > still don't get:
> >
> > > + case HDA_FIXUP_ACT_INIT:
> > > + alc_write_coef_idx(codec, 0x19, 0xa054);
> > > + msleep(80);
> > > + snd_hda_codec_write(codec, hp_pin, 0,
> > > + AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); > >
> > Why this unconditional unmute is required for fixing the mic problem? > >
> > Takashi
> >
> >
>
>