From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Cezary Rojewski <cezary.rojewski@intel.com>, broonie@kernel.org
Cc: tiwai@suse.com, perex@perex.cz, amade@asmblr.net,
kuninori.morimoto.gx@renesas.com, linux-sound@vger.kernel.org,
"Liao, Bard" <bard.liao@intel.com>,
"Vehmanen, Kai" <kai.vehmanen@intel.com>,
"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
Subject: Re: [PATCH] ASoC: core: Move all users to deferrable card binding
Date: Mon, 25 May 2026 12:44:57 +0200 [thread overview]
Message-ID: <7c01439a-8edc-4aba-bd7b-0e19f4f470ae@linux.dev> (raw)
In-Reply-To: <5d8cbbfb-3884-4c6b-aea8-0c9a76964b3b@intel.com>
On 5/22/26 16:32, Cezary Rojewski wrote:
> On 5/22/2026 12:16 PM, Péter Ujfalusi wrote:
>> Hi Cezary,
>
> ...
>
>> This patch showed up in sof-dev kernel after a recent upstream merge and
>> broke audio card probing on some devices.
>>
>> There are no errors in kernel log, the card just does not form.
>> Reverting only this patch fixes the card binding.
>>
>> The affected device have 2x sndw speaker amps, 1x headset codec and 3x
>> HDMI PCMs.
>>
>> It is likely that one of the codec's probe happens after the card
>> probed, the card is not created for some reason and nothing happens.
>>
>> rmmod snd_soc_sof_sdw
>> modprobe snd_soc_sof_sdw
>>
>> will create the card, so it is likely that going ahead without waiting
>> for all components can and might break audio on system boot.
> Hi Mark,
>
> I've had a debug session with Peter today (yes, right after one with Alexander) and the outcome is kind of an expected one - dependency issue, TLDR:
>
> // working case:
> 1) snd_soc_add_component(sdw_codec)
> 2) snd_soc_add_compoenent(sof_platform)
> 3) <sof card is probing just fine>
>
> // failing case:
> 1) snd_soc_add_component(sof_platform)
> 2) snd_soc_add_component(sdw_codec)
> 3) <sof card is MISSING dependencies i.e.: components>
FWIW the SoundWire codec components are registered during the ACPI scanning phase - there is no dependency on an actual codec being present or bus started. It would be extremely surprising if the missing resources came from the SoundWire side. The probe is done early and returns a clear status.
Conversely, the SOF platform component is registered in a workqueue which doesn't go well with deferred binding. It's a known problem, there is *nothing* that will trigger the deferred probe list to be rescanned when the probe workqueue completes. If a component isn't available, the card creation will fail and nothing happens.
You can test this theory with a simple Kconfig change, with SND_SOC_SOF_PROBE_WORK_QUEUE set to 'n'.
Alternatively you could try this patch from 2021 that will force the deferred probe to be reinspected.
https://lore.kernel.org/alsa-devel/20210817190057.255264-2-pierre-louis.bossart@linux.intel.com/
Note that the workqueue isn't an SOF concept, it's directly inspired by the plain HDAudio driver to make sure PCI probe of non-audio devices isn't delayed by the sound driver taking its time due to the use of request_module for HDaudio.
my 2 cents.
next prev parent reply other threads:[~2026-05-25 10:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
2026-05-11 1:06 ` Mark Brown
2026-05-11 1:34 ` Kuninori Morimoto
2026-05-12 8:14 ` Rojewski, Cezary
2026-05-20 9:55 ` Alexander Stein
2026-05-20 10:33 ` Cezary Rojewski
2026-05-21 6:42 ` Alexander Stein
2026-05-21 8:13 ` Cezary Rojewski
2026-05-21 10:11 ` Alexander Stein
2026-05-21 14:41 ` Cezary Rojewski
2026-05-21 14:47 ` Alexander Stein
2026-05-22 11:21 ` Alexander Stein
2026-05-22 10:16 ` Péter Ujfalusi
2026-05-22 14:32 ` Cezary Rojewski
2026-05-22 14:58 ` Mark Brown
2026-05-22 15:08 ` Cezary Rojewski
2026-05-25 12:48 ` Péter Ujfalusi
2026-05-25 15:06 ` Mark Brown
2026-05-26 5:45 ` Péter Ujfalusi
2026-05-26 11:21 ` Péter Ujfalusi
2026-05-26 11:28 ` Péter Ujfalusi
2026-05-26 16:02 ` Mark Brown
2026-05-27 5:22 ` Péter Ujfalusi
2026-05-27 10:35 ` Mark Brown
2026-05-25 10:44 ` Pierre-Louis Bossart [this message]
2026-05-25 21:10 ` Cezary Rojewski
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=7c01439a-8edc-4aba-bd7b-0e19f4f470ae@linux.dev \
--to=pierre-louis.bossart@linux.dev \
--cc=amade@asmblr.net \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=tiwai@suse.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