Search
SailfishOS Open Build Service
>
Projects
>
home:mike7b4
:
bbb
>
kernel-adaptation-bbb-v3.12
> 0079-ASoc-Davinci-EVM-Config-12MHz-CLK-for-AIC3x-Codec.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0079-ASoc-Davinci-EVM-Config-12MHz-CLK-for-AIC3x-Codec.patch of Package kernel-adaptation-bbb-v3.12
From 592258ef4cd0e70fa967d1e7651b8e401094e1eb Mon Sep 17 00:00:00 2001 From: Cody Lacey <clacey@ti.com> Date: Tue, 10 Dec 2013 12:38:08 -0600 Subject: [PATCH 79/96] ASoc: Davinci-EVM: Config 12MHz CLK for AIC3x Codec The AIC3x Codec needs a 12MHz clock source. If the codec MCLK is connected to McASP AHCLKX or AHCLKR then the 24MHz internal clock needs to be divided by 2. --- sound/soc/davinci/davinci-evm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index b19ebda..91bff8c 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -227,6 +227,7 @@ static const struct snd_soc_dapm_route audio_map[] = { static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; + struct snd_soc_dai *cpu_dai = rtd->cpu_dai; struct snd_soc_dapm_context *dapm = &codec->dapm; struct device_node *np = codec->card->dev->of_node; int ret; @@ -245,6 +246,11 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); } + /* Divide McASP MCLK by 2 to provide 12MHz to codec */ + ret = snd_soc_dai_set_clkdiv(cpu_dai, 0, 2); + if (ret < 0) + return ret; + /* not connected */ snd_soc_dapm_disable_pin(dapm, "MONO_LOUT"); snd_soc_dapm_disable_pin(dapm, "HPLCOM"); -- 1.9.1