On Wed, Mar 05, 2025 at 10:56:10AM +0800, Zhang Yi wrote: > > set_tdm_slot() > We will register multiple codecs inside a single dai_link and differentiate these > codecs by of_node. And the adc_slot and the dac_slot may be different, they can > be decided by the user.If we use set_tdm_slot,the adc_slot and the dac_slot will > be same. No, the machine driver should be configuring different TDM slots for each device - that's the whole point of the API. > > > + ret = clk_prepare_enable(es8389->mclk); > > > + if (ret) { > > > + dev_err(codec->dev, "%s, unable to enable mclk\n", __func__); > > > + return ret; > > > + } > > > + } > > Making the use of a MCLK depend on the configuration of a TDM slot for > > the ADC seems *very* unusual, what's going on there? > Because we are associating multiple codecs under a single dai_link, we will be > executing probe and init many times during initialization.But MCLK only needs > to be used once.So we decided making the use of a MCLK depend on the configuration > of a TDM slot for the ADC No, each device should just get and enable the MCLK itself - the clock API does reference counting so there's no problem with this, it's normal for a clok to have multiple consumers.
Attachment:
signature.asc
Description: PGP signature