aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-twl4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap-twl4030.c')
-rw-r--r--sound/soc/omap/omap-twl4030.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index 5e551c762b7a..fb1f6bb87cd4 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -53,11 +53,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream,
53 struct snd_pcm_hw_params *params) 53 struct snd_pcm_hw_params *params)
54{ 54{
55 struct snd_soc_pcm_runtime *rtd = substream->private_data; 55 struct snd_soc_pcm_runtime *rtd = substream->private_data;
56 struct snd_soc_dai *codec_dai = rtd->codec_dai;
57 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
58 struct snd_soc_card *card = rtd->card;
59 unsigned int fmt; 56 unsigned int fmt;
60 int ret;
61 57
62 switch (params_channels(params)) { 58 switch (params_channels(params)) {
63 case 2: /* Stereo I2S mode */ 59 case 2: /* Stereo I2S mode */
@@ -74,21 +70,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream,
74 return -EINVAL; 70 return -EINVAL;
75 } 71 }
76 72
77 /* Set codec DAI configuration */ 73 return snd_soc_runtime_set_dai_fmt(rtd, fmt);
78 ret = snd_soc_dai_set_fmt(codec_dai, fmt);
79 if (ret < 0) {
80 dev_err(card->dev, "can't set codec DAI configuration\n");
81 return ret;
82 }
83
84 /* Set cpu DAI configuration */
85 ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
86 if (ret < 0) {
87 dev_err(card->dev, "can't set cpu DAI configuration\n");
88 return ret;
89 }
90
91 return 0;
92} 74}
93 75
94static struct snd_soc_ops omap_twl4030_ops = { 76static struct snd_soc_ops omap_twl4030_ops = {