diff options
Diffstat (limited to 'sound/soc/s3c24xx/smdk64xx_wm8580.c')
-rw-r--r-- | sound/soc/s3c24xx/smdk64xx_wm8580.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/sound/soc/s3c24xx/smdk64xx_wm8580.c b/sound/soc/s3c24xx/smdk64xx_wm8580.c index 07e8e51d10d6..634acfc41608 100644 --- a/sound/soc/s3c24xx/smdk64xx_wm8580.c +++ b/sound/soc/s3c24xx/smdk64xx_wm8580.c | |||
@@ -29,8 +29,8 @@ static int smdk64xx_hw_params(struct snd_pcm_substream *substream, | |||
29 | struct snd_pcm_hw_params *params) | 29 | struct snd_pcm_hw_params *params) |
30 | { | 30 | { |
31 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 31 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
32 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 32 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
33 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 33 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
34 | unsigned int pll_out; | 34 | unsigned int pll_out; |
35 | int bfs, rfs, ret; | 35 | int bfs, rfs, ret; |
36 | 36 | ||
@@ -174,8 +174,10 @@ static const struct snd_soc_dapm_route audio_map_rx[] = { | |||
174 | {"Rear-L/R", NULL, "VOUT3R"}, | 174 | {"Rear-L/R", NULL, "VOUT3R"}, |
175 | }; | 175 | }; |
176 | 176 | ||
177 | static int smdk64xx_wm8580_init_paiftx(struct snd_soc_codec *codec) | 177 | static int smdk64xx_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd) |
178 | { | 178 | { |
179 | struct snd_soc_codec *codec = rtd->codec; | ||
180 | |||
179 | /* Add smdk64xx specific Capture widgets */ | 181 | /* Add smdk64xx specific Capture widgets */ |
180 | snd_soc_dapm_new_controls(codec, wm8580_dapm_widgets_cpt, | 182 | snd_soc_dapm_new_controls(codec, wm8580_dapm_widgets_cpt, |
181 | ARRAY_SIZE(wm8580_dapm_widgets_cpt)); | 183 | ARRAY_SIZE(wm8580_dapm_widgets_cpt)); |
@@ -194,8 +196,10 @@ static int smdk64xx_wm8580_init_paiftx(struct snd_soc_codec *codec) | |||
194 | return 0; | 196 | return 0; |
195 | } | 197 | } |
196 | 198 | ||
197 | static int smdk64xx_wm8580_init_paifrx(struct snd_soc_codec *codec) | 199 | static int smdk64xx_wm8580_init_paifrx(struct snd_soc_pcm_runtime *rtd) |
198 | { | 200 | { |
201 | struct snd_soc_codec *codec = rtd->codec; | ||
202 | |||
199 | /* Add smdk64xx specific Playback widgets */ | 203 | /* Add smdk64xx specific Playback widgets */ |
200 | snd_soc_dapm_new_controls(codec, wm8580_dapm_widgets_pbk, | 204 | snd_soc_dapm_new_controls(codec, wm8580_dapm_widgets_pbk, |
201 | ARRAY_SIZE(wm8580_dapm_widgets_pbk)); | 205 | ARRAY_SIZE(wm8580_dapm_widgets_pbk)); |
@@ -213,16 +217,20 @@ static struct snd_soc_dai_link smdk64xx_dai[] = { | |||
213 | { /* Primary Playback i/f */ | 217 | { /* Primary Playback i/f */ |
214 | .name = "WM8580 PAIF RX", | 218 | .name = "WM8580 PAIF RX", |
215 | .stream_name = "Playback", | 219 | .stream_name = "Playback", |
216 | .cpu_dai = &s3c64xx_i2s_v4_dai, | 220 | .cpu_dai_name = "s3c64xx-iis-v4", |
217 | .codec_dai = &wm8580_dai[WM8580_DAI_PAIFRX], | 221 | .codec_dai_name = "wm8580-hifi-playback", |
222 | .platform_name = "s3c24xx-pcm-audio", | ||
223 | .codec_name = "wm8580-codec.0-001b", | ||
218 | .init = smdk64xx_wm8580_init_paifrx, | 224 | .init = smdk64xx_wm8580_init_paifrx, |
219 | .ops = &smdk64xx_ops, | 225 | .ops = &smdk64xx_ops, |
220 | }, | 226 | }, |
221 | { /* Primary Capture i/f */ | 227 | { /* Primary Capture i/f */ |
222 | .name = "WM8580 PAIF TX", | 228 | .name = "WM8580 PAIF TX", |
223 | .stream_name = "Capture", | 229 | .stream_name = "Capture", |
224 | .cpu_dai = &s3c64xx_i2s_v4_dai, | 230 | .cpu_dai_name = "s3c64xx-iis-v4", |
225 | .codec_dai = &wm8580_dai[WM8580_DAI_PAIFTX], | 231 | .codec_dai_name = "wm8580-hifi-capture", |
232 | .platform_name = "s3c24xx-pcm-audio", | ||
233 | .codec_name = "wm8580-codec.0-001b", | ||
226 | .init = smdk64xx_wm8580_init_paiftx, | 234 | .init = smdk64xx_wm8580_init_paiftx, |
227 | .ops = &smdk64xx_ops, | 235 | .ops = &smdk64xx_ops, |
228 | }, | 236 | }, |
@@ -230,16 +238,10 @@ static struct snd_soc_dai_link smdk64xx_dai[] = { | |||
230 | 238 | ||
231 | static struct snd_soc_card smdk64xx = { | 239 | static struct snd_soc_card smdk64xx = { |
232 | .name = "smdk64xx", | 240 | .name = "smdk64xx", |
233 | .platform = &s3c24xx_soc_platform, | ||
234 | .dai_link = smdk64xx_dai, | 241 | .dai_link = smdk64xx_dai, |
235 | .num_links = ARRAY_SIZE(smdk64xx_dai), | 242 | .num_links = ARRAY_SIZE(smdk64xx_dai), |
236 | }; | 243 | }; |
237 | 244 | ||
238 | static struct snd_soc_device smdk64xx_snd_devdata = { | ||
239 | .card = &smdk64xx, | ||
240 | .codec_dev = &soc_codec_dev_wm8580, | ||
241 | }; | ||
242 | |||
243 | static struct platform_device *smdk64xx_snd_device; | 245 | static struct platform_device *smdk64xx_snd_device; |
244 | 246 | ||
245 | static int __init smdk64xx_audio_init(void) | 247 | static int __init smdk64xx_audio_init(void) |
@@ -250,8 +252,7 @@ static int __init smdk64xx_audio_init(void) | |||
250 | if (!smdk64xx_snd_device) | 252 | if (!smdk64xx_snd_device) |
251 | return -ENOMEM; | 253 | return -ENOMEM; |
252 | 254 | ||
253 | platform_set_drvdata(smdk64xx_snd_device, &smdk64xx_snd_devdata); | 255 | platform_set_drvdata(smdk64xx_snd_device, &smdk64xx); |
254 | smdk64xx_snd_devdata.dev = &smdk64xx_snd_device->dev; | ||
255 | ret = platform_device_add(smdk64xx_snd_device); | 256 | ret = platform_device_add(smdk64xx_snd_device); |
256 | 257 | ||
257 | if (ret) | 258 | if (ret) |