Linux Sound subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Salih Efe Ergür" <mail@salihefee.com.tr>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/realtek: Fix headset microphone on ASUS UM5606WA
Date: Sat, 05 Dec 2026 16:24:52 +0000	[thread overview]
Message-ID: <sashiko-outbox-251743@kernel.org> (raw)
In-Reply-To: <20261205160945.89431-1-mail@salihefee.com.tr>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] ALSA: hda/realtek: COEF 0x45 clobbered on init/runtime resume
  on UM5606WA
- [Low] ALSA: hda/realtek: inaccurate Fixes tag citing bass speaker
  commit
--

commit b88eaaba6dd8749eb30f3b295c901aa2770ea479
Author: Salih Efe Ergür <mail@salihefee.com.tr>

> ALSA: hda/realtek: Fix headset microphone on ASUS UM5606WA
>
> The ASUS Zenbook S 16 UM5606WA (1043:1df3) uses an ALC294 codec, but
> its existing fixup only handles speaker routing. The headset microphone
> does not work with the default configuration. Retasking the microphone
> pin alone exposes an input but produces only static.
>
> Add a board-specific fixup that combines the existing headset microphone
> initialization with full headset-mode handling. Chain the existing bass
> speaker fixup to preserve speaker routing, and restrict the new fixup to
> the UM5606WA subsystem ID.
>
> Tested on an ASUS UM5606WA with Linux 7.4-rc5: headset recording and
> automatic switching between headset and internal microphones work.
>
> Fixes: a7df7f909cec ("ALSA: hda: improve bass speaker support for ASUS Zenbook UM5606WA")
> Signed-off-by: Salih Efe Ergür <mail@salihefee.com.tr>

[Severity: Low]
Should the Fixes tag be dropped?  Commit a7df7f909cec ("ALSA: hda: improve
bass speaker support for ASUS Zenbook UM5606WA") only added speaker DAC
routing for 1043:1df3 and did not introduce a headset mic regression.

If stable backporting is desired, Cc: stable@vger.kernel.org can be used
instead.

> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index f874eb7822954..d405780530709 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -3987,6 +3987,15 @@ static void alc2xx_fixup_headset_mic(struct hda_codec *codec,
>  	}
>  }
>  
> +/* Enable headset mode while preserving UM5606WA speaker routing. */
> +static void alc294_fixup_um5606wa_headset_mode(struct hda_codec *codec,
> +					       const struct hda_fixup *fix,
> +					       int action)
> +{
> +	alc2xx_fixup_headset_mic(codec, fix, action);
> +	alc_fixup_headset_mode_no_hp_mic(codec, fix, action);
> +}
> +
>  static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec,
>  					  const struct hda_fixup *fix, int action)
>  {

[Severity: High]
Does calling both alc2xx_fixup_headset_mic() and
alc_fixup_headset_mode_no_hp_mic() clobber coef 0x45 on runtime PM resume?

On runtime PM resume (alc269_resume() -> alc_init()) with a headset
connected, spec->current_headset_mode already holds the active mode when
HDA_FIXUP_ACT_INIT runs.  alc2xx_fixup_headset_mic() unconditionally
overwrites coef 0x45 to 0x5289 and calls alc_combo_jack_hp_jd_restart().

alc_fixup_headset_mode() only resets spec->current_headset_mode on S3/S4
resume, not on runtime PM resume or cold boot.  alc_update_headset_mode()
then returns early without rewriting coef 0x45, leaving the headset broken
until the jack is replugged or the capture mux changes.

Also, because power_state.event remains PM_EVENT_ON during runtime resume,
the unsolicited event from alc_combo_jack_hp_jd_restart() is not filtered
by hda_codec_unsol_event() and can invoke alc_update_headset_mode() on
bus->unsol_work concurrently with alc_init().

Applying only the pin 0x19 pincfg override ({ 0x19, 0x03a1103c }) at
HDA_FIXUP_ACT_PRE_PROBE alongside alc_fixup_headset_mode_no_hp_mic()
avoids this conflict.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205160945.89431-1-mail@salihefee.com.tr?part=1

  reply	other threads:[~2026-12-05 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 16:09 [PATCH] ALSA: hda/realtek: Fix headset microphone on ASUS UM5606WA Salih Efe Ergür
2026-12-05 16:24 ` sashiko-bot [this message]
2026-12-05 18:41 ` [PATCH v2] " Salih Efe Ergür

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=sashiko-outbox-251743@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mail@salihefee.com.tr \
    --cc=sashiko-reviews@lists.linux.dev \
    /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