All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com
Subject: Re: [PATCH v2] ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume
Date: Fri, 16 Apr 2021 16:03:40 +0200	[thread overview]
Message-ID: <s5ho8eegwcj.wl-tiwai@suse.de> (raw)
In-Reply-To: <20210416131157.1881366-1-kai.vehmanen@linux.intel.com>

On Fri, 16 Apr 2021 15:11:57 +0200,
Kai Vehmanen wrote:
> 
> When snd-hda-codec-hdmi is used with ASoC HDA controller like SOF (acomp
> used for ELD notifications), display connection change done during suspend,
> can be lost due to following sequence of events:
> 
>   1. system in S3 suspend
>   2. DP/HDMI receiver connected
>   3. system resumed
>   4. HDA controller resumed, but card->deferred_resume_work not complete
>   5. acomp eld_notify callback
>   6. eld_notify ignored as power state is not CTL_POWER_D0
>   7. HDA resume deferred work completed, power state set to CTL_POWER_D0
> 
> This results in losing the notification, and the jack state reported to
> user-space is not correct.
> 
> The check on step 6 was added in commit 8ae743e82f0b ("ALSA: hda - Skip
> ELD notification during system suspend"). It would seem with the deferred
> resume logic in ASoC core, this check is not safe.
> 
> Fix the issue by modifying the check to use "dev.power.power_state.event"
> instead of ALSA specific card power state variable.
> 
> BugLink: https://github.com/thesofproject/linux/issues/2825
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Thanks, applied now.


Takashi

      reply	other threads:[~2021-04-16 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 13:11 [PATCH v2] ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume Kai Vehmanen
2021-04-16 14:03 ` 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=s5ho8eegwcj.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.