Commit 3310b57d authored by Bo Shen's avatar Bo Shen Committed by Mark Brown

ASoC: atmel-ssc-dai: match new method of dai and pcm register

Remove unneeded code with the new method of dai and pcm register
Signed-off-by: default avatarBo Shen <voice.shen@atmel.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent be681a82
...@@ -768,14 +768,6 @@ static inline void configure_ssc_pins(unsigned pins) ...@@ -768,14 +768,6 @@ static inline void configure_ssc_pins(unsigned pins)
at91_set_A_periph(AT91_PIN_PB21, 1); at91_set_A_periph(AT91_PIN_PB21, 1);
} }
static struct platform_device at91sam9260_ssc_dai_device = {
.name = "atmel-ssc-dai",
.id = 0,
.dev = {
.parent = &(at91sam9260_ssc_device.dev),
},
};
/* /*
* SSC controllers are accessed through library code, instead of any * SSC controllers are accessed through library code, instead of any
* kind of all-singing/all-dancing driver. For example one could be * kind of all-singing/all-dancing driver. For example one could be
...@@ -800,7 +792,6 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) ...@@ -800,7 +792,6 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins)
} }
platform_device_register(pdev); platform_device_register(pdev);
platform_device_register(&at91sam9260_ssc_dai_device);
} }
#else #else
......
...@@ -353,11 +353,6 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { ...@@ -353,11 +353,6 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
}, },
}; };
static struct platform_device sam9g20ek_pcm_device = {
.name = "atmel-pcm-audio",
.id = -1,
};
static struct platform_device sam9g20ek_audio_device = { static struct platform_device sam9g20ek_audio_device = {
.name = "at91sam9g20ek-audio", .name = "at91sam9g20ek-audio",
.id = -1, .id = -1,
...@@ -365,7 +360,6 @@ static struct platform_device sam9g20ek_audio_device = { ...@@ -365,7 +360,6 @@ static struct platform_device sam9g20ek_audio_device = {
static void __init ek_add_device_audio(void) static void __init ek_add_device_audio(void)
{ {
platform_device_register(&sam9g20ek_pcm_device);
platform_device_register(&sam9g20ek_audio_device); platform_device_register(&sam9g20ek_audio_device);
} }
......
...@@ -179,10 +179,10 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd) ...@@ -179,10 +179,10 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
static struct snd_soc_dai_link at91sam9g20ek_dai = { static struct snd_soc_dai_link at91sam9g20ek_dai = {
.name = "WM8731", .name = "WM8731",
.stream_name = "WM8731 PCM", .stream_name = "WM8731 PCM",
.cpu_dai_name = "atmel-ssc-dai.0", .cpu_dai_name = "at91rm9200_ssc.0",
.codec_dai_name = "wm8731-hifi", .codec_dai_name = "wm8731-hifi",
.init = at91sam9g20ek_wm8731_init, .init = at91sam9g20ek_wm8731_init,
.platform_name = "atmel-pcm-audio", .platform_name = "at91rm9200_ssc.0",
.codec_name = "wm8731.0-001b", .codec_name = "wm8731.0-001b",
.ops = &at91sam9g20ek_ops, .ops = &at91sam9g20ek_ops,
}; };
...@@ -204,6 +204,12 @@ static int __devinit at91sam9g20ek_audio_probe(struct platform_device *pdev) ...@@ -204,6 +204,12 @@ static int __devinit at91sam9g20ek_audio_probe(struct platform_device *pdev)
if (!(machine_is_at91sam9g20ek() || machine_is_at91sam9g20ek_2mmc())) if (!(machine_is_at91sam9g20ek() || machine_is_at91sam9g20ek_2mmc()))
return -ENODEV; return -ENODEV;
ret = atmel_ssc_set_audio(0);
if (ret) {
dev_err(&pdev->dev, "ssc channel is not valid\n");
return -EINVAL;
}
/* /*
* Codec MCLK is supplied by PCK0 - set it up. * Codec MCLK is supplied by PCK0 - set it up.
*/ */
...@@ -241,6 +247,7 @@ static int __devinit at91sam9g20ek_audio_probe(struct platform_device *pdev) ...@@ -241,6 +247,7 @@ static int __devinit at91sam9g20ek_audio_probe(struct platform_device *pdev)
clk_put(mclk); clk_put(mclk);
mclk = NULL; mclk = NULL;
err: err:
atmel_ssc_put_audio(0);
return ret; return ret;
} }
...@@ -248,6 +255,7 @@ static int __devexit at91sam9g20ek_audio_remove(struct platform_device *pdev) ...@@ -248,6 +255,7 @@ static int __devexit at91sam9g20ek_audio_remove(struct platform_device *pdev)
{ {
struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_card *card = platform_get_drvdata(pdev);
atmel_ssc_put_audio(0);
snd_soc_unregister_card(card); snd_soc_unregister_card(card);
clk_put(mclk); clk_put(mclk);
mclk = NULL; mclk = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment