/* Audio clock settings are belonged to board specific part. Every * board can set audio source clock setting which is matched with H/W * like this function-'set_audio_clock_heirachy'.
*/ staticint set_audio_clock_heirachy(struct platform_device *pdev)
{ struct clk *fout_epll, *mout_epll, *sclk_audio0, *sclk_spdif; int ret = 0;
/* We should haved to set clock directly on this part because of clock * scheme of Samsudng SoCs did not support to set rates from abstrct * clock of it's hierarchy.
*/ staticint set_audio_clock_rate(unsignedlong epll_rate, unsignedlong audio_rate)
{ struct clk *fout_epll, *sclk_spdif;
fout_epll = clk_get(NULL, "fout_epll"); if (IS_ERR(fout_epll)) {
printk(KERN_ERR "%s: failed to get fout_epll\n", __func__); return -ENOENT;
}
switch (params_rate(params)) { case 44100:
pll_out = 45158400; break; case 32000: case 48000: case 96000:
pll_out = 49152000; break; default: return -EINVAL;
}
/* Setting ratio to 512fs helps to use S/PDIF with HDMI without * modify S/PDIF ASoC machine driver.
*/
ratio = 512;
rclk_rate = params_rate(params) * ratio;
/* Set audio source clock rates */
ret = set_audio_clock_rate(pll_out, rclk_rate); if (ret < 0) return ret;
/* Set S/PDIF uses internal source clock */
ret = snd_soc_dai_set_sysclk(cpu_dai, SND_SOC_SPDIF_INT_MCLK,
rclk_rate, SND_SOC_CLOCK_IN); if (ret < 0) return ret;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.