From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
linux-sound@vger.kernel.org, vkoul@kernel.org,
broonie@kernel.org, tiwai@suse.de
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
peter.ujfalusi@linux.intel.com, bard.liao@intel.com
Subject: Re: [PATCH 0/3] ASoC/soundwire: remove ghost peripherals from the mach table
Date: Tue, 15 Sep 2026 21:08:35 +0200 [thread overview]
Message-ID: <528a9777-1587-4dfc-a366-000fc0867d4b@linux.dev> (raw)
In-Reply-To: <20260915131327.1783551-1-yung-chuan.liao@linux.intel.com>
On 9/15/26 15:13, Bard Liao wrote:
> ACPI may report a ghost SoundWire peripheral. It will cause unexpected
> error like duplicated links, codec driver can't probe, etc. This series
> check the presence of SoundWire peripherals and skip the non-existing
> peripherals.
I am afraid this raises quite a few opens, such as the 'mockup' support
and delayed enumeration.
A better way to only deal with actual codecs would be to only probe
codec drivers when the codecs report as ATTACHED and get enumerated,
instead of during the ACPI parsing stage.
This is a solution that was discussed a ong time ago, probably circa
2016, during one of the LPC miniconferences, and the direction from
maintainers was that the probe could be used to enable resources (power,
gpio, clocks) that might be required for the hardware codec to become
functional and report as ATTACHED. That's the reason why the probe is
done on all codecs exposed in ACPI, even 'ghost' ones, with an
update_status() callback to the codec driver when the presence of that
codec is detected on the bus.
In practice I am not aware of any codec drivers doing anything with
power/gpio/clocks in the probe stages, at least for ACPI platforms, so
it may be a good time to revisit this direction. SDCA class drivers do
exactly what I described, the subdevices are registered only upon
enumeration, not during ACPI parsing. It's a much simpler design with a
lot fewer potential races.
Problems:
- this would be a very invasive change to sdw_slave_add(), with the
device_register() skipped and moved to the enumeration stage. It'd have
to be opt-in and used only a newer platforms to avoid breaking the
'legacy' devices.
- there is still *nothing* that would tell you that all codec hardware
on a given platform completed the enumeration. You could have a fixed
delay but this would need to be large enough to cover all cases and that
could make the platform boot slower than the current solution - not ideal.
Another option would be to parse the ACPI0018 device, which describes
audio endpoints and makes references to codecs, which could be used to
filter out 'ghost' codecs that don't provide any endpoints. The spec for
this ACPI0018 is not public but could be reverse-engineered from Windows
platforms. The main benefit is that this filtering could be done in the
ACPI parsing stages and not change anything in the probe and startup
sequences.
next prev parent reply other threads:[~2026-09-15 19:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 13:13 Bard Liao
2026-09-15 13:13 ` [PATCH 1/3] soundwire: allow drivers to check whether the peripheral is present Bard Liao
2026-09-15 17:32 ` Cezary Rojewski
2026-09-15 18:31 ` Pierre-Louis Bossart
2026-09-16 2:50 ` Liao, Bard
2026-09-15 13:13 ` [PATCH 2/3] soundwire: change sdw_show_ping_status type to int Bard Liao
2026-09-15 13:13 ` [PATCH 3/3] ASoC: SOF: Intel: wait and verifies the presence of SoundWire peripherals Bard Liao
2026-09-15 19:08 ` Pierre-Louis Bossart [this message]
2026-09-16 4:08 ` [PATCH 0/3] ASoC/soundwire: remove ghost peripherals from the mach table Liao, Bard
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=528a9777-1587-4dfc-a366-000fc0867d4b@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=peter.ujfalusi@linux.intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®