All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Hui Wang <hui.wang@canonical.com>
Cc: alsa-devel@alsa-project.org, Kai Vehmanen <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH] ALSA: hda: Always use jackpoll helper for jack update after resume
Date: Thu, 23 Apr 2020 08:57:58 +0200	[thread overview]
Message-ID: <s5h5zdqy9hl.wl-tiwai@suse.de> (raw)
In-Reply-To: <a9c9886b-9707-a4fe-639c-3b1b6a87723e@canonical.com>

On Thu, 23 Apr 2020 07:23:52 +0200,
Hui Wang wrote:
> 
> 
> On 2020/4/23 上午4:46, Takashi Iwai wrote:
> > On Wed, 22 Apr 2020 22:37:44 +0200,
> > Takashi Iwai wrote:
> >> HD-audio codec driver applies a tricky procedure to forcibly perform
> >> the runtime resume by mimicking the usage count even if the device has
> >> been runtime-suspended beforehand.  This was needed to assure to
> >> trigger the jack detection update after the system resume.
> >>
> >> And recently we also applied the similar logic to the HD-audio
> >> controller side.  However this seems leading to some inconsistency,
> >> and eventually PCI controller gets screwed up.
> >>
> >> This patch is an attempt to fix and clean up those behavior: instead
> >> of the tricky runtime resume procedure, the existing jackpoll work is
> >> scheduled when such a forced codec resume is required.  The jackpoll
> >> work will power up the codec, and this alone should suffice for the
> >> jack status update in usual cases.  If the extra polling is requested
> >> (by checking codec->jackpoll_interval), the manual update is invoked
> >> after that, and the codec is powered down again.
> >>
> >> Also, we filter the spurious wake up of the codec from the controller
> >> runtime resume by checking codec->relaxed_resume flag.  If this flag
> >> is set, basically we don't need to wake up explicitly, but it's
> >> supposed to be done via the audio component notifier.
> >>
> >> Fixes: c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not needed")
> >> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > Note that this patch discards the previous forced resume logic
> > introduced in commit b5a236c175b0
> >      ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
> >
> > So, Hui, could you check whether it still works for such a device?
> > Or at least tests with a few known working devices are helpful.
> 
> I tested the patch on the machine which has the detection issue of 
> "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec",
> the new patch worked well. The headphone could be detected after
> s3/s4.
> 
> And I don't have other machines at the moment since I worked at home
> recently, so only tested this patch on one machine, it worked well.

OK, thanks!


Takashi

  reply	other threads:[~2020-04-23  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 20:37 [PATCH] ALSA: hda: Always use jackpoll helper for jack update after resume Takashi Iwai
2020-04-22 20:46 ` Takashi Iwai
2020-04-23  5:23   ` Hui Wang
2020-04-23  6:57     ` Takashi Iwai [this message]
2020-04-23 10:02   ` Kai Vehmanen
2020-04-23 10:27     ` 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=s5h5zdqy9hl.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=hui.wang@canonical.com \
    --cc=kai.vehmanen@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.