linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: wangdich9700@163.com
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, cezary.rojewski@intel.com,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	wangdicheng <wangdicheng@kylinos.cn>
Subject: Re: [PATCH V2] ALSA: hda/conexant: Implement resume function
Date: Wed, 19 Nov 2025 10:02:01 +0100	[thread overview]
Message-ID: <87o6oycs52.wl-tiwai@suse.de> (raw)
In-Reply-To: <20251119085345.141850-1-wangdich9700@163.com>

On Wed, 19 Nov 2025 09:53:45 +0100,
wangdich9700@163.com wrote:
> 
> From: wangdicheng <wangdicheng@kylinos.cn>
> 
> During S3 sleep state, if headphones are unplugged, we need to re-report
> their status during the wake phase to ensure proper headphone presence
> detection after system resume.
> 
> Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
> ---
> 
> v1->v2:
> Problem: No audio output device after S3.
> Cause: The audio driver misses re-initialization upon resume,
> resulting in stale jack status (remaining in the pre-sleep state),
> which prevents the system from finding the correct output device.

Again, please double-check what is the really cause.

snd_hda_jack_report_sync() *is* called already in
hda_call_codec_resume().  So snd_hda_jack_report_sync() is just called
twice with your patch, which must be superfluous.

The other significant difference with your patch is that you dropped
snd_hda_regmap_sync().  So it must break something else.


Takashi

> 
>  sound/hda/codecs/conexant.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/hda/codecs/conexant.c b/sound/hda/codecs/conexant.c
> index 5fcbc1312c69..146ff65ccc30 100644
> --- a/sound/hda/codecs/conexant.c
> +++ b/sound/hda/codecs/conexant.c
> @@ -264,6 +264,13 @@ static int cx_suspend(struct hda_codec *codec)
>  	return 0;
>  }
>  
> +static int cx_resume(struct hda_codec *codec)
> +{
> +	cx_init(codec);
> +	snd_hda_jack_report_sync(codec);
> +	return 0;
> +}
> +
>  /*
>   * pin fix-up
>   */
> @@ -1277,6 +1284,7 @@ static const struct hda_codec_ops cx_codec_ops = {
>  	.init = cx_init,
>  	.unsol_event = snd_hda_jack_unsol_event,
>  	.suspend = cx_suspend,
> +	.resume = cx_resume,
>  	.check_power_status = snd_hda_gen_check_power_status,
>  	.stream_pm = snd_hda_gen_stream_pm,
>  };
> -- 
> 2.25.1
> 


      reply	other threads:[~2025-11-19  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19  8:53 [PATCH V2] ALSA: hda/conexant: Implement resume function wangdich9700
2025-11-19  9:02 ` Takashi Iwai [this message]

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=87o6oycs52.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=wangdich9700@163.com \
    --cc=wangdicheng@kylinos.cn \
    /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;
as well as URLs for NNTP newsgroup(s).