diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad73311.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad73311.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad73311.c b/sound/soc/blackfin/bf5xx-ad73311.c index 9825b71d0e28..900ced54ac79 100644 --- a/sound/soc/blackfin/bf5xx-ad73311.c +++ b/sound/soc/blackfin/bf5xx-ad73311.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include "../codecs/ad73311.h" | 47 | #include "../codecs/ad73311.h" |
48 | #include "bf5xx-sport.h" | 48 | #include "bf5xx-sport.h" |
49 | #include "bf5xx-i2s-pcm.h" | 49 | #include "bf5xx-i2s-pcm.h" |
50 | #include "bf5xx-i2s.h" | ||
51 | 50 | ||
52 | #if CONFIG_SND_BF5XX_SPORT_NUM == 0 | 51 | #if CONFIG_SND_BF5XX_SPORT_NUM == 0 |
53 | #define bfin_write_SPORT_TCR1 bfin_write_SPORT0_TCR1 | 52 | #define bfin_write_SPORT_TCR1 bfin_write_SPORT0_TCR1 |
@@ -150,10 +149,10 @@ static int bf5xx_probe(struct platform_device *pdev) | |||
150 | static int bf5xx_ad73311_startup(struct snd_pcm_substream *substream) | 149 | static int bf5xx_ad73311_startup(struct snd_pcm_substream *substream) |
151 | { | 150 | { |
152 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 151 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
153 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 152 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
154 | 153 | ||
155 | pr_debug("%s enter\n", __func__); | 154 | pr_debug("%s enter\n", __func__); |
156 | cpu_dai->private_data = sport_handle; | 155 | snd_soc_dai_set_drvdata(cpu_dai, sport_handle); |
157 | return 0; | 156 | return 0; |
158 | } | 157 | } |
159 | 158 | ||
@@ -161,7 +160,7 @@ static int bf5xx_ad73311_hw_params(struct snd_pcm_substream *substream, | |||
161 | struct snd_pcm_hw_params *params) | 160 | struct snd_pcm_hw_params *params) |
162 | { | 161 | { |
163 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 162 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
164 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 163 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
165 | int ret = 0; | 164 | int ret = 0; |
166 | 165 | ||
167 | pr_debug("%s rate %d format %x\n", __func__, params_rate(params), | 166 | pr_debug("%s rate %d format %x\n", __func__, params_rate(params), |
@@ -185,24 +184,20 @@ static struct snd_soc_ops bf5xx_ad73311_ops = { | |||
185 | static struct snd_soc_dai_link bf5xx_ad73311_dai = { | 184 | static struct snd_soc_dai_link bf5xx_ad73311_dai = { |
186 | .name = "ad73311", | 185 | .name = "ad73311", |
187 | .stream_name = "AD73311", | 186 | .stream_name = "AD73311", |
188 | .cpu_dai = &bf5xx_i2s_dai, | 187 | .cpu_dai_name = "bf5xx-i2s", |
189 | .codec_dai = &ad73311_dai, | 188 | .codec_dai_name = "ad73311-hifi", |
189 | .platform_name = "bfin-pcm-audio", | ||
190 | .codec_name = "ad73311-codec", | ||
190 | .ops = &bf5xx_ad73311_ops, | 191 | .ops = &bf5xx_ad73311_ops, |
191 | }; | 192 | }; |
192 | 193 | ||
193 | static struct snd_soc_card bf5xx_ad73311 = { | 194 | static struct snd_soc_card bf5xx_ad73311 = { |
194 | .name = "bf5xx_ad73311", | 195 | .name = "bf5xx_ad73311", |
195 | .platform = &bf5xx_i2s_soc_platform, | ||
196 | .probe = bf5xx_probe, | 196 | .probe = bf5xx_probe, |
197 | .dai_link = &bf5xx_ad73311_dai, | 197 | .dai_link = &bf5xx_ad73311_dai, |
198 | .num_links = 1, | 198 | .num_links = 1, |
199 | }; | 199 | }; |
200 | 200 | ||
201 | static struct snd_soc_device bf5xx_ad73311_snd_devdata = { | ||
202 | .card = &bf5xx_ad73311, | ||
203 | .codec_dev = &soc_codec_dev_ad73311, | ||
204 | }; | ||
205 | |||
206 | static struct platform_device *bf5xx_ad73311_snd_device; | 201 | static struct platform_device *bf5xx_ad73311_snd_device; |
207 | 202 | ||
208 | static int __init bf5xx_ad73311_init(void) | 203 | static int __init bf5xx_ad73311_init(void) |
@@ -214,8 +209,7 @@ static int __init bf5xx_ad73311_init(void) | |||
214 | if (!bf5xx_ad73311_snd_device) | 209 | if (!bf5xx_ad73311_snd_device) |
215 | return -ENOMEM; | 210 | return -ENOMEM; |
216 | 211 | ||
217 | platform_set_drvdata(bf5xx_ad73311_snd_device, &bf5xx_ad73311_snd_devdata); | 212 | platform_set_drvdata(bf5xx_ad73311_snd_device, &bf5xx_ad73311); |
218 | bf5xx_ad73311_snd_devdata.dev = &bf5xx_ad73311_snd_device->dev; | ||
219 | ret = platform_device_add(bf5xx_ad73311_snd_device); | 213 | ret = platform_device_add(bf5xx_ad73311_snd_device); |
220 | 214 | ||
221 | if (ret) | 215 | if (ret) |