alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Kailang Yang <kailang@realtek.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH 1/1] ALSA: hda: fix jack detection with Realtek codecs when in D3
Date: Fri, 09 Oct 2020 16:44:43 +0200	[thread overview]
Message-ID: <s5hzh4vsbl0.wl-tiwai@suse.de> (raw)
In-Reply-To: <f1c3ff3f-8f7c-a82c-b03d-32369e32e395@linux.intel.com>

On Fri, 09 Oct 2020 16:38:05 +0200,
Pierre-Louis Bossart wrote:
> 
> 
> 
> On 10/9/20 9:02 AM, Kai Vehmanen wrote:
> > In case HDA controller is active, but codec is runtime suspended, jack
> > detection is not successful and no interrupt is raised. This has been
> > observed with multiple Realtek codecs and HDA controllers from different
> > vendors. Bug does not occur if both codec and controller are active,
> > or both are in suspend. Bug can be easily hit on desktop systems with
> > no built-in speaker.
> >
> > The problem can be fixed by powering up the codec once after every
> > controller runtime resume. Even if codec goes back to suspend, the jack
> > detection will now work. Add a flag to 'hda_codec' to describe codecs
> > that require this flow from the controller driver. Mark all Realtek
> > codecs with this flag.
> 
> It does make sense to request the codec to resume when the controller
> resumes, we did the same for SoundWire IIRC.
> 
> I am still confused on what happens if e.g. the controller resumes and
> remains active, e.g. capturing from the DMIC. The codec would become
> suspended after a while and then we would be back to the same problem,
> wouldn't we?
> 
> Or are you saying that this initial resume of the codec is enough?

When the controller is active and the codec goes to runtime suspend,
the codec will be woken up via the unsolicited event per jack change.
So it seems that the problem is only about the wake up from the
controller's runtime suspend.


thanks,

Takashi

  reply	other threads:[~2020-10-09 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 14:02 [PATCH 1/1] ALSA: hda: fix jack detection with Realtek codecs when in D3 Kai Vehmanen
2020-10-09 14:35 ` Takashi Iwai
2020-10-09 15:24   ` Kai Vehmanen
2020-10-09 14:38 ` Pierre-Louis Bossart
2020-10-09 14:44   ` Takashi Iwai [this message]
2020-10-09 15:00     ` Pierre-Louis Bossart

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=s5hzh4vsbl0.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kailang@realtek.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 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).