diff options
Diffstat (limited to 'sound/soc/imx/wm1133-ev1.c')
-rw-r--r-- | sound/soc/imx/wm1133-ev1.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c index a6e7d949763..74068636c1d 100644 --- a/sound/soc/imx/wm1133-ev1.c +++ b/sound/soc/imx/wm1133-ev1.c | |||
@@ -82,8 +82,8 @@ static int wm1133_ev1_hw_params(struct snd_pcm_substream *substream, | |||
82 | struct snd_pcm_hw_params *params) | 82 | struct snd_pcm_hw_params *params) |
83 | { | 83 | { |
84 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 84 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
85 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 85 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
86 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 86 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
87 | int i, found = 0; | 87 | int i, found = 0; |
88 | snd_pcm_format_t format = params_format(params); | 88 | snd_pcm_format_t format = params_format(params); |
89 | unsigned int rate = params_rate(params); | 89 | unsigned int rate = params_rate(params); |
@@ -210,9 +210,9 @@ static struct snd_soc_jack_pin mic_jack_pins[] = { | |||
210 | { .pin = "Mic2 Jack", .mask = SND_JACK_MICROPHONE }, | 210 | { .pin = "Mic2 Jack", .mask = SND_JACK_MICROPHONE }, |
211 | }; | 211 | }; |
212 | 212 | ||
213 | static int wm1133_ev1_init(struct snd_soc_codec *codec) | 213 | static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd) |
214 | { | 214 | { |
215 | struct snd_soc_card *card = codec->socdev->card; | 215 | struct snd_soc_codec *codec = rtd->codec; |
216 | 216 | ||
217 | snd_soc_dapm_new_controls(codec, wm1133_ev1_widgets, | 217 | snd_soc_dapm_new_controls(codec, wm1133_ev1_widgets, |
218 | ARRAY_SIZE(wm1133_ev1_widgets)); | 218 | ARRAY_SIZE(wm1133_ev1_widgets)); |
@@ -221,13 +221,13 @@ static int wm1133_ev1_init(struct snd_soc_codec *codec) | |||
221 | ARRAY_SIZE(wm1133_ev1_map)); | 221 | ARRAY_SIZE(wm1133_ev1_map)); |
222 | 222 | ||
223 | /* Headphone jack detection */ | 223 | /* Headphone jack detection */ |
224 | snd_soc_jack_new(card, "Headphone", SND_JACK_HEADPHONE, &hp_jack); | 224 | snd_soc_jack_new(codec, "Headphone", SND_JACK_HEADPHONE, &hp_jack); |
225 | snd_soc_jack_add_pins(&hp_jack, ARRAY_SIZE(hp_jack_pins), | 225 | snd_soc_jack_add_pins(&hp_jack, ARRAY_SIZE(hp_jack_pins), |
226 | hp_jack_pins); | 226 | hp_jack_pins); |
227 | wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE); | 227 | wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE); |
228 | 228 | ||
229 | /* Microphone jack detection */ | 229 | /* Microphone jack detection */ |
230 | snd_soc_jack_new(card, "Microphone", | 230 | snd_soc_jack_new(codec, "Microphone", |
231 | SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack); | 231 | SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack); |
232 | snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins), | 232 | snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins), |
233 | mic_jack_pins); | 233 | mic_jack_pins); |
@@ -243,8 +243,10 @@ static int wm1133_ev1_init(struct snd_soc_codec *codec) | |||
243 | static struct snd_soc_dai_link wm1133_ev1_dai = { | 243 | static struct snd_soc_dai_link wm1133_ev1_dai = { |
244 | .name = "WM1133-EV1", | 244 | .name = "WM1133-EV1", |
245 | .stream_name = "Audio", | 245 | .stream_name = "Audio", |
246 | .cpu_dai = &imx_ssi_pcm_dai[0], | 246 | .cpu_dai_name = "imx-ssi-dai.0", |
247 | .codec_dai = &wm8350_dai, | 247 | .codec_dai_name = "wm8350-hifi", |
248 | .platform_name = "imx-fiq-pcm-audio.0", | ||
249 | .codec_name = "wm8350-codec.0-0x1a", | ||
248 | .init = wm1133_ev1_init, | 250 | .init = wm1133_ev1_init, |
249 | .ops = &wm1133_ev1_ops, | 251 | .ops = &wm1133_ev1_ops, |
250 | .symmetric_rates = 1, | 252 | .symmetric_rates = 1, |
@@ -252,16 +254,10 @@ static struct snd_soc_dai_link wm1133_ev1_dai = { | |||
252 | 254 | ||
253 | static struct snd_soc_card wm1133_ev1 = { | 255 | static struct snd_soc_card wm1133_ev1 = { |
254 | .name = "WM1133-EV1", | 256 | .name = "WM1133-EV1", |
255 | .platform = &imx_soc_platform, | ||
256 | .dai_link = &wm1133_ev1_dai, | 257 | .dai_link = &wm1133_ev1_dai, |
257 | .num_links = 1, | 258 | .num_links = 1, |
258 | }; | 259 | }; |
259 | 260 | ||
260 | static struct snd_soc_device wm1133_ev1_snd_devdata = { | ||
261 | .card = &wm1133_ev1, | ||
262 | .codec_dev = &soc_codec_dev_wm8350, | ||
263 | }; | ||
264 | |||
265 | static struct platform_device *wm1133_ev1_snd_device; | 261 | static struct platform_device *wm1133_ev1_snd_device; |
266 | 262 | ||
267 | static int __init wm1133_ev1_audio_init(void) | 263 | static int __init wm1133_ev1_audio_init(void) |
@@ -286,8 +282,7 @@ static int __init wm1133_ev1_audio_init(void) | |||
286 | if (!wm1133_ev1_snd_device) | 282 | if (!wm1133_ev1_snd_device) |
287 | return -ENOMEM; | 283 | return -ENOMEM; |
288 | 284 | ||
289 | platform_set_drvdata(wm1133_ev1_snd_device, &wm1133_ev1_snd_devdata); | 285 | platform_set_drvdata(wm1133_ev1_snd_device, &wm1133_ev1); |
290 | wm1133_ev1_snd_devdata.dev = &wm1133_ev1_snd_device->dev; | ||
291 | ret = platform_device_add(wm1133_ev1_snd_device); | 286 | ret = platform_device_add(wm1133_ev1_snd_device); |
292 | 287 | ||
293 | if (ret) | 288 | if (ret) |