Re: [PATCH 4/5] ASoC: amd: add Machine driver for Jadeite platform

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

 



On 6/30/22 4:40 PM, Mark Brown wrote:
> On Thu, Jun 30, 2022 at 08:47:54AM +0530, Vijendar Mukunda wrote:
> 
>> +static int st_es8336_hw_params(struct snd_pcm_substream *substream,
>> +			       struct snd_pcm_hw_params *params)
>> +{
>> +	int ret = 0;
>> +	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
>> +	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
>> +
>> +	ret = snd_soc_dai_set_sysclk(codec_dai, 0, params_rate(params) * 256, SND_SOC_CLOCK_IN);
>> +	if (ret < 0) {
>> +		dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
>> +		return ret;
>> +	}
>> +	return ret;
>> +}
> 
>> +static const unsigned int st_channels[] = {
>> +	DUAL_CHANNEL,
>> +};
>> +
>> +static const unsigned int st_rates[] = {
>> +	48000,
>> +};
> 
> If the clock rate is fixed why not just set the sysclk once at startup
> too?
Yes. We can set sysclk once at the startup as clock rate is fixed.
Will modify the code and post the new patch.




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux