summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-27 16:42:27 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-28 13:22:33 +0100
commit44fdd4338749739692715f24907c450f6f410da3 (patch)
tree9c5d8b296ae9e96f60a3eded1716c422319aeae0
parent75d9ac46b99280f5f381927ae75a9eaf21844d20 (diff)
ASoC: Use dai_fmt in speyside_wm8962
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/samsung/speyside_wm8962.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c
index 07b827e3b807..8a082044436e 100644
--- a/sound/soc/samsung/speyside_wm8962.c
+++ b/sound/soc/samsung/speyside_wm8962.c
@@ -94,23 +94,6 @@ static int speyside_wm8962_set_bias_level_post(struct snd_soc_card *card,
static int speyside_wm8962_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- 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;
- int ret;
-
- ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S
- | SND_SOC_DAIFMT_NB_NF
- | SND_SOC_DAIFMT_CBM_CFM);
- if (ret < 0)
- return ret;
-
- ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S
- | SND_SOC_DAIFMT_NB_NF
- | SND_SOC_DAIFMT_CBM_CFM);
- if (ret < 0)
- return ret;
-
sample_rate = params_rate(params);
return 0;
@@ -128,6 +111,8 @@ static struct snd_soc_dai_link speyside_wm8962_dai[] = {
.codec_dai_name = "wm8962",
.platform_name = "samsung-audio",
.codec_name = "wm8962.1-001a",
+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
+ | SND_SOC_DAIFMT_CBM_CFM,
.ops = &speyside_wm8962_ops,
},
};