All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	bard.liao@intel.com
Subject: Re: [PATCH 2/4] soundwire: intel: skip suspend/resume/wake when link was not started
Date: Fri, 6 Aug 2021 10:57:12 -0500	[thread overview]
Message-ID: <3f466c92-37db-8fa3-ae98-70095aa60873@linux.intel.com> (raw)
In-Reply-To: <YQ04HOBucxNBXJkr@matsya>



On 8/6/21 8:24 AM, Vinod Koul wrote:
> On 02-08-21, 08:59, Pierre-Louis Bossart wrote:
>>
>>
>>
>>>> On some HDaudio platforms, SoundWire devices are described in the
>>>> DSDT but never used. This patch adds a boolean status flag to skip all
>>>> suspend/resume/wake sequences for this configuration.
>>>
>>> Why are the sdw devices created in this case then? I would assume you
>>> are detecting this configuration and should skip device creation?
>>
>> The SDW Linux devices are created during the probe step, based on
>> information extracted from platform firmware. Since we see a matching
>> driver, there will be a probe and that driver also contains pm ops.
>>
>> We only know if the physical peripherals described in ACPI are real or
>> not during the startup() phase. After the bus reset, SoundWire
>> peripherals will report as ATTACHED as Device0 and the enumeration starts.
>>
>> So in these HDaudio cases, we create the Linux devices based on
>> incorrect ACPI information, but since we detect an HDaudio configuration
>> we never start the links and the suspend-resume fails.
>>
>> For a bit of historical context, the decision to handle devices in this
>> way was not the original proposal from Intel. In the initial patches,
>> the Linux devices were created when their matching physical peripheral
>> was showing signs of activity and attached after synchronizing. We
>> modified this behavior so that a device driver could use out-of-band
>> signaling to power-up a peripheral so that it could attach. That wasn't
>> a bad idea, but that also exposes a number of 'ghost devices' that are
>> not real. And unfortunately the Intel BIOS reference keeps using those
>> invalid _ADR values...
>>
>> Does this answer to the question?
> 
> Yes it does thanks, very helpful.
> 
> Can we add this to the changelog, am sure down the line people might
> forget why it was added.

yes, will do.



  reply	other threads:[~2021-08-06 15:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  5:56 [PATCH 0/4] soundwire: intel: exit clock-stop mode before system suspend Bard Liao
2021-07-27  5:56 ` [PATCH 1/4] soundwire: intel: fix potential race condition during power down Bard Liao
2021-07-27  5:56 ` [PATCH 2/4] soundwire: intel: skip suspend/resume/wake when link was not started Bard Liao
2021-08-02  4:02   ` Vinod Koul
2021-08-02 13:59     ` Pierre-Louis Bossart
2021-08-06 13:24       ` Vinod Koul
2021-08-06 15:57         ` Pierre-Louis Bossart [this message]
2021-07-27  5:56 ` [PATCH 3/4] soundwire: intel: exit clock stop mode on system suspend Bard Liao
2021-08-02  4:31   ` Vinod Koul
2021-08-02 14:24     ` Pierre-Louis Bossart
2021-08-02 16:28       ` Pierre-Louis Bossart
2021-08-06 13:31         ` Vinod Koul
2021-08-06 16:03           ` Pierre-Louis Bossart
2021-07-27  5:56 ` [PATCH 4/4] soundwire: intel: simplify pm_runtime handling in suspend/resume Bard Liao

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=3f466c92-37db-8fa3-ae98-70095aa60873@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@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.