[PATCH 16/28] ASoC: apple: Add macaudio machine driver
Mark Brown
broonie at kernel.org
Wed Sep 30 04:17:54 PDT 2026
On Wed, Sep 30, 2026 at 05:36:21PM +1000, James Calligeros wrote:
> On Monday, 28 September 2026 9:03:13 pm Australian Eastern Standard Time Mark
> Brown wrote:
> > On Sat, Sep 26, 2026 at 11:06:02AM +1000, James Calligeros wrote:
> > > On Tuesday, 22 September 2026 7:38:54 pm Australian Eastern Standard Time
> > > > > + if (props->is_sense) {
> > > > > + rate->min = rate->max = cpu_dai->symmetric_rate;
> > > > > + return 0;
> > > > > + }
> > > > It feels like this DAI ought to have separate ops... Also, for the
> > > > sense link will we definitely already have a rate set up?
> > > AIUI, the cpu rate should always be set up by the time we hit
> > > this path as it is only taken when setting up the VISENSE FE (after the
> > > playback stuff is already set up).
> > Is that something we actually enforce or is that just a thing a sensible
> > userspace should do? I can see something racing.
> We don't really enforce it. speakersafetyd is the only thing that opens the
> VISENSE PCM and does a blocking read of samples
> which only starts and subsequently completes after the "real" PCM
> is configured and playback begins. The sample rate is reliably
> reflected to speakersafetyd via the kcontrol on the VISENSE PCM. We
> have not experienced any race issues with this arrangement in ~5 years
> nor has anyone reported any to us. I'm happy to take pointers on
> how we should be doing this if the current approach won't fly.
You could just return an error if there's no rate set, it sounds like
your actual userspace will DTRT anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20260930/91d6a3b0/attachment-0001.sig>
More information about the Linux-mediatek
mailing list