Re: [PATCH 1/3] ASoC: simple-card: set cpu dai clk in hw_params

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

 



Hi Daniel

> The simple-card driver currently accepts a clock node in the cpu dai
> sub-node and only uses it as an alternative to the
> 'system-clock-frequency' property to get the current frequency.
> 
> This patch adds another use of the passed clock node. If mclk-fs is
> specified, the clock will be set to the calculated rate (stream rate *
> mclk_fs) in hw_params. This allows platforms to pass a tuneable clock
> as phandle that will automatically be set to the right rates.
> 
> Signed-off-by: Daniel Mack <daniel@xxxxxxxxxx>
> ---
(snip)
>  	if (mclk_fs) {
>  		mclk = params_rate(params) * mclk_fs;
> +
> +		if (dai_props->cpu_dai.clk)
> +			clk_set_rate(dai_props->cpu_dai.clk, mclk);
> +
>  		ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
>  					     SND_SOC_CLOCK_IN);
>  		if (ret && ret != -ENOTSUPP)

Having codec is nice balance ?

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux