aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap3evm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap3evm.c')
-rw-r--r--sound/soc/omap/omap3evm.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c
index 0daa0446983..68578959e4a 100644
--- a/sound/soc/omap/omap3evm.c
+++ b/sound/soc/omap/omap3evm.c
@@ -19,6 +19,7 @@
19 19
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/module.h>
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/pcm.h> 24#include <sound/pcm.h>
24#include <sound/soc.h> 25#include <sound/soc.h>
@@ -36,29 +37,8 @@ static int omap3evm_hw_params(struct snd_pcm_substream *substream,
36{ 37{
37 struct snd_soc_pcm_runtime *rtd = substream->private_data; 38 struct snd_soc_pcm_runtime *rtd = substream->private_data;
38 struct snd_soc_dai *codec_dai = rtd->codec_dai; 39 struct snd_soc_dai *codec_dai = rtd->codec_dai;
39 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
40 int ret; 40 int ret;
41 41
42 /* Set codec DAI configuration */
43 ret = snd_soc_dai_set_fmt(codec_dai,
44 SND_SOC_DAIFMT_I2S |
45 SND_SOC_DAIFMT_NB_NF |
46 SND_SOC_DAIFMT_CBM_CFM);
47 if (ret < 0) {
48 printk(KERN_ERR "Can't set codec DAI configuration\n");
49 return ret;
50 }
51
52 /* Set cpu DAI configuration */
53 ret = snd_soc_dai_set_fmt(cpu_dai,
54 SND_SOC_DAIFMT_I2S |
55 SND_SOC_DAIFMT_NB_NF |
56 SND_SOC_DAIFMT_CBM_CFM);
57 if (ret < 0) {
58 printk(KERN_ERR "Can't set cpu DAI configuration\n");
59 return ret;
60 }
61
62 /* Set the codec system clock for DAC and ADC */ 42 /* Set the codec system clock for DAC and ADC */
63 ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, 43 ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
64 SND_SOC_CLOCK_IN); 44 SND_SOC_CLOCK_IN);
@@ -82,6 +62,8 @@ static struct snd_soc_dai_link omap3evm_dai = {
82 .codec_dai_name = "twl4030-hifi", 62 .codec_dai_name = "twl4030-hifi",
83 .platform_name = "omap-pcm-audio", 63 .platform_name = "omap-pcm-audio",
84 .codec_name = "twl4030-codec", 64 .codec_name = "twl4030-codec",
65 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
66 SND_SOC_DAIFMT_CBM_CFM,
85 .ops = &omap3evm_ops, 67 .ops = &omap3evm_ops,
86}; 68};
87 69