diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-08 04:49:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-08 07:29:16 -0400 |
commit | 277b6fdac182766f040bb5eade7138283fa055f6 (patch) | |
tree | 31024636a799356f35976bb3a95f041f8e50273e /sound/soc/samsung/lowland.c | |
parent | b3bba9a1a8dfcd338eb7d099dcd53daacb698f8b (diff) |
ASoC: lowland: Convert to dai_fmt
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/samsung/lowland.c')
-rw-r--r-- | sound/soc/samsung/lowland.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c index 4adff934f771..6cac1e90d268 100644 --- a/sound/soc/samsung/lowland.c +++ b/sound/soc/samsung/lowland.c | |||
@@ -21,33 +21,6 @@ | |||
21 | #define MCLK1_RATE (44100 * 512) | 21 | #define MCLK1_RATE (44100 * 512) |
22 | #define CLKOUT_RATE (44100 * 256) | 22 | #define CLKOUT_RATE (44100 * 256) |
23 | 23 | ||
24 | static int lowland_hw_params(struct snd_pcm_substream *substream, | ||
25 | struct snd_pcm_hw_params *params) | ||
26 | { | ||
27 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
28 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
29 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
30 | int ret; | ||
31 | |||
32 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ||
33 | | SND_SOC_DAIFMT_NB_NF | ||
34 | | SND_SOC_DAIFMT_CBM_CFM); | ||
35 | if (ret < 0) | ||
36 | return ret; | ||
37 | |||
38 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | ||
39 | | SND_SOC_DAIFMT_NB_NF | ||
40 | | SND_SOC_DAIFMT_CBM_CFM); | ||
41 | if (ret < 0) | ||
42 | return ret; | ||
43 | |||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static struct snd_soc_ops lowland_ops = { | ||
48 | .hw_params = lowland_hw_params, | ||
49 | }; | ||
50 | |||
51 | static struct snd_soc_jack lowland_headset; | 24 | static struct snd_soc_jack lowland_headset; |
52 | 25 | ||
53 | /* Headset jack detection DAPM pins */ | 26 | /* Headset jack detection DAPM pins */ |
@@ -109,7 +82,8 @@ static struct snd_soc_dai_link lowland_dai[] = { | |||
109 | .codec_dai_name = "wm5100-aif1", | 82 | .codec_dai_name = "wm5100-aif1", |
110 | .platform_name = "samsung-audio", | 83 | .platform_name = "samsung-audio", |
111 | .codec_name = "wm5100.1-001a", | 84 | .codec_name = "wm5100.1-001a", |
112 | .ops = &lowland_ops, | 85 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
86 | SND_SOC_DAIFMT_CBM_CFM, | ||
113 | .init = lowland_wm5100_init, | 87 | .init = lowland_wm5100_init, |
114 | }, | 88 | }, |
115 | { | 89 | { |
@@ -118,7 +92,8 @@ static struct snd_soc_dai_link lowland_dai[] = { | |||
118 | .cpu_dai_name = "wm5100-aif2", | 92 | .cpu_dai_name = "wm5100-aif2", |
119 | .codec_dai_name = "wm1250-ev1", | 93 | .codec_dai_name = "wm1250-ev1", |
120 | .codec_name = "wm1250-ev1.1-0027", | 94 | .codec_name = "wm1250-ev1.1-0027", |
121 | .ops = &lowland_ops, | 95 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
96 | SND_SOC_DAIFMT_CBM_CFM, | ||
122 | .ignore_suspend = 1, | 97 | .ignore_suspend = 1, |
123 | }, | 98 | }, |
124 | }; | 99 | }; |