Re: [PATCH v9 5/5] ASoC: cs40l50: Support I2S streaming to CS40L50

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Mar 14, 2024, at 11:05 AM, Jeff LaBundy <jeff@xxxxxxxxxxx> wrote:
> 
> On Fri, Mar 08, 2024 at 10:24:21PM +0000, James Ogletree wrote:
>> 
>> +static int cs40l50_clk_en(struct snd_soc_dapm_widget *w,
>> +  struct snd_kcontrol *kcontrol,
>> +  int event)
>> +{
>> + struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
>> + struct cs40l50_codec *codec = snd_soc_component_get_drvdata(comp);
>> + int ret;
>> +
>> + switch (event) {
>> + case SND_SOC_DAPM_POST_PMU:
>> + ret = cs40l50_dsp_write(codec->dev, codec->regmap, CS40L50_STOP_PLAYBACK);
>> + if (ret)
>> + return ret;
>> +
>> + ret = cs40l50_dsp_write(codec->dev, codec->regmap, CS40L50_START_I2S);
>> + if (ret)
>> + return ret;
>> +
>> + ret = cs40l50_swap_ext_clk(codec, CS40L50_PLL_REFCLK_BCLK);
>> + if (ret)
>> + return ret;
>> + break;
>> + case SND_SOC_DAPM_PRE_PMD:
>> + ret = cs40l50_swap_ext_clk(codec, CS40L50_PLL_REFCLK_MCLK);
>> + if (ret)
>> + return ret;
>> + break;
> 
> Just for my own understanding, does the HALO core need to be told that I2S
> streaming is about to stop? Or does the L50 gracefully park the class D
> outputs when the PLL source is suddenly switched?

The only time we enter this pre-power down DAPM event code path is if the
stream ends on its own, or if a stop has already been sent to the DSP. So the
former, but there is no need to tell the DSP anything here.

Best,
James





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux