Re: [PATCH] ASoC: cpcap: Implement set_tdm_slot for voice call support

From: Tony Lindgren
Date: Wed Feb 19 2020 - 13:49:24 EST


* Mark Brown <broonie@xxxxxxxxxx> [200219 17:46]:
> On Wed, Feb 19, 2020 at 09:39:02AM -0800, Tony Lindgren wrote:
> > * Mark Brown <broonie@xxxxxxxxxx> [200218 17:43]:
>
> > > you to address for system enablement. OTOH if you manage to get one of
> > > the generic cards working well that'd be excellent!
>
> > Well to me it seems that we just already have all the data needed with
> > the graph binding and snd-soc-audio-graph-card + codec2codec support.
>
> > I don't think we have cases where the cpcap codec is not the master,
> > so as long as the cpcap codec knows what's going on then there
> > may not be a need for machine driver.
>
> > I guess the the bluetooth to modem path is the one to check to see
> > what provides the clocks..
>
> Usually in telephony cases it's the modem that's the clock master FWIW.

Well at least the samplerate needs to be configured in the cpcap
codec driver for voice calls, and we're setting CPCAP_BIT_CDC_CLK_EN
bit for voice call which is the "Voice DAI Clock". It's also set when
just playing audio using the voice channel is used. And we also have
a similar bit for CPCAP_BIT_ST_CLK_EN for "HiFi DAI Clock" for the
hifi channel. So these would seem to hit that it is really the cpcap
that's the clock master for voice calls in this case.

But I guess the test to do there would be to just clear the bit
for CPCAP_BIT_CDC_CLK_EN during a voice call and see if it still
works.

Regards,

Tony