Re: [PATCH v3 2/2] ASoC: soc-pcm: constrain hw_params when DAIs share the same BCLK

From: Mark Brown

Date: Fri May 22 2026 - 09:06:45 EST


On Mon, May 18, 2026 at 02:21:09PM +0800, Troy Mitchell wrote:
> When multiple CPU DAIs on the same sound card share the same physical
> BCLK, add a hw_rule during PCM open that constrains the sample rate so
> the resulting BCLK rate stays consistent across all sharing DAIs.

> + /*
> + * Protect the rtd list traversal. No nesting: this callback runs
> + * from snd_pcm_hw_refine() which does not hold card->mutex.
> + */
> + guard(mutex)(&card->mutex);

We have helpers for acquiring these mutexes which deal with some lockdep
issues using subclasses. Either use those or provide whatever's needed
to have the equivalent thing in a guard.

Attachment: signature.asc
Description: PGP signature