Title: [9702] trunk/sound/soc/blackfin/bf5xx-ad193x.c: asoc: add ad193x sysclk configuration
- Revision
- 9702
- Author
- scott
- Date
- 2011-03-09 04:21:35 -0500 (Wed, 09 Mar 2011)
Log Message
asoc: add ad193x sysclk configuration
Modified Paths
Diff
Modified: trunk/sound/soc/blackfin/bf5xx-ad193x.c (9701 => 9702)
--- trunk/sound/soc/blackfin/bf5xx-ad193x.c 2011-03-08 02:29:32 UTC (rev 9701)
+++ trunk/sound/soc/blackfin/bf5xx-ad193x.c 2011-03-09 09:21:35 UTC (rev 9702)
@@ -52,8 +52,16 @@
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
+ unsigned int clk = 0;
unsigned int channel_map[] = {0, 1, 2, 3, 4, 5, 6, 7};
int ret = 0;
+
+ switch (params_rate(params)) {
+ case 48000:
+ clk = 12288000;
+ break;
+ }
+
/* set cpu DAI configuration */
ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_A |
SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM);
@@ -66,6 +74,12 @@
if (ret < 0)
return ret;
+ /* set the codec system clock for DAC and ADC */
+ ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk,
+ SND_SOC_CLOCK_IN);
+ if (ret < 0)
+ return ret;
+
/* set codec DAI slots, 8 channels, all channels are enabled */
ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xFF, 0xFF, 8, 32);
if (ret < 0)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits