From: Takashi Iwai <tiwai@suse.de>
To: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.dev,
linux-sound@vger.kernel.org, stable@vger.kernel.org,
cezary.rojewski@intel.com, kai.vehmanen@linux.intel.com
Subject: Re: [PATCH] ALSA: hda: Reject codec reset on ASoC (ext_ops) buses
Date: Tue, 27 Oct 2026 09:11:27 +0100 [thread overview]
Message-ID: <87h5i736mo.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261027072835.4796-1-peter.ujfalusi@linux.intel.com>
On Tue, 27 Oct 2026 08:28:35 +0100,
Peter Ujfalusi wrote:
>
> Writing to the reconfig or clear sysfs nodes of a codec handled by ASoC
> (SOF via hdac_hda, AVS via codecs/hda) hangs the writer.
>
> snd_hda_codec_reset() sets card->shutdown and calls
> device_release_driver(). With ext_ops the driver unbind unregisters the
> ASoC component, which unbinds and frees the whole ASoC card:
> - snd_card_disconnect() returns early as card->shutdown is already set,
> so the card's child devices are not removed and snd_card_free() waits
> for the card release forever.
> - Even without that, freeing the card removes the codec's hwdep device,
> which owns the sysfs node the reset was issued from, deadlocking in
> kernfs while waiting for the active write to finish.
>
> The legacy HDA driver keeps the card across a driver rebind, ASoC does
> not, so the reset cannot be supported there. Return -EOPNOTSUPP and skip
> the misleading "codec is being used" messages in the callers.
>
> Fixes: 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers")
> Cc: stable@vger.kernel.org
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222182
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Applied now. Thanks.
Takashi
next prev parent reply other threads:[~2026-10-27 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 7:28 [PATCH] ALSA: hda: Reject codec reset on ASoC (ext_ops) buses Peter Ujfalusi
2026-10-27 8:11 ` Takashi Iwai [this message]
2026-10-27 9:09 ` 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=87h5i736mo.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=stable@vger.kernel.org \
--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