summaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-evm.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-10-04 15:08:41 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-10-15 11:24:47 +0900
commit5b66aa2d0cafd8093e0b8959d32e694c92390b8c (patch)
tree827af1cbbf3b20babe0d70b2015c770c929b2d7d /sound/soc/davinci/davinci-evm.c
parent4ed8c9b737b61030d7b6ac71294d698de85b5b7e (diff)
downloadop-kernel-dev-5b66aa2d0cafd8093e0b8959d32e694c92390b8c.zip
op-kernel-dev-5b66aa2d0cafd8093e0b8959d32e694c92390b8c.tar.gz
ASoC: McASP: make AHCLK direction configurable
Add a .set_sysclk function to pass the direction of the clock down to the driver. Only enable AHCLKX in the PDIR register when the CPU is driving the clock. This also removes the modification of the AHCLKXE/AHCLKRE bits in the hw_params callback, and users must set the desired configuration using snd_soc_dai_set_sysclk(), which this patch also does for the only user in mainline (davinci-evm). Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-evm.c')
-rw-r--r--sound/soc/davinci/davinci-evm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 6fac5af..d55e647 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -71,6 +71,11 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /* set the CPU system clock */
+ ret = snd_soc_dai_set_sysclk(cpu_dai, 0, sysclk, SND_SOC_CLOCK_OUT);
+ if (ret < 0)
+ return ret;
+
return 0;
}
OpenPOWER on IntegriCloud