aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc-dai.h8
-rw-r--r--include/sound/soc.h20
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.c11
-rw-r--r--sound/soc/au1x/ac97c.c9
-rw-r--r--sound/soc/au1x/i2sc.c9
-rw-r--r--sound/soc/au1x/psc-ac97.c9
-rw-r--r--sound/soc/au1x/psc-i2s.c9
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.c9
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c9
-rw-r--r--sound/soc/blackfin/bf5xx-tdm.c9
-rw-r--r--sound/soc/blackfin/bf6xx-i2s.c9
-rw-r--r--sound/soc/cirrus/ep93xx-ac97.c9
-rw-r--r--sound/soc/cirrus/ep93xx-i2s.c9
-rw-r--r--sound/soc/davinci/davinci-i2s.c15
-rw-r--r--sound/soc/davinci/davinci-mcasp.c15
-rw-r--r--sound/soc/davinci/davinci-vcif.c11
-rw-r--r--sound/soc/dwc/designware_i2s.c9
-rw-r--r--sound/soc/fsl/fsl_ssi.c11
-rw-r--r--sound/soc/fsl/imx-ssi.c11
-rw-r--r--sound/soc/fsl/mpc5200_psc_ac97.c8
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c9
-rw-r--r--sound/soc/jz4740/jz4740-i2s.c9
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c11
-rw-r--r--sound/soc/mid-x86/sst_platform.c8
-rw-r--r--sound/soc/mxs/mxs-saif.c11
-rw-r--r--sound/soc/nuc900/nuc900-ac97.c9
-rw-r--r--sound/soc/omap/omap-dmic.c9
-rw-r--r--sound/soc/omap/omap-hdmi.c9
-rw-r--r--sound/soc/omap/omap-mcbsp.c9
-rw-r--r--sound/soc/omap/omap-mcpdm.c9
-rw-r--r--sound/soc/pxa/mmp-sspa.c9
-rw-r--r--sound/soc/pxa/pxa-ssp.c9
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c11
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c9
-rw-r--r--sound/soc/s6000/s6000-i2s.c9
-rw-r--r--sound/soc/samsung/ac97.c12
-rw-r--r--sound/soc/samsung/goni_wm8994.c11
-rw-r--r--sound/soc/samsung/i2s.c14
-rw-r--r--sound/soc/samsung/pcm.c11
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.c9
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.h7
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c12
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c11
-rw-r--r--sound/soc/samsung/spdif.c11
-rw-r--r--sound/soc/sh/fsi.c12
-rw-r--r--sound/soc/sh/hac.c10
-rw-r--r--sound/soc/sh/migor.c2
-rw-r--r--sound/soc/sh/siu_dai.c11
-rw-r--r--sound/soc/sh/ssi.c10
-rw-r--r--sound/soc/soc-core.c99
-rw-r--r--sound/soc/spear/spdif_in.c9
-rw-r--r--sound/soc/spear/spdif_out.c9
-rw-r--r--sound/soc/tegra/tegra20_ac97.c15
-rw-r--r--sound/soc/tegra/tegra20_i2s.c15
-rw-r--r--sound/soc/tegra/tegra20_spdif.c15
-rw-r--r--sound/soc/tegra/tegra30_i2s.c15
-rw-r--r--sound/soc/tegra/tegra_wm9712.c2
-rw-r--r--sound/soc/txx9/txx9aclc-ac97.c9
-rw-r--r--sound/soc/ux500/ux500_msp_dai.c13
59 files changed, 522 insertions, 171 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 3d84808952b9..ae9a227d35d3 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -95,14 +95,6 @@ struct snd_soc_dai_driver;
95struct snd_soc_dai; 95struct snd_soc_dai;
96struct snd_ac97_bus_ops; 96struct snd_ac97_bus_ops;
97 97
98/* Digital Audio Interface registration */
99int snd_soc_register_dai(struct device *dev,
100 struct snd_soc_dai_driver *dai_drv);
101void snd_soc_unregister_dai(struct device *dev);
102int snd_soc_register_dais(struct device *dev,
103 struct snd_soc_dai_driver *dai_drv, size_t count);
104void snd_soc_unregister_dais(struct device *dev, size_t count);
105
106/* Digital Audio Interface clocking API.*/ 98/* Digital Audio Interface clocking API.*/
107int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, 99int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
108 unsigned int freq, int dir); 100 unsigned int freq, int dir);
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a6a059ca3874..44c9cbdc9fa2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -324,6 +324,8 @@ struct snd_soc_dai_link;
324struct snd_soc_platform_driver; 324struct snd_soc_platform_driver;
325struct snd_soc_codec; 325struct snd_soc_codec;
326struct snd_soc_codec_driver; 326struct snd_soc_codec_driver;
327struct snd_soc_component;
328struct snd_soc_component_driver;
327struct soc_enum; 329struct soc_enum;
328struct snd_soc_jack; 330struct snd_soc_jack;
329struct snd_soc_jack_zone; 331struct snd_soc_jack_zone;
@@ -377,6 +379,10 @@ int snd_soc_register_codec(struct device *dev,
377 const struct snd_soc_codec_driver *codec_drv, 379 const struct snd_soc_codec_driver *codec_drv,
378 struct snd_soc_dai_driver *dai_drv, int num_dai); 380 struct snd_soc_dai_driver *dai_drv, int num_dai);
379void snd_soc_unregister_codec(struct device *dev); 381void snd_soc_unregister_codec(struct device *dev);
382int snd_soc_register_component(struct device *dev,
383 const struct snd_soc_component_driver *cmpnt_drv,
384 struct snd_soc_dai_driver *dai_drv, int num_dai);
385void snd_soc_unregister_component(struct device *dev);
380int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, 386int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
381 unsigned int reg); 387 unsigned int reg);
382int snd_soc_codec_readable_register(struct snd_soc_codec *codec, 388int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
@@ -841,6 +847,20 @@ struct snd_soc_platform {
841#endif 847#endif
842}; 848};
843 849
850struct snd_soc_component_driver {
851 const char *name;
852};
853
854struct snd_soc_component {
855 const char *name;
856 int id;
857 int num_dai;
858 struct device *dev;
859 struct list_head list;
860
861 const struct snd_soc_component_driver *driver;
862};
863
844struct snd_soc_dai_link { 864struct snd_soc_dai_link {
845 /* config - must be set by machine driver */ 865 /* config - must be set by machine driver */
846 const char *name; /* Codec name */ 866 const char *name; /* Codec name */
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 94da62345a27..f3fdfa07fcb9 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -750,13 +750,18 @@ static struct snd_soc_dai_driver atmel_ssc_dai = {
750 .ops = &atmel_ssc_dai_ops, 750 .ops = &atmel_ssc_dai_ops,
751}; 751};
752 752
753static const struct snd_soc_component_driver atmel_ssc_component = {
754 .name = "atmel-ssc",
755};
756
753static int asoc_ssc_init(struct device *dev) 757static int asoc_ssc_init(struct device *dev)
754{ 758{
755 struct platform_device *pdev = to_platform_device(dev); 759 struct platform_device *pdev = to_platform_device(dev);
756 struct ssc_device *ssc = platform_get_drvdata(pdev); 760 struct ssc_device *ssc = platform_get_drvdata(pdev);
757 int ret; 761 int ret;
758 762
759 ret = snd_soc_register_dai(dev, &atmel_ssc_dai); 763 ret = snd_soc_register_component(dev, &atmel_ssc_component,
764 &atmel_ssc_dai, 1);
760 if (ret) { 765 if (ret) {
761 dev_err(dev, "Could not register DAI: %d\n", ret); 766 dev_err(dev, "Could not register DAI: %d\n", ret);
762 goto err; 767 goto err;
@@ -775,7 +780,7 @@ static int asoc_ssc_init(struct device *dev)
775 return 0; 780 return 0;
776 781
777err_unregister_dai: 782err_unregister_dai:
778 snd_soc_unregister_dai(dev); 783 snd_soc_unregister_component(dev);
779err: 784err:
780 return ret; 785 return ret;
781} 786}
@@ -790,7 +795,7 @@ static void asoc_ssc_exit(struct device *dev)
790 else 795 else
791 atmel_pcm_pdc_platform_unregister(dev); 796 atmel_pcm_pdc_platform_unregister(dev);
792 797
793 snd_soc_unregister_dai(dev); 798 snd_soc_unregister_component(dev);
794} 799}
795 800
796/** 801/**
diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c
index ea7d9d157022..44b8dcecf571 100644
--- a/sound/soc/au1x/ac97c.c
+++ b/sound/soc/au1x/ac97c.c
@@ -223,6 +223,10 @@ static struct snd_soc_dai_driver au1xac97c_dai_driver = {
223 .ops = &alchemy_ac97c_ops, 223 .ops = &alchemy_ac97c_ops,
224}; 224};
225 225
226static const struct snd_soc_component_driver au1xac97c_component = {
227 .name = "au1xac97c",
228};
229
226static int au1xac97c_drvprobe(struct platform_device *pdev) 230static int au1xac97c_drvprobe(struct platform_device *pdev)
227{ 231{
228 int ret; 232 int ret;
@@ -268,7 +272,8 @@ static int au1xac97c_drvprobe(struct platform_device *pdev)
268 272
269 platform_set_drvdata(pdev, ctx); 273 platform_set_drvdata(pdev, ctx);
270 274
271 ret = snd_soc_register_dai(&pdev->dev, &au1xac97c_dai_driver); 275 ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component,
276 &au1xac97c_dai_driver, 1);
272 if (ret) 277 if (ret)
273 return ret; 278 return ret;
274 279
@@ -280,7 +285,7 @@ static int au1xac97c_drvremove(struct platform_device *pdev)
280{ 285{
281 struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev); 286 struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
282 287
283 snd_soc_unregister_dai(&pdev->dev); 288 snd_soc_unregister_component(&pdev->dev);
284 289
285 WR(ctx, AC97_ENABLE, EN_D); /* clock off, disable */ 290 WR(ctx, AC97_ENABLE, EN_D); /* clock off, disable */
286 291
diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c
index 072448afc219..b3f37f6edbcb 100644
--- a/sound/soc/au1x/i2sc.c
+++ b/sound/soc/au1x/i2sc.c
@@ -225,6 +225,10 @@ static struct snd_soc_dai_driver au1xi2s_dai_driver = {
225 .ops = &au1xi2s_dai_ops, 225 .ops = &au1xi2s_dai_ops,
226}; 226};
227 227
228static const struct snd_soc_component_driver au1xi2s_component = {
229 .name = "au1xi2s",
230};
231
228static int au1xi2s_drvprobe(struct platform_device *pdev) 232static int au1xi2s_drvprobe(struct platform_device *pdev)
229{ 233{
230 struct resource *iores, *dmares; 234 struct resource *iores, *dmares;
@@ -260,14 +264,15 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
260 264
261 platform_set_drvdata(pdev, ctx); 265 platform_set_drvdata(pdev, ctx);
262 266
263 return snd_soc_register_dai(&pdev->dev, &au1xi2s_dai_driver); 267 return snd_soc_register_component(&pdev->dev, &au1xi2s_component,
268 &au1xi2s_dai_driver, 1);
264} 269}
265 270
266static int au1xi2s_drvremove(struct platform_device *pdev) 271static int au1xi2s_drvremove(struct platform_device *pdev)
267{ 272{
268 struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev); 273 struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
269 274
270 snd_soc_unregister_dai(&pdev->dev); 275 snd_soc_unregister_component(&pdev->dev);
271 276
272 WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ 277 WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */
273 278
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index 6ba07e365967..8f1862aa7333 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -361,6 +361,10 @@ static const struct snd_soc_dai_driver au1xpsc_ac97_dai_template = {
361 .ops = &au1xpsc_ac97_dai_ops, 361 .ops = &au1xpsc_ac97_dai_ops,
362}; 362};
363 363
364static const struct snd_soc_component_driver au1xpsc_ac97_component = {
365 .name = "au1xpsc-ac97",
366};
367
364static int au1xpsc_ac97_drvprobe(struct platform_device *pdev) 368static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
365{ 369{
366 int ret; 370 int ret;
@@ -419,7 +423,8 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
419 423
420 platform_set_drvdata(pdev, wd); 424 platform_set_drvdata(pdev, wd);
421 425
422 ret = snd_soc_register_dai(&pdev->dev, &wd->dai_drv); 426 ret = snd_soc_register_component(&pdev->dev, &au1xpsc_ac97_component,
427 &wd->dai_drv, 1);
423 if (ret) 428 if (ret)
424 return ret; 429 return ret;
425 430
@@ -431,7 +436,7 @@ static int au1xpsc_ac97_drvremove(struct platform_device *pdev)
431{ 436{
432 struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); 437 struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
433 438
434 snd_soc_unregister_dai(&pdev->dev); 439 snd_soc_unregister_component(&pdev->dev);
435 440
436 /* disable PSC completely */ 441 /* disable PSC completely */
437 au_writel(0, AC97_CFG(wd)); 442 au_writel(0, AC97_CFG(wd));
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 360b4e50d7c8..fe923a7bdc39 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -288,6 +288,10 @@ static const struct snd_soc_dai_driver au1xpsc_i2s_dai_template = {
288 .ops = &au1xpsc_i2s_dai_ops, 288 .ops = &au1xpsc_i2s_dai_ops,
289}; 289};
290 290
291static const struct snd_soc_component_driver au1xpsc_i2s_component = {
292 .name = "au1xpsc-i2s",
293};
294
291static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) 295static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
292{ 296{
293 struct resource *iores, *dmares; 297 struct resource *iores, *dmares;
@@ -350,14 +354,15 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
350 354
351 platform_set_drvdata(pdev, wd); 355 platform_set_drvdata(pdev, wd);
352 356
353 return snd_soc_register_dai(&pdev->dev, &wd->dai_drv); 357 return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
358 &wd->dai_drv, 1);
354} 359}
355 360
356static int au1xpsc_i2s_drvremove(struct platform_device *pdev) 361static int au1xpsc_i2s_drvremove(struct platform_device *pdev)
357{ 362{
358 struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); 363 struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
359 364
360 snd_soc_unregister_dai(&pdev->dev); 365 snd_soc_unregister_component(&pdev->dev);
361 366
362 au_writel(0, I2S_CFG(wd)); 367 au_writel(0, I2S_CFG(wd));
363 au_sync(); 368 au_sync();
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index 8e41bcb020eb..490217325975 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -282,6 +282,10 @@ static struct snd_soc_dai_driver bfin_ac97_dai = {
282 .formats = SNDRV_PCM_FMTBIT_S16_LE, }, 282 .formats = SNDRV_PCM_FMTBIT_S16_LE, },
283}; 283};
284 284
285static const struct snd_soc_component_driver bfin_ac97_component = {
286 .name = "bfin-ac97",
287};
288
285static int asoc_bfin_ac97_probe(struct platform_device *pdev) 289static int asoc_bfin_ac97_probe(struct platform_device *pdev)
286{ 290{
287 struct sport_device *sport_handle; 291 struct sport_device *sport_handle;
@@ -331,7 +335,8 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev)
331 goto sport_config_err; 335 goto sport_config_err;
332 } 336 }
333 337
334 ret = snd_soc_register_dai(&pdev->dev, &bfin_ac97_dai); 338 ret = snd_soc_register_component(&pdev->dev, &bfin_ac97_component,
339 &bfin_ac97_dai, 1);
335 if (ret) { 340 if (ret) {
336 pr_err("Failed to register DAI: %d\n", ret); 341 pr_err("Failed to register DAI: %d\n", ret);
337 goto sport_config_err; 342 goto sport_config_err;
@@ -356,7 +361,7 @@ static int asoc_bfin_ac97_remove(struct platform_device *pdev)
356{ 361{
357 struct sport_device *sport_handle = platform_get_drvdata(pdev); 362 struct sport_device *sport_handle = platform_get_drvdata(pdev);
358 363
359 snd_soc_unregister_dai(&pdev->dev); 364 snd_soc_unregister_component(&pdev->dev);
360 sport_done(sport_handle); 365 sport_done(sport_handle);
361#ifdef CONFIG_SND_BF5XX_HAVE_COLD_RESET 366#ifdef CONFIG_SND_BF5XX_HAVE_COLD_RESET
362 gpio_free(CONFIG_SND_BF5XX_RESET_GPIO_NUM); 367 gpio_free(CONFIG_SND_BF5XX_RESET_GPIO_NUM);
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 168d88bccb41..dd0c2a4f83a3 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -245,6 +245,10 @@ static struct snd_soc_dai_driver bf5xx_i2s_dai = {
245 .ops = &bf5xx_i2s_dai_ops, 245 .ops = &bf5xx_i2s_dai_ops,
246}; 246};
247 247
248static const struct snd_soc_component_driver bf5xx_i2s_component = {
249 .name = "bf5xx-i2s",
250};
251
248static int bf5xx_i2s_probe(struct platform_device *pdev) 252static int bf5xx_i2s_probe(struct platform_device *pdev)
249{ 253{
250 struct sport_device *sport_handle; 254 struct sport_device *sport_handle;
@@ -257,7 +261,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev)
257 return -ENODEV; 261 return -ENODEV;
258 262
259 /* register with the ASoC layers */ 263 /* register with the ASoC layers */
260 ret = snd_soc_register_dai(&pdev->dev, &bf5xx_i2s_dai); 264 ret = snd_soc_register_component(&pdev->dev, &bf5xx_i2s_component,
265 &bf5xx_i2s_dai, 1);
261 if (ret) { 266 if (ret) {
262 pr_err("Failed to register DAI: %d\n", ret); 267 pr_err("Failed to register DAI: %d\n", ret);
263 sport_done(sport_handle); 268 sport_done(sport_handle);
@@ -273,7 +278,7 @@ static int bf5xx_i2s_remove(struct platform_device *pdev)
273 278
274 pr_debug("%s enter\n", __func__); 279 pr_debug("%s enter\n", __func__);
275 280
276 snd_soc_unregister_dai(&pdev->dev); 281 snd_soc_unregister_component(&pdev->dev);
277 sport_done(sport_handle); 282 sport_done(sport_handle);
278 283
279 return 0; 284 return 0;
diff --git a/sound/soc/blackfin/bf5xx-tdm.c b/sound/soc/blackfin/bf5xx-tdm.c
index c1e516ec53ad..69e9a3e935bd 100644
--- a/sound/soc/blackfin/bf5xx-tdm.c
+++ b/sound/soc/blackfin/bf5xx-tdm.c
@@ -249,6 +249,10 @@ static struct snd_soc_dai_driver bf5xx_tdm_dai = {
249 .ops = &bf5xx_tdm_dai_ops, 249 .ops = &bf5xx_tdm_dai_ops,
250}; 250};
251 251
252static const struct snd_soc_component_driver bf5xx_tdm_component = {
253 .name = "bf5xx-tdm",
254};
255
252static int bfin_tdm_probe(struct platform_device *pdev) 256static int bfin_tdm_probe(struct platform_device *pdev)
253{ 257{
254 struct sport_device *sport_handle; 258 struct sport_device *sport_handle;
@@ -282,7 +286,8 @@ static int bfin_tdm_probe(struct platform_device *pdev)
282 goto sport_config_err; 286 goto sport_config_err;
283 } 287 }
284 288
285 ret = snd_soc_register_dai(&pdev->dev, &bf5xx_tdm_dai); 289 ret = snd_soc_register_component(&pdev->dev, &bf5xx_tdm_component,
290 &bf5xx_tdm_dai, 1);
286 if (ret) { 291 if (ret) {
287 pr_err("Failed to register DAI: %d\n", ret); 292 pr_err("Failed to register DAI: %d\n", ret);
288 goto sport_config_err; 293 goto sport_config_err;
@@ -299,7 +304,7 @@ static int bfin_tdm_remove(struct platform_device *pdev)
299{ 304{
300 struct sport_device *sport_handle = platform_get_drvdata(pdev); 305 struct sport_device *sport_handle = platform_get_drvdata(pdev);
301 306
302 snd_soc_unregister_dai(&pdev->dev); 307 snd_soc_unregister_component(&pdev->dev);
303 sport_done(sport_handle); 308 sport_done(sport_handle);
304 309
305 return 0; 310 return 0;
diff --git a/sound/soc/blackfin/bf6xx-i2s.c b/sound/soc/blackfin/bf6xx-i2s.c
index 8f337972f438..c02405cc007d 100644
--- a/sound/soc/blackfin/bf6xx-i2s.c
+++ b/sound/soc/blackfin/bf6xx-i2s.c
@@ -186,6 +186,10 @@ static struct snd_soc_dai_driver bfin_i2s_dai = {
186 .ops = &bfin_i2s_dai_ops, 186 .ops = &bfin_i2s_dai_ops,
187}; 187};
188 188
189static const struct snd_soc_component_driver bfin_i2s_component = {
190 .name = "bfin-i2s",
191};
192
189static int bfin_i2s_probe(struct platform_device *pdev) 193static int bfin_i2s_probe(struct platform_device *pdev)
190{ 194{
191 struct sport_device *sport; 195 struct sport_device *sport;
@@ -197,7 +201,8 @@ static int bfin_i2s_probe(struct platform_device *pdev)
197 return -ENODEV; 201 return -ENODEV;
198 202
199 /* register with the ASoC layers */ 203 /* register with the ASoC layers */
200 ret = snd_soc_register_dai(dev, &bfin_i2s_dai); 204 ret = snd_soc_register_component(dev, &bfin_i2s_component,
205 &bfin_i2s_dai, 1);
201 if (ret) { 206 if (ret) {
202 dev_err(dev, "Failed to register DAI: %d\n", ret); 207 dev_err(dev, "Failed to register DAI: %d\n", ret);
203 sport_delete(sport); 208 sport_delete(sport);
@@ -212,7 +217,7 @@ static int bfin_i2s_remove(struct platform_device *pdev)
212{ 217{
213 struct sport_device *sport = platform_get_drvdata(pdev); 218 struct sport_device *sport = platform_get_drvdata(pdev);
214 219
215 snd_soc_unregister_dai(&pdev->dev); 220 snd_soc_unregister_component(&pdev->dev);
216 sport_delete(sport); 221 sport_delete(sport);
217 222
218 return 0; 223 return 0;
diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c
index 1738d28fb04f..e593c1e4e1dd 100644
--- a/sound/soc/cirrus/ep93xx-ac97.c
+++ b/sound/soc/cirrus/ep93xx-ac97.c
@@ -353,6 +353,10 @@ static struct snd_soc_dai_driver ep93xx_ac97_dai = {
353 .ops = &ep93xx_ac97_dai_ops, 353 .ops = &ep93xx_ac97_dai_ops,
354}; 354};
355 355
356static const struct snd_soc_component_driver ep93xx_ac97_component = {
357 .name = "ep93xx-ac97",
358};
359
356static int ep93xx_ac97_probe(struct platform_device *pdev) 360static int ep93xx_ac97_probe(struct platform_device *pdev)
357{ 361{
358 struct ep93xx_ac97_info *info; 362 struct ep93xx_ac97_info *info;
@@ -390,7 +394,8 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
390 ep93xx_ac97_info = info; 394 ep93xx_ac97_info = info;
391 platform_set_drvdata(pdev, info); 395 platform_set_drvdata(pdev, info);
392 396
393 ret = snd_soc_register_dai(&pdev->dev, &ep93xx_ac97_dai); 397 ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component,
398 &ep93xx_ac97_dai, 1);
394 if (ret) 399 if (ret)
395 goto fail; 400 goto fail;
396 401
@@ -407,7 +412,7 @@ static int ep93xx_ac97_remove(struct platform_device *pdev)
407{ 412{
408 struct ep93xx_ac97_info *info = platform_get_drvdata(pdev); 413 struct ep93xx_ac97_info *info = platform_get_drvdata(pdev);
409 414
410 snd_soc_unregister_dai(&pdev->dev); 415 snd_soc_unregister_component(&pdev->dev);
411 416
412 /* disable the AC97 controller */ 417 /* disable the AC97 controller */
413 ep93xx_ac97_write_reg(info, AC97GCR, 0); 418 ep93xx_ac97_write_reg(info, AC97GCR, 0);
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 323ed69b7975..8d244be275d6 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -366,6 +366,10 @@ static struct snd_soc_dai_driver ep93xx_i2s_dai = {
366 .ops = &ep93xx_i2s_dai_ops, 366 .ops = &ep93xx_i2s_dai_ops,
367}; 367};
368 368
369static const struct snd_soc_component_driver ep93xx_i2s_component = {
370 .name = "ep93xx-i2s",
371};
372
369static int ep93xx_i2s_probe(struct platform_device *pdev) 373static int ep93xx_i2s_probe(struct platform_device *pdev)
370{ 374{
371 struct ep93xx_i2s_info *info; 375 struct ep93xx_i2s_info *info;
@@ -405,7 +409,8 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
405 dev_set_drvdata(&pdev->dev, info); 409 dev_set_drvdata(&pdev->dev, info);
406 info->dma_params = ep93xx_i2s_dma_params; 410 info->dma_params = ep93xx_i2s_dma_params;
407 411
408 err = snd_soc_register_dai(&pdev->dev, &ep93xx_i2s_dai); 412 err = snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
413 &ep93xx_i2s_dai, 1);
409 if (err) 414 if (err)
410 goto fail_put_lrclk; 415 goto fail_put_lrclk;
411 416
@@ -426,7 +431,7 @@ static int ep93xx_i2s_remove(struct platform_device *pdev)
426{ 431{
427 struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev); 432 struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
428 433
429 snd_soc_unregister_dai(&pdev->dev); 434 snd_soc_unregister_component(&pdev->dev);
430 dev_set_drvdata(&pdev->dev, NULL); 435 dev_set_drvdata(&pdev->dev, NULL);
431 clk_put(info->lrclk); 436 clk_put(info->lrclk);
432 clk_put(info->sclk); 437 clk_put(info->sclk);
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 821831207180..ebe82947bab3 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -645,6 +645,10 @@ static struct snd_soc_dai_driver davinci_i2s_dai = {
645 645
646}; 646};
647 647
648static const struct snd_soc_component_driver davinci_i2s_component = {
649 .name = "davinci-i2s",
650};
651
648static int davinci_i2s_probe(struct platform_device *pdev) 652static int davinci_i2s_probe(struct platform_device *pdev)
649{ 653{
650 struct snd_platform_data *pdata = pdev->dev.platform_data; 654 struct snd_platform_data *pdata = pdev->dev.platform_data;
@@ -727,20 +731,21 @@ static int davinci_i2s_probe(struct platform_device *pdev)
727 731
728 dev_set_drvdata(&pdev->dev, dev); 732 dev_set_drvdata(&pdev->dev, dev);
729 733
730 ret = snd_soc_register_dai(&pdev->dev, &davinci_i2s_dai); 734 ret = snd_soc_register_component(&pdev->dev, &davinci_i2s_component,
735 &davinci_i2s_dai, 1);
731 if (ret != 0) 736 if (ret != 0)
732 goto err_release_clk; 737 goto err_release_clk;
733 738
734 ret = davinci_soc_platform_register(&pdev->dev); 739 ret = davinci_soc_platform_register(&pdev->dev);
735 if (ret) { 740 if (ret) {
736 dev_err(&pdev->dev, "register PCM failed: %d\n", ret); 741 dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
737 goto err_unregister_dai; 742 goto err_unregister_component;
738 } 743 }
739 744
740 return 0; 745 return 0;
741 746
742err_unregister_dai: 747err_unregister_component:
743 snd_soc_unregister_dai(&pdev->dev); 748 snd_soc_unregister_component(&pdev->dev);
744err_release_clk: 749err_release_clk:
745 clk_disable(dev->clk); 750 clk_disable(dev->clk);
746 clk_put(dev->clk); 751 clk_put(dev->clk);
@@ -751,7 +756,7 @@ static int davinci_i2s_remove(struct platform_device *pdev)
751{ 756{
752 struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev); 757 struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev);
753 758
754 snd_soc_unregister_dai(&pdev->dev); 759 snd_soc_unregister_component(&pdev->dev);
755 davinci_soc_platform_unregister(&pdev->dev); 760 davinci_soc_platform_unregister(&pdev->dev);
756 761
757 clk_disable(dev->clk); 762 clk_disable(dev->clk);
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 9321e5c9d8c1..c2e67f1f194c 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -962,6 +962,10 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
962 962
963}; 963};
964 964
965static const struct snd_soc_component_driver davinci_mcasp_component = {
966 .name = "davinci-mcasp",
967};
968
965static const struct of_device_id mcasp_dt_ids[] = { 969static const struct of_device_id mcasp_dt_ids[] = {
966 { 970 {
967 .compatible = "ti,dm646x-mcasp-audio", 971 .compatible = "ti,dm646x-mcasp-audio",
@@ -1170,7 +1174,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1170 1174
1171 dma_data->channel = res->start; 1175 dma_data->channel = res->start;
1172 dev_set_drvdata(&pdev->dev, dev); 1176 dev_set_drvdata(&pdev->dev, dev);
1173 ret = snd_soc_register_dai(&pdev->dev, &davinci_mcasp_dai[pdata->op_mode]); 1177 ret = snd_soc_register_component(&pdev->dev, &davinci_mcasp_component,
1178 &davinci_mcasp_dai[pdata->op_mode], 1);
1174 1179
1175 if (ret != 0) 1180 if (ret != 0)
1176 goto err_release_clk; 1181 goto err_release_clk;
@@ -1178,13 +1183,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1178 ret = davinci_soc_platform_register(&pdev->dev); 1183 ret = davinci_soc_platform_register(&pdev->dev);
1179 if (ret) { 1184 if (ret) {
1180 dev_err(&pdev->dev, "register PCM failed: %d\n", ret); 1185 dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
1181 goto err_unregister_dai; 1186 goto err_unregister_component;
1182 } 1187 }
1183 1188
1184 return 0; 1189 return 0;
1185 1190
1186err_unregister_dai: 1191err_unregister_component:
1187 snd_soc_unregister_dai(&pdev->dev); 1192 snd_soc_unregister_component(&pdev->dev);
1188err_release_clk: 1193err_release_clk:
1189 pm_runtime_put_sync(&pdev->dev); 1194 pm_runtime_put_sync(&pdev->dev);
1190 pm_runtime_disable(&pdev->dev); 1195 pm_runtime_disable(&pdev->dev);
@@ -1194,7 +1199,7 @@ err_release_clk:
1194static int davinci_mcasp_remove(struct platform_device *pdev) 1199static int davinci_mcasp_remove(struct platform_device *pdev)
1195{ 1200{
1196 1201
1197 snd_soc_unregister_dai(&pdev->dev); 1202 snd_soc_unregister_component(&pdev->dev);
1198 davinci_soc_platform_unregister(&pdev->dev); 1203 davinci_soc_platform_unregister(&pdev->dev);
1199 1204
1200 pm_runtime_put_sync(&pdev->dev); 1205 pm_runtime_put_sync(&pdev->dev);
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
index 07bde2e6f84e..30587c0cdbd2 100644
--- a/sound/soc/davinci/davinci-vcif.c
+++ b/sound/soc/davinci/davinci-vcif.c
@@ -204,6 +204,10 @@ static struct snd_soc_dai_driver davinci_vcif_dai = {
204 204
205}; 205};
206 206
207static const struct snd_soc_component_driver davinci_vcif_component = {
208 .name = "davinci-vcif",
209};
210
207static int davinci_vcif_probe(struct platform_device *pdev) 211static int davinci_vcif_probe(struct platform_device *pdev)
208{ 212{
209 struct davinci_vc *davinci_vc = pdev->dev.platform_data; 213 struct davinci_vc *davinci_vc = pdev->dev.platform_data;
@@ -234,7 +238,8 @@ static int davinci_vcif_probe(struct platform_device *pdev)
234 238
235 dev_set_drvdata(&pdev->dev, davinci_vcif_dev); 239 dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
236 240
237 ret = snd_soc_register_dai(&pdev->dev, &davinci_vcif_dai); 241 ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
242 &davinci_vcif_dai, 1);
238 if (ret != 0) { 243 if (ret != 0) {
239 dev_err(&pdev->dev, "could not register dai\n"); 244 dev_err(&pdev->dev, "could not register dai\n");
240 return ret; 245 return ret;
@@ -243,7 +248,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
243 ret = davinci_soc_platform_register(&pdev->dev); 248 ret = davinci_soc_platform_register(&pdev->dev);
244 if (ret) { 249 if (ret) {
245 dev_err(&pdev->dev, "register PCM failed: %d\n", ret); 250 dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
246 snd_soc_unregister_dai(&pdev->dev); 251 snd_soc_unregister_component(&pdev->dev);
247 return ret; 252 return ret;
248 } 253 }
249 254
@@ -252,7 +257,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
252 257
253static int davinci_vcif_remove(struct platform_device *pdev) 258static int davinci_vcif_remove(struct platform_device *pdev)
254{ 259{
255 snd_soc_unregister_dai(&pdev->dev); 260 snd_soc_unregister_component(&pdev->dev);
256 davinci_soc_platform_unregister(&pdev->dev); 261 davinci_soc_platform_unregister(&pdev->dev);
257 262
258 return 0; 263 return 0;
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index deb30d59965e..593a3ea12d4c 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -297,6 +297,10 @@ static struct snd_soc_dai_ops dw_i2s_dai_ops = {
297 .trigger = dw_i2s_trigger, 297 .trigger = dw_i2s_trigger,
298}; 298};
299 299
300static const struct snd_soc_component_driver dw_i2s_component = {
301 .name = "dw-i2s",
302};
303
300#ifdef CONFIG_PM 304#ifdef CONFIG_PM
301 305
302static int dw_i2s_suspend(struct snd_soc_dai *dai) 306static int dw_i2s_suspend(struct snd_soc_dai *dai)
@@ -413,7 +417,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
413 417
414 dev->dev = &pdev->dev; 418 dev->dev = &pdev->dev;
415 dev_set_drvdata(&pdev->dev, dev); 419 dev_set_drvdata(&pdev->dev, dev);
416 ret = snd_soc_register_dai(&pdev->dev, dw_i2s_dai); 420 ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component,
421 dw_i2s_dai, 1);
417 if (ret != 0) { 422 if (ret != 0) {
418 dev_err(&pdev->dev, "not able to register dai\n"); 423 dev_err(&pdev->dev, "not able to register dai\n");
419 goto err_set_drvdata; 424 goto err_set_drvdata;
@@ -434,7 +439,7 @@ static int dw_i2s_remove(struct platform_device *pdev)
434{ 439{
435 struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev); 440 struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev);
436 441
437 snd_soc_unregister_dai(&pdev->dev); 442 snd_soc_unregister_component(&pdev->dev);
438 dev_set_drvdata(&pdev->dev, NULL); 443 dev_set_drvdata(&pdev->dev, NULL);
439 444
440 clk_put(dev->clk); 445 clk_put(dev->clk);
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 7decbd9b2340..fe04c67f8fb8 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -574,6 +574,10 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = {
574 .ops = &fsl_ssi_dai_ops, 574 .ops = &fsl_ssi_dai_ops,
575}; 575};
576 576
577static const struct snd_soc_component_driver fsl_ssi_component = {
578 .name = "fsl-ssi",
579};
580
577/* Show the statistics of a flag only if its interrupt is enabled. The 581/* Show the statistics of a flag only if its interrupt is enabled. The
578 * compiler will optimze this code to a no-op if the interrupt is not 582 * compiler will optimze this code to a no-op if the interrupt is not
579 * enabled. 583 * enabled.
@@ -782,7 +786,8 @@ static int fsl_ssi_probe(struct platform_device *pdev)
782 /* Register with ASoC */ 786 /* Register with ASoC */
783 dev_set_drvdata(&pdev->dev, ssi_private); 787 dev_set_drvdata(&pdev->dev, ssi_private);
784 788
785 ret = snd_soc_register_dai(&pdev->dev, &ssi_private->cpu_dai_drv); 789 ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component,
790 &ssi_private->cpu_dai_drv, 1);
786 if (ret) { 791 if (ret) {
787 dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); 792 dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
788 goto error_dev; 793 goto error_dev;
@@ -835,7 +840,7 @@ done:
835error_dai: 840error_dai:
836 if (ssi_private->ssi_on_imx) 841 if (ssi_private->ssi_on_imx)
837 platform_device_unregister(ssi_private->imx_pcm_pdev); 842 platform_device_unregister(ssi_private->imx_pcm_pdev);
838 snd_soc_unregister_dai(&pdev->dev); 843 snd_soc_unregister_component(&pdev->dev);
839 844
840error_dev: 845error_dev:
841 dev_set_drvdata(&pdev->dev, NULL); 846 dev_set_drvdata(&pdev->dev, NULL);
@@ -873,7 +878,7 @@ static int fsl_ssi_remove(struct platform_device *pdev)
873 clk_disable_unprepare(ssi_private->clk); 878 clk_disable_unprepare(ssi_private->clk);
874 clk_put(ssi_private->clk); 879 clk_put(ssi_private->clk);
875 } 880 }
876 snd_soc_unregister_dai(&pdev->dev); 881 snd_soc_unregister_component(&pdev->dev);
877 device_remove_file(&pdev->dev, &ssi_private->dev_attr); 882 device_remove_file(&pdev->dev, &ssi_private->dev_attr);
878 883
879 free_irq(ssi_private->irq, ssi_private); 884 free_irq(ssi_private->irq, ssi_private);
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 810c7eeb7b03..4a26d88d7236 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -413,6 +413,10 @@ static struct snd_soc_dai_driver imx_ac97_dai = {
413 .ops = &imx_ssi_pcm_dai_ops, 413 .ops = &imx_ssi_pcm_dai_ops,
414}; 414};
415 415
416static const struct snd_soc_component_driver imx_component = {
417 .name = DRV_NAME,
418};
419
416static void setup_channel_to_ac97(struct imx_ssi *imx_ssi) 420static void setup_channel_to_ac97(struct imx_ssi *imx_ssi)
417{ 421{
418 void __iomem *base = imx_ssi->base; 422 void __iomem *base = imx_ssi->base;
@@ -591,7 +595,8 @@ static int imx_ssi_probe(struct platform_device *pdev)
591 595
592 platform_set_drvdata(pdev, ssi); 596 platform_set_drvdata(pdev, ssi);
593 597
594 ret = snd_soc_register_dai(&pdev->dev, dai); 598 ret = snd_soc_register_component(&pdev->dev, &imx_component,
599 dai, 1);
595 if (ret) { 600 if (ret) {
596 dev_err(&pdev->dev, "register DAI failed\n"); 601 dev_err(&pdev->dev, "register DAI failed\n");
597 goto failed_register; 602 goto failed_register;
@@ -632,7 +637,7 @@ failed_pdev_alloc:
632failed_pdev_fiq_add: 637failed_pdev_fiq_add:
633 platform_device_put(ssi->soc_platform_pdev_fiq); 638 platform_device_put(ssi->soc_platform_pdev_fiq);
634failed_pdev_fiq_alloc: 639failed_pdev_fiq_alloc:
635 snd_soc_unregister_dai(&pdev->dev); 640 snd_soc_unregister_component(&pdev->dev);
636failed_register: 641failed_register:
637 release_mem_region(res->start, resource_size(res)); 642 release_mem_region(res->start, resource_size(res));
638failed_get_resource: 643failed_get_resource:
@@ -650,7 +655,7 @@ static int imx_ssi_remove(struct platform_device *pdev)
650 platform_device_unregister(ssi->soc_platform_pdev); 655 platform_device_unregister(ssi->soc_platform_pdev);
651 platform_device_unregister(ssi->soc_platform_pdev_fiq); 656 platform_device_unregister(ssi->soc_platform_pdev_fiq);
652 657
653 snd_soc_unregister_dai(&pdev->dev); 658 snd_soc_unregister_component(&pdev->dev);
654 659
655 if (ssi->flags & IMX_SSI_USE_AC97) 660 if (ssi->flags & IMX_SSI_USE_AC97)
656 ac97_ssi = NULL; 661 ac97_ssi = NULL;
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index a4aec0488dd3..4141b35ef0bb 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -270,6 +270,9 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
270 .ops = &psc_ac97_digital_ops, 270 .ops = &psc_ac97_digital_ops,
271} }; 271} };
272 272
273static const struct snd_soc_component_driver psc_ac97_component = {
274 .name = DRV_NAME,
275};
273 276
274 277
275/* --------------------------------------------------------------------- 278/* ---------------------------------------------------------------------
@@ -287,7 +290,8 @@ static int psc_ac97_of_probe(struct platform_device *op)
287 if (rc != 0) 290 if (rc != 0)
288 return rc; 291 return rc;
289 292
290 rc = snd_soc_register_dais(&op->dev, psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai)); 293 rc = snd_soc_register_component(&op->dev, &psc_ac97_component,
294 psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai));
291 if (rc != 0) { 295 if (rc != 0) {
292 dev_err(&op->dev, "Failed to register DAI\n"); 296 dev_err(&op->dev, "Failed to register DAI\n");
293 return rc; 297 return rc;
@@ -313,7 +317,7 @@ static int psc_ac97_of_probe(struct platform_device *op)
313static int psc_ac97_of_remove(struct platform_device *op) 317static int psc_ac97_of_remove(struct platform_device *op)
314{ 318{
315 mpc5200_audio_dma_destroy(op); 319 mpc5200_audio_dma_destroy(op);
316 snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_ac97_dai)); 320 snd_soc_unregister_component(&op->dev);
317 return 0; 321 return 0;
318} 322}
319 323
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index b95b966f25a0..f4efaadb80a2 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -148,6 +148,10 @@ static struct snd_soc_dai_driver psc_i2s_dai[] = {{
148 .ops = &psc_i2s_dai_ops, 148 .ops = &psc_i2s_dai_ops,
149} }; 149} };
150 150
151static const struct snd_soc_component_driver psc_i2s_component = {
152 .name = "mpc5200-i2s",
153};
154
151/* --------------------------------------------------------------------- 155/* ---------------------------------------------------------------------
152 * OF platform bus binding code: 156 * OF platform bus binding code:
153 * - Probe/remove operations 157 * - Probe/remove operations
@@ -163,7 +167,8 @@ static int psc_i2s_of_probe(struct platform_device *op)
163 if (rc != 0) 167 if (rc != 0)
164 return rc; 168 return rc;
165 169
166 rc = snd_soc_register_dais(&op->dev, psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai)); 170 rc = snd_soc_register_component(&op->dev, &psc_i2s_component,
171 psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai));
167 if (rc != 0) { 172 if (rc != 0) {
168 pr_err("Failed to register DAI\n"); 173 pr_err("Failed to register DAI\n");
169 return rc; 174 return rc;
@@ -208,7 +213,7 @@ static int psc_i2s_of_probe(struct platform_device *op)
208static int psc_i2s_of_remove(struct platform_device *op) 213static int psc_i2s_of_remove(struct platform_device *op)
209{ 214{
210 mpc5200_audio_dma_destroy(op); 215 mpc5200_audio_dma_destroy(op);
211 snd_soc_unregister_dais(&op->dev, ARRAY_SIZE(psc_i2s_dai)); 216 snd_soc_unregister_component(&op->dev);
212 return 0; 217 return 0;
213} 218}
214 219
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 6cef491f4823..9a126441c5f3 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -425,6 +425,10 @@ static struct snd_soc_dai_driver jz4740_i2s_dai = {
425 .resume = jz4740_i2s_resume, 425 .resume = jz4740_i2s_resume,
426}; 426};
427 427
428static const struct snd_soc_component_driver jz4740_i2s_component = {
429 .name = "jz4740-i2s",
430};
431
428static int jz4740_i2s_dev_probe(struct platform_device *pdev) 432static int jz4740_i2s_dev_probe(struct platform_device *pdev)
429{ 433{
430 struct jz4740_i2s *i2s; 434 struct jz4740_i2s *i2s;
@@ -469,7 +473,8 @@ static int jz4740_i2s_dev_probe(struct platform_device *pdev)
469 } 473 }
470 474
471 platform_set_drvdata(pdev, i2s); 475 platform_set_drvdata(pdev, i2s);
472 ret = snd_soc_register_dai(&pdev->dev, &jz4740_i2s_dai); 476 ret = snd_soc_register_component(&pdev->dev, &jz4740_i2s_component,
477 &jz4740_i2s_dai, 1);
473 478
474 if (ret) { 479 if (ret) {
475 dev_err(&pdev->dev, "Failed to register DAI\n"); 480 dev_err(&pdev->dev, "Failed to register DAI\n");
@@ -496,7 +501,7 @@ static int jz4740_i2s_dev_remove(struct platform_device *pdev)
496{ 501{
497 struct jz4740_i2s *i2s = platform_get_drvdata(pdev); 502 struct jz4740_i2s *i2s = platform_get_drvdata(pdev);
498 503
499 snd_soc_unregister_dai(&pdev->dev); 504 snd_soc_unregister_component(&pdev->dev);
500 505
501 clk_put(i2s->clk_i2s); 506 clk_put(i2s->clk_i2s);
502 clk_put(i2s->clk_aic); 507 clk_put(i2s->clk_aic);
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index c74c89065493..befe68f59285 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -451,6 +451,10 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk = {
451 .ops = &kirkwood_i2s_dai_ops, 451 .ops = &kirkwood_i2s_dai_ops,
452}; 452};
453 453
454static const struct snd_soc_component_driver kirkwood_i2s_component = {
455 .name = DRV_NAME,
456};
457
454static int kirkwood_i2s_dev_probe(struct platform_device *pdev) 458static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
455{ 459{
456 struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data; 460 struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data;
@@ -524,10 +528,11 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
524 priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_128; 528 priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_128;
525 } 529 }
526 530
527 err = snd_soc_register_dai(&pdev->dev, soc_dai); 531 err = snd_soc_register_component(&pdev->dev, &kirkwood_i2s_component,
532 soc_dai, 1);
528 if (!err) 533 if (!err)
529 return 0; 534 return 0;
530 dev_err(&pdev->dev, "snd_soc_register_dai failed\n"); 535 dev_err(&pdev->dev, "snd_soc_register_component failed\n");
531 536
532 if (!IS_ERR(priv->extclk)) { 537 if (!IS_ERR(priv->extclk)) {
533 clk_disable_unprepare(priv->extclk); 538 clk_disable_unprepare(priv->extclk);
@@ -542,7 +547,7 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev)
542{ 547{
543 struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); 548 struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev);
544 549
545 snd_soc_unregister_dai(&pdev->dev); 550 snd_soc_unregister_component(&pdev->dev);
546 551
547 if (!IS_ERR(priv->extclk)) { 552 if (!IS_ERR(priv->extclk)) {
548 clk_disable_unprepare(priv->extclk); 553 clk_disable_unprepare(priv->extclk);
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index a263cbed8624..31a829cca5ef 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -165,6 +165,10 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
165}, 165},
166}; 166};
167 167
168static const struct snd_soc_component_driver sst_component = {
169 .name = "sst",
170};
171
168/* helper functions */ 172/* helper functions */
169static inline void sst_set_stream_status(struct sst_runtime_stream *stream, 173static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
170 int state) 174 int state)
@@ -683,7 +687,7 @@ static int sst_platform_probe(struct platform_device *pdev)
683 return ret; 687 return ret;
684 } 688 }
685 689
686 ret = snd_soc_register_dais(&pdev->dev, 690 ret = snd_soc_register_component(&pdev->dev, &sst_component,
687 sst_platform_dai, ARRAY_SIZE(sst_platform_dai)); 691 sst_platform_dai, ARRAY_SIZE(sst_platform_dai));
688 if (ret) { 692 if (ret) {
689 pr_err("registering cpu dais failed\n"); 693 pr_err("registering cpu dais failed\n");
@@ -695,7 +699,7 @@ static int sst_platform_probe(struct platform_device *pdev)
695static int sst_platform_remove(struct platform_device *pdev) 699static int sst_platform_remove(struct platform_device *pdev)
696{ 700{
697 701
698 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sst_platform_dai)); 702 snd_soc_unregister_component(&pdev->dev);
699 snd_soc_unregister_platform(&pdev->dev); 703 snd_soc_unregister_platform(&pdev->dev);
700 pr_debug("sst_platform_remove success\n"); 704 pr_debug("sst_platform_remove success\n");
701 return 0; 705 return 0;
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 3a2aa1d19b93..3e78ba866681 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -627,6 +627,10 @@ static struct snd_soc_dai_driver mxs_saif_dai = {
627 .ops = &mxs_saif_dai_ops, 627 .ops = &mxs_saif_dai_ops,
628}; 628};
629 629
630static const struct snd_soc_component_driver mxs_saif_component = {
631 .name = "mxs-saif",
632};
633
630static irqreturn_t mxs_saif_irq(int irq, void *dev_id) 634static irqreturn_t mxs_saif_irq(int irq, void *dev_id)
631{ 635{
632 struct mxs_saif *saif = dev_id; 636 struct mxs_saif *saif = dev_id;
@@ -763,7 +767,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
763 767
764 platform_set_drvdata(pdev, saif); 768 platform_set_drvdata(pdev, saif);
765 769
766 ret = snd_soc_register_dai(&pdev->dev, &mxs_saif_dai); 770 ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component,
771 &mxs_saif_dai, 1);
767 if (ret) { 772 if (ret) {
768 dev_err(&pdev->dev, "register DAI failed\n"); 773 dev_err(&pdev->dev, "register DAI failed\n");
769 return ret; 774 return ret;
@@ -778,7 +783,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
778 return 0; 783 return 0;
779 784
780failed_pdev_alloc: 785failed_pdev_alloc:
781 snd_soc_unregister_dai(&pdev->dev); 786 snd_soc_unregister_component(&pdev->dev);
782 787
783 return ret; 788 return ret;
784} 789}
@@ -786,7 +791,7 @@ failed_pdev_alloc:
786static int mxs_saif_remove(struct platform_device *pdev) 791static int mxs_saif_remove(struct platform_device *pdev)
787{ 792{
788 mxs_pcm_platform_unregister(&pdev->dev); 793 mxs_pcm_platform_unregister(&pdev->dev);
789 snd_soc_unregister_dai(&pdev->dev); 794 snd_soc_unregister_component(&pdev->dev);
790 795
791 return 0; 796 return 0;
792} 797}
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 0418467a4848..fe3285ceaf5b 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -314,6 +314,10 @@ static struct snd_soc_dai_driver nuc900_ac97_dai = {
314 .ops = &nuc900_ac97_dai_ops, 314 .ops = &nuc900_ac97_dai_ops,
315}; 315};
316 316
317static const struct snd_soc_component_driver nuc900_ac97_component = {
318 .name = "nuc900-ac97",
319};
320
317static int nuc900_ac97_drvprobe(struct platform_device *pdev) 321static int nuc900_ac97_drvprobe(struct platform_device *pdev)
318{ 322{
319 struct nuc900_audio *nuc900_audio; 323 struct nuc900_audio *nuc900_audio;
@@ -361,7 +365,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
361 365
362 nuc900_ac97_data = nuc900_audio; 366 nuc900_ac97_data = nuc900_audio;
363 367
364 ret = snd_soc_register_dai(&pdev->dev, &nuc900_ac97_dai); 368 ret = snd_soc_register_component(&pdev->dev, &nuc900_ac97_component,
369 &nuc900_ac97_dai, 1);
365 if (ret) 370 if (ret)
366 goto out3; 371 goto out3;
367 372
@@ -384,7 +389,7 @@ out0:
384 389
385static int nuc900_ac97_drvremove(struct platform_device *pdev) 390static int nuc900_ac97_drvremove(struct platform_device *pdev)
386{ 391{
387 snd_soc_unregister_dai(&pdev->dev); 392 snd_soc_unregister_component(&pdev->dev);
388 393
389 clk_put(nuc900_ac97_data->clk); 394 clk_put(nuc900_ac97_data->clk);
390 iounmap(nuc900_ac97_data->mmio); 395 iounmap(nuc900_ac97_data->mmio);
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd9eed9..4c54542895b0 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -448,6 +448,10 @@ static struct snd_soc_dai_driver omap_dmic_dai = {
448 .ops = &omap_dmic_dai_ops, 448 .ops = &omap_dmic_dai_ops,
449}; 449};
450 450
451static const struct snd_soc_component_driver omap_dmic_component = {
452 .name = "omap-dmic",
453};
454
451static int asoc_dmic_probe(struct platform_device *pdev) 455static int asoc_dmic_probe(struct platform_device *pdev)
452{ 456{
453 struct omap_dmic *dmic; 457 struct omap_dmic *dmic;
@@ -507,7 +511,8 @@ static int asoc_dmic_probe(struct platform_device *pdev)
507 goto err_put_clk; 511 goto err_put_clk;
508 } 512 }
509 513
510 ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai); 514 ret = snd_soc_register_component(&pdev->dev, &omap_dmic_component,
515 &omap_dmic_dai, 1);
511 if (ret) 516 if (ret)
512 goto err_put_clk; 517 goto err_put_clk;
513 518
@@ -522,7 +527,7 @@ static int asoc_dmic_remove(struct platform_device *pdev)
522{ 527{
523 struct omap_dmic *dmic = platform_get_drvdata(pdev); 528 struct omap_dmic *dmic = platform_get_drvdata(pdev);
524 529
525 snd_soc_unregister_dai(&pdev->dev); 530 snd_soc_unregister_component(&pdev->dev);
526 clk_put(dmic->fclk); 531 clk_put(dmic->fclk);
527 532
528 return 0; 533 return 0;
diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index 32fa840c493e..7e120ccc20e1 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -264,6 +264,10 @@ static struct snd_soc_dai_driver omap_hdmi_dai = {
264 .ops = &omap_hdmi_dai_ops, 264 .ops = &omap_hdmi_dai_ops,
265}; 265};
266 266
267static const struct snd_soc_component_driver omap_hdmi_component = {
268 .name = DRV_NAME,
269};
270
267static int omap_hdmi_probe(struct platform_device *pdev) 271static int omap_hdmi_probe(struct platform_device *pdev)
268{ 272{
269 int ret; 273 int ret;
@@ -321,7 +325,8 @@ static int omap_hdmi_probe(struct platform_device *pdev)
321 } 325 }
322 326
323 dev_set_drvdata(&pdev->dev, hdmi_data); 327 dev_set_drvdata(&pdev->dev, hdmi_data);
324 ret = snd_soc_register_dai(&pdev->dev, &omap_hdmi_dai); 328 ret = snd_soc_register_component(&pdev->dev, &omap_hdmi_component,
329 &omap_hdmi_dai, 1);
325 330
326 return ret; 331 return ret;
327} 332}
@@ -330,7 +335,7 @@ static int omap_hdmi_remove(struct platform_device *pdev)
330{ 335{
331 struct hdmi_priv *hdmi_data = dev_get_drvdata(&pdev->dev); 336 struct hdmi_priv *hdmi_data = dev_get_drvdata(&pdev->dev);
332 337
333 snd_soc_unregister_dai(&pdev->dev); 338 snd_soc_unregister_component(&pdev->dev);
334 339
335 if (hdmi_data == NULL) { 340 if (hdmi_data == NULL) {
336 dev_err(&pdev->dev, "cannot obtain HDMi data\n"); 341 dev_err(&pdev->dev, "cannot obtain HDMi data\n");
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 8d2defd6fdbe..f51685d72fdb 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -586,6 +586,10 @@ static struct snd_soc_dai_driver omap_mcbsp_dai = {
586 .ops = &mcbsp_dai_ops, 586 .ops = &mcbsp_dai_ops,
587}; 587};
588 588
589static const struct snd_soc_component_driver omap_mcbsp_component = {
590 .name = "omap-mcbsp",
591};
592
589static int omap_mcbsp_st_info_volsw(struct snd_kcontrol *kcontrol, 593static int omap_mcbsp_st_info_volsw(struct snd_kcontrol *kcontrol,
590 struct snd_ctl_elem_info *uinfo) 594 struct snd_ctl_elem_info *uinfo)
591{ 595{
@@ -793,7 +797,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
793 797
794 ret = omap_mcbsp_init(pdev); 798 ret = omap_mcbsp_init(pdev);
795 if (!ret) 799 if (!ret)
796 return snd_soc_register_dai(&pdev->dev, &omap_mcbsp_dai); 800 return snd_soc_register_component(&pdev->dev, &omap_mcbsp_component,
801 &omap_mcbsp_dai, 1);
797 802
798 return ret; 803 return ret;
799} 804}
@@ -802,7 +807,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
802{ 807{
803 struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); 808 struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
804 809
805 snd_soc_unregister_dai(&pdev->dev); 810 snd_soc_unregister_component(&pdev->dev);
806 811
807 if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) 812 if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
808 mcbsp->pdata->ops->free(mcbsp->id); 813 mcbsp->pdata->ops->free(mcbsp->id);
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 5ca11bdac21e..4cc98071aa91 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -420,6 +420,10 @@ static struct snd_soc_dai_driver omap_mcpdm_dai = {
420 .ops = &omap_mcpdm_dai_ops, 420 .ops = &omap_mcpdm_dai_ops,
421}; 421};
422 422
423static const struct snd_soc_component_driver omap_mcpdm_component = {
424 .name = "omap-mcpdm",
425};
426
423void omap_mcpdm_configure_dn_offsets(struct snd_soc_pcm_runtime *rtd, 427void omap_mcpdm_configure_dn_offsets(struct snd_soc_pcm_runtime *rtd,
424 u8 rx1, u8 rx2) 428 u8 rx1, u8 rx2)
425{ 429{
@@ -480,12 +484,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
480 484
481 mcpdm->dev = &pdev->dev; 485 mcpdm->dev = &pdev->dev;
482 486
483 return snd_soc_register_dai(&pdev->dev, &omap_mcpdm_dai); 487 return snd_soc_register_component(&pdev->dev, &omap_mcpdm_component,
488 &omap_mcpdm_dai, 1);
484} 489}
485 490
486static int asoc_mcpdm_remove(struct platform_device *pdev) 491static int asoc_mcpdm_remove(struct platform_device *pdev)
487{ 492{
488 snd_soc_unregister_dai(&pdev->dev); 493 snd_soc_unregister_component(&pdev->dev);
489 return 0; 494 return 0;
490} 495}
491 496
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 9140c4abafbc..a64779980177 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -405,6 +405,10 @@ struct snd_soc_dai_driver mmp_sspa_dai = {
405 .ops = &mmp_sspa_dai_ops, 405 .ops = &mmp_sspa_dai_ops,
406}; 406};
407 407
408static const struct snd_soc_component_driver mmp_sspa_component = {
409 .name = "mmp-sspa",
410};
411
408static int asoc_mmp_sspa_probe(struct platform_device *pdev) 412static int asoc_mmp_sspa_probe(struct platform_device *pdev)
409{ 413{
410 struct sspa_priv *priv; 414 struct sspa_priv *priv;
@@ -450,7 +454,8 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
450 priv->dai_fmt = (unsigned int) -1; 454 priv->dai_fmt = (unsigned int) -1;
451 platform_set_drvdata(pdev, priv); 455 platform_set_drvdata(pdev, priv);
452 456
453 return snd_soc_register_dai(&pdev->dev, &mmp_sspa_dai); 457 return snd_soc_register_component(&pdev->dev, &mmp_sspa_component,
458 &mmp_sspa_dai, 1);
454} 459}
455 460
456static int asoc_mmp_sspa_remove(struct platform_device *pdev) 461static int asoc_mmp_sspa_remove(struct platform_device *pdev)
@@ -460,7 +465,7 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev)
460 clk_disable(priv->audio_clk); 465 clk_disable(priv->audio_clk);
461 clk_put(priv->audio_clk); 466 clk_put(priv->audio_clk);
462 clk_put(priv->sysclk); 467 clk_put(priv->sysclk);
463 snd_soc_unregister_dai(&pdev->dev); 468 snd_soc_unregister_component(&pdev->dev);
464 return 0; 469 return 0;
465} 470}
466 471
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index d3eb0c2eec77..6f4dd7543e82 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -794,14 +794,19 @@ static struct snd_soc_dai_driver pxa_ssp_dai = {
794 .ops = &pxa_ssp_dai_ops, 794 .ops = &pxa_ssp_dai_ops,
795}; 795};
796 796
797static const struct snd_soc_component_driver pxa_ssp_component = {
798 .name = "pxa-ssp",
799};
800
797static int asoc_ssp_probe(struct platform_device *pdev) 801static int asoc_ssp_probe(struct platform_device *pdev)
798{ 802{
799 return snd_soc_register_dai(&pdev->dev, &pxa_ssp_dai); 803 return snd_soc_register_component(&pdev->dev, &pxa_ssp_component,
804 &pxa_ssp_dai, 1);
800} 805}
801 806
802static int asoc_ssp_remove(struct platform_device *pdev) 807static int asoc_ssp_remove(struct platform_device *pdev)
803{ 808{
804 snd_soc_unregister_dai(&pdev->dev); 809 snd_soc_unregister_component(&pdev->dev);
805 return 0; 810 return 0;
806} 811}
807 812
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 4b0a009bd683..57ea8e6c5488 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -47,6 +47,7 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
47 .warm_reset = pxa2xx_ac97_warm_reset, 47 .warm_reset = pxa2xx_ac97_warm_reset,
48 .reset = pxa2xx_ac97_cold_reset, 48 .reset = pxa2xx_ac97_cold_reset,
49}; 49};
50EXPORT_SYMBOL_GPL(soc_ac97_ops);
50 51
51static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = { 52static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = {
52 .name = "AC97 PCM Stereo out", 53 .name = "AC97 PCM Stereo out",
@@ -232,7 +233,9 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
232}, 233},
233}; 234};
234 235
235EXPORT_SYMBOL_GPL(soc_ac97_ops); 236static const struct snd_soc_component_driver pxa_ac97_component = {
237 .name = "pxa-ac97",
238};
236 239
237static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) 240static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
238{ 241{
@@ -245,13 +248,13 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
245 * driver to do interesting things with the clocking to get us up 248 * driver to do interesting things with the clocking to get us up
246 * and running. 249 * and running.
247 */ 250 */
248 return snd_soc_register_dais(&pdev->dev, pxa_ac97_dai_driver, 251 return snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
249 ARRAY_SIZE(pxa_ac97_dai_driver)); 252 pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver));
250} 253}
251 254
252static int pxa2xx_ac97_dev_remove(struct platform_device *pdev) 255static int pxa2xx_ac97_dev_remove(struct platform_device *pdev)
253{ 256{
254 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(pxa_ac97_dai_driver)); 257 snd_soc_unregister_component(&pdev->dev);
255 return 0; 258 return 0;
256} 259}
257 260
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 6b1a06f67564..f7ca71664112 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -360,14 +360,19 @@ static struct snd_soc_dai_driver pxa_i2s_dai = {
360 .symmetric_rates = 1, 360 .symmetric_rates = 1,
361}; 361};
362 362
363static const struct snd_soc_component_driver pxa_i2s_component = {
364 .name = "pxa-i2s",
365};
366
363static int pxa2xx_i2s_drv_probe(struct platform_device *pdev) 367static int pxa2xx_i2s_drv_probe(struct platform_device *pdev)
364{ 368{
365 return snd_soc_register_dai(&pdev->dev, &pxa_i2s_dai); 369 return snd_soc_register_component(&pdev->dev, &pxa_i2s_component,
370 &pxa_i2s_dai, 1);
366} 371}
367 372
368static int pxa2xx_i2s_drv_remove(struct platform_device *pdev) 373static int pxa2xx_i2s_drv_remove(struct platform_device *pdev)
369{ 374{
370 snd_soc_unregister_dai(&pdev->dev); 375 snd_soc_unregister_component(&pdev->dev);
371 return 0; 376 return 0;
372} 377}
373 378
diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c
index fee4d477a49c..73bb99f0109a 100644
--- a/sound/soc/s6000/s6000-i2s.c
+++ b/sound/soc/s6000/s6000-i2s.c
@@ -436,6 +436,10 @@ static struct snd_soc_dai_driver s6000_i2s_dai = {
436 .ops = &s6000_i2s_dai_ops, 436 .ops = &s6000_i2s_dai_ops,
437}; 437};
438 438
439static const struct snd_soc_component_driver s6000_i2s_component = {
440 .name = "s6000-i2s",
441};
442
439static int s6000_i2s_probe(struct platform_device *pdev) 443static int s6000_i2s_probe(struct platform_device *pdev)
440{ 444{
441 struct s6000_i2s_dev *dev; 445 struct s6000_i2s_dev *dev;
@@ -543,7 +547,8 @@ static int s6000_i2s_probe(struct platform_device *pdev)
543 S6_I2S_INT_UNDERRUN | 547 S6_I2S_INT_UNDERRUN |
544 S6_I2S_INT_OVERRUN); 548 S6_I2S_INT_OVERRUN);
545 549
546 ret = snd_soc_register_dai(&pdev->dev, &s6000_i2s_dai); 550 ret = snd_soc_register_component(&pdev->dev, &s6000_i2s_component,
551 &s6000_i2s_dai, 1);
547 if (ret) 552 if (ret)
548 goto err_release_dev; 553 goto err_release_dev;
549 554
@@ -572,7 +577,7 @@ static void s6000_i2s_remove(struct platform_device *pdev)
572 struct resource *region; 577 struct resource *region;
573 void __iomem *mmio = dev->scbbase; 578 void __iomem *mmio = dev->scbbase;
574 579
575 snd_soc_unregister_dai(&pdev->dev); 580 snd_soc_unregister_component(&pdev->dev);
576 581
577 s6000_i2s_stop_channel(dev, 0); 582 s6000_i2s_stop_channel(dev, 0);
578 s6000_i2s_stop_channel(dev, 1); 583 s6000_i2s_stop_channel(dev, 1);
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 0df3c5644cfa..32ff594954bc 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -370,6 +370,10 @@ static struct snd_soc_dai_driver s3c_ac97_dai[] = {
370 }, 370 },
371}; 371};
372 372
373static const struct snd_soc_component_driver s3c_ac97_component = {
374 .name = "s3c-ac97",
375};
376
373static int s3c_ac97_probe(struct platform_device *pdev) 377static int s3c_ac97_probe(struct platform_device *pdev)
374{ 378{
375 struct resource *mem_res, *dmatx_res, *dmarx_res, *dmamic_res, *irq_res; 379 struct resource *mem_res, *dmatx_res, *dmarx_res, *dmamic_res, *irq_res;
@@ -457,8 +461,8 @@ static int s3c_ac97_probe(struct platform_device *pdev)
457 goto err4; 461 goto err4;
458 } 462 }
459 463
460 ret = snd_soc_register_dais(&pdev->dev, s3c_ac97_dai, 464 ret = snd_soc_register_component(&pdev->dev, &s3c_ac97_component,
461 ARRAY_SIZE(s3c_ac97_dai)); 465 s3c_ac97_dai, ARRAY_SIZE(s3c_ac97_dai));
462 if (ret) 466 if (ret)
463 goto err5; 467 goto err5;
464 468
@@ -470,7 +474,7 @@ static int s3c_ac97_probe(struct platform_device *pdev)
470 474
471 return 0; 475 return 0;
472err6: 476err6:
473 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai)); 477 snd_soc_unregister_component(&pdev->dev);
474err5: 478err5:
475 free_irq(irq_res->start, NULL); 479 free_irq(irq_res->start, NULL);
476err4: 480err4:
@@ -490,7 +494,7 @@ static int s3c_ac97_remove(struct platform_device *pdev)
490 struct resource *mem_res, *irq_res; 494 struct resource *mem_res, *irq_res;
491 495
492 asoc_dma_platform_unregister(&pdev->dev); 496 asoc_dma_platform_unregister(&pdev->dev);
493 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai)); 497 snd_soc_unregister_component(&pdev->dev);
494 498
495 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 499 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
496 if (irq_res) 500 if (irq_res)
diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c
index d37ede58e0a8..415ad81999c4 100644
--- a/sound/soc/samsung/goni_wm8994.c
+++ b/sound/soc/samsung/goni_wm8994.c
@@ -218,6 +218,10 @@ static struct snd_soc_dai_driver voice_dai = {
218 .formats = SNDRV_PCM_FMTBIT_S16_LE,}, 218 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
219}; 219};
220 220
221static const struct snd_soc_component_driver voice_component = {
222 .name = "goni-voice",
223};
224
221static struct snd_soc_ops goni_voice_ops = { 225static struct snd_soc_ops goni_voice_ops = {
222 .hw_params = goni_voice_hw_params, 226 .hw_params = goni_voice_hw_params,
223}; 227};
@@ -270,7 +274,8 @@ static int __init goni_init(void)
270 return -ENOMEM; 274 return -ENOMEM;
271 275
272 /* register voice DAI here */ 276 /* register voice DAI here */
273 ret = snd_soc_register_dai(&goni_snd_device->dev, &voice_dai); 277 ret = snd_soc_register_component(&goni_snd_device->dev, &voice_component,
278 &voice_dai, 1);
274 if (ret) { 279 if (ret) {
275 platform_device_put(goni_snd_device); 280 platform_device_put(goni_snd_device);
276 return ret; 281 return ret;
@@ -280,7 +285,7 @@ static int __init goni_init(void)
280 ret = platform_device_add(goni_snd_device); 285 ret = platform_device_add(goni_snd_device);
281 286
282 if (ret) { 287 if (ret) {
283 snd_soc_unregister_dai(&goni_snd_device->dev); 288 snd_soc_unregister_component(&goni_snd_device->dev);
284 platform_device_put(goni_snd_device); 289 platform_device_put(goni_snd_device);
285 } 290 }
286 291
@@ -289,7 +294,7 @@ static int __init goni_init(void)
289 294
290static void __exit goni_exit(void) 295static void __exit goni_exit(void)
291{ 296{
292 snd_soc_unregister_dai(&goni_snd_device->dev); 297 snd_soc_unregister_component(&goni_snd_device->dev);
293 platform_device_unregister(goni_snd_device); 298 platform_device_unregister(goni_snd_device);
294} 299}
295 300
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 6bbeb0bf1a73..abbcbe4b429c 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -963,6 +963,10 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = {
963 .delay = i2s_delay, 963 .delay = i2s_delay,
964}; 964};
965 965
966static const struct snd_soc_component_driver samsung_i2s_component = {
967 .name = "samsung-i2s",
968};
969
966#define SAMSUNG_I2S_RATES SNDRV_PCM_RATE_8000_96000 970#define SAMSUNG_I2S_RATES SNDRV_PCM_RATE_8000_96000
967 971
968#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \ 972#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \
@@ -1114,8 +1118,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1114 dev_err(&pdev->dev, "Unable to get drvdata\n"); 1118 dev_err(&pdev->dev, "Unable to get drvdata\n");
1115 return -EFAULT; 1119 return -EFAULT;
1116 } 1120 }
1117 snd_soc_register_dai(&sec_dai->pdev->dev, 1121 snd_soc_register_component(&sec_dai->pdev->dev,
1118 &sec_dai->i2s_dai_drv); 1122 &samsung_i2s_component,
1123 &sec_dai->i2s_dai_drv, 1);
1119 asoc_dma_platform_register(&pdev->dev); 1124 asoc_dma_platform_register(&pdev->dev);
1120 return 0; 1125 return 0;
1121 } 1126 }
@@ -1244,7 +1249,8 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1244 } 1249 }
1245 } 1250 }
1246 1251
1247 snd_soc_register_dai(&pri_dai->pdev->dev, &pri_dai->i2s_dai_drv); 1252 snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component,
1253 &pri_dai->i2s_dai_drv, 1);
1248 1254
1249 pm_runtime_enable(&pdev->dev); 1255 pm_runtime_enable(&pdev->dev);
1250 1256
@@ -1283,7 +1289,7 @@ static int samsung_i2s_remove(struct platform_device *pdev)
1283 i2s->sec_dai = NULL; 1289 i2s->sec_dai = NULL;
1284 1290
1285 asoc_dma_platform_unregister(&pdev->dev); 1291 asoc_dma_platform_unregister(&pdev->dev);
1286 snd_soc_unregister_dai(&pdev->dev); 1292 snd_soc_unregister_component(&pdev->dev);
1287 1293
1288 return 0; 1294 return 0;
1289} 1295}
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index 13bab79ad93d..1566afe9ef52 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -490,6 +490,10 @@ static struct snd_soc_dai_driver s3c_pcm_dai[] = {
490 }, 490 },
491}; 491};
492 492
493static const struct snd_soc_component_driver s3c_pcm_component = {
494 .name = "s3c-pcm",
495};
496
493static int s3c_pcm_dev_probe(struct platform_device *pdev) 497static int s3c_pcm_dev_probe(struct platform_device *pdev)
494{ 498{
495 struct s3c_pcm_info *pcm; 499 struct s3c_pcm_info *pcm;
@@ -583,7 +587,8 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
583 587
584 pm_runtime_enable(&pdev->dev); 588 pm_runtime_enable(&pdev->dev);
585 589
586 ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]); 590 ret = snd_soc_register_component(&pdev->dev, &s3c_pcm_component,
591 &s3c_pcm_dai[pdev->id], 1);
587 if (ret != 0) { 592 if (ret != 0) {
588 dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret); 593 dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
589 goto err5; 594 goto err5;
@@ -598,7 +603,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
598 return 0; 603 return 0;
599 604
600err6: 605err6:
601 snd_soc_unregister_dai(&pdev->dev); 606 snd_soc_unregister_component(&pdev->dev);
602err5: 607err5:
603 clk_disable_unprepare(pcm->pclk); 608 clk_disable_unprepare(pcm->pclk);
604 clk_put(pcm->pclk); 609 clk_put(pcm->pclk);
@@ -619,7 +624,7 @@ static int s3c_pcm_dev_remove(struct platform_device *pdev)
619 struct resource *mem_res; 624 struct resource *mem_res;
620 625
621 asoc_dma_platform_unregister(&pdev->dev); 626 asoc_dma_platform_unregister(&pdev->dev);
622 snd_soc_unregister_dai(&pdev->dev); 627 snd_soc_unregister_component(&pdev->dev);
623 628
624 pm_runtime_disable(&pdev->dev); 629 pm_runtime_disable(&pdev->dev);
625 630
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 7a73380b3560..20e98d1dded2 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -731,8 +731,9 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
731#define s3c2412_i2s_resume NULL 731#define s3c2412_i2s_resume NULL
732#endif 732#endif
733 733
734int s3c_i2sv2_register_dai(struct device *dev, int id, 734int s3c_i2sv2_register_component(struct device *dev, int id,
735 struct snd_soc_dai_driver *drv) 735 struct snd_soc_component_driver *cmp_drv,
736 struct snd_soc_dai_driver *dai_drv)
736{ 737{
737 struct snd_soc_dai_ops *ops = drv->ops; 738 struct snd_soc_dai_ops *ops = drv->ops;
738 739
@@ -750,8 +751,8 @@ int s3c_i2sv2_register_dai(struct device *dev, int id,
750 drv->suspend = s3c2412_i2s_suspend; 751 drv->suspend = s3c2412_i2s_suspend;
751 drv->resume = s3c2412_i2s_resume; 752 drv->resume = s3c2412_i2s_resume;
752 753
753 return snd_soc_register_dai(dev, drv); 754 return snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
754} 755}
755EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); 756EXPORT_SYMBOL_GPL(s3c_i2sv2_register_component);
756 757
757MODULE_LICENSE("GPL"); 758MODULE_LICENSE("GPL");
diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h
index f8297d9bb8a3..90abab364b49 100644
--- a/sound/soc/samsung/s3c-i2s-v2.h
+++ b/sound/soc/samsung/s3c-i2s-v2.h
@@ -92,7 +92,7 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
92 unsigned long base); 92 unsigned long base);
93 93
94/** 94/**
95 * s3c_i2sv2_register_dai - register dai with soc core 95 * s3c_i2sv2_register_component - register component and dai with soc core
96 * @dev: DAI device 96 * @dev: DAI device
97 * @id: DAI ID 97 * @id: DAI ID
98 * @drv: The driver structure to register 98 * @drv: The driver structure to register
@@ -100,7 +100,8 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
100 * Fill in any missing fields and then register the given dai with the 100 * Fill in any missing fields and then register the given dai with the
101 * soc core. 101 * soc core.
102 */ 102 */
103extern int s3c_i2sv2_register_dai(struct device *dev, int id, 103extern int s3c_i2sv2_register_component(struct device *dev, int id,
104 struct snd_soc_dai_driver *drv); 104 struct snd_soc_component_driver *cmp_drv,
105 struct snd_soc_dai_driver *dai_drv);
105 106
106#endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */ 107#endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 221337716393..47e23864ea72 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -160,11 +160,17 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
160 .ops = &s3c2412_i2s_dai_ops, 160 .ops = &s3c2412_i2s_dai_ops,
161}; 161};
162 162
163static const struct snd_soc_component_driver s3c2412_i2s_component = {
164 .name = "s3c2412-i2s",
165};
166
163static int s3c2412_iis_dev_probe(struct platform_device *pdev) 167static int s3c2412_iis_dev_probe(struct platform_device *pdev)
164{ 168{
165 int ret = 0; 169 int ret = 0;
166 170
167 ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); 171 ret = s3c_i2sv2_register_component(&pdev->dev, -1,
172 &s3c2412_i2s_component,
173 &s3c2412_i2s_dai);
168 if (ret) { 174 if (ret) {
169 pr_err("failed to register the dai\n"); 175 pr_err("failed to register the dai\n");
170 return ret; 176 return ret;
@@ -178,14 +184,14 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
178 184
179 return 0; 185 return 0;
180err: 186err:
181 snd_soc_unregister_dai(&pdev->dev); 187 snd_soc_unregister_component(&pdev->dev);
182 return ret; 188 return ret;
183} 189}
184 190
185static int s3c2412_iis_dev_remove(struct platform_device *pdev) 191static int s3c2412_iis_dev_remove(struct platform_device *pdev)
186{ 192{
187 asoc_dma_platform_unregister(&pdev->dev); 193 asoc_dma_platform_unregister(&pdev->dev);
188 snd_soc_unregister_dai(&pdev->dev); 194 snd_soc_unregister_component(&pdev->dev);
189 return 0; 195 return 0;
190} 196}
191 197
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 13f6dd1ceb00..5403176b2aa3 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -465,11 +465,16 @@ static struct snd_soc_dai_driver s3c24xx_i2s_dai = {
465 .ops = &s3c24xx_i2s_dai_ops, 465 .ops = &s3c24xx_i2s_dai_ops,
466}; 466};
467 467
468static const struct snd_soc_component_driver s3c24xx_i2s_component = {
469 .name = "s3c24xx-i2s",
470};
471
468static int s3c24xx_iis_dev_probe(struct platform_device *pdev) 472static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
469{ 473{
470 int ret = 0; 474 int ret = 0;
471 475
472 ret = snd_soc_register_dai(&pdev->dev, &s3c24xx_i2s_dai); 476 ret = snd_soc_register_component(&pdev->dev, &s3c24xx_i2s_component,
477 &s3c24xx_i2s_dai, 1);
473 if (ret) { 478 if (ret) {
474 pr_err("failed to register the dai\n"); 479 pr_err("failed to register the dai\n");
475 return ret; 480 return ret;
@@ -483,14 +488,14 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
483 488
484 return 0; 489 return 0;
485err: 490err:
486 snd_soc_unregister_dai(&pdev->dev); 491 snd_soc_unregister_component(&pdev->dev);
487 return ret; 492 return ret;
488} 493}
489 494
490static int s3c24xx_iis_dev_remove(struct platform_device *pdev) 495static int s3c24xx_iis_dev_remove(struct platform_device *pdev)
491{ 496{
492 asoc_dma_platform_unregister(&pdev->dev); 497 asoc_dma_platform_unregister(&pdev->dev);
493 snd_soc_unregister_dai(&pdev->dev); 498 snd_soc_unregister_component(&pdev->dev);
494 return 0; 499 return 0;
495} 500}
496 501
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 5008e5bd6ed8..2e5ebb2f1982 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -357,6 +357,10 @@ static struct snd_soc_dai_driver samsung_spdif_dai = {
357 .resume = spdif_resume, 357 .resume = spdif_resume,
358}; 358};
359 359
360static const struct snd_soc_component_driver samsung_spdif_component = {
361 .name = "samsung-spdif",
362};
363
360static int spdif_probe(struct platform_device *pdev) 364static int spdif_probe(struct platform_device *pdev)
361{ 365{
362 struct s3c_audio_pdata *spdif_pdata; 366 struct s3c_audio_pdata *spdif_pdata;
@@ -424,7 +428,8 @@ static int spdif_probe(struct platform_device *pdev)
424 428
425 dev_set_drvdata(&pdev->dev, spdif); 429 dev_set_drvdata(&pdev->dev, spdif);
426 430
427 ret = snd_soc_register_dai(&pdev->dev, &samsung_spdif_dai); 431 ret = snd_soc_register_component(&pdev->dev, &samsung_spdif_component,
432 &samsung_spdif_dai, 1);
428 if (ret != 0) { 433 if (ret != 0) {
429 dev_err(&pdev->dev, "fail to register dai\n"); 434 dev_err(&pdev->dev, "fail to register dai\n");
430 goto err4; 435 goto err4;
@@ -445,7 +450,7 @@ static int spdif_probe(struct platform_device *pdev)
445 450
446 return 0; 451 return 0;
447err5: 452err5:
448 snd_soc_unregister_dai(&pdev->dev); 453 snd_soc_unregister_component(&pdev->dev);
449err4: 454err4:
450 iounmap(spdif->regs); 455 iounmap(spdif->regs);
451err3: 456err3:
@@ -466,7 +471,7 @@ static int spdif_remove(struct platform_device *pdev)
466 struct resource *mem_res; 471 struct resource *mem_res;
467 472
468 asoc_dma_platform_unregister(&pdev->dev); 473 asoc_dma_platform_unregister(&pdev->dev);
469 snd_soc_unregister_dai(&pdev->dev); 474 snd_soc_unregister_component(&pdev->dev);
470 475
471 iounmap(spdif->regs); 476 iounmap(spdif->regs);
472 477
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index c724026a246f..254c6375f7a1 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1886,6 +1886,10 @@ static struct snd_soc_platform_driver fsi_soc_platform = {
1886 .pcm_free = fsi_pcm_free, 1886 .pcm_free = fsi_pcm_free,
1887}; 1887};
1888 1888
1889static const struct snd_soc_component_driver fsi_soc_component = {
1890 .name = "fsi",
1891};
1892
1889/* 1893/*
1890 * platform function 1894 * platform function
1891 */ 1895 */
@@ -2046,10 +2050,10 @@ static int fsi_probe(struct platform_device *pdev)
2046 goto exit_fsib; 2050 goto exit_fsib;
2047 } 2051 }
2048 2052
2049 ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai, 2053 ret = snd_soc_register_component(&pdev->dev, &fsi_soc_component,
2050 ARRAY_SIZE(fsi_soc_dai)); 2054 fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai));
2051 if (ret < 0) { 2055 if (ret < 0) {
2052 dev_err(&pdev->dev, "cannot snd dai register\n"); 2056 dev_err(&pdev->dev, "cannot snd component register\n");
2053 goto exit_snd_soc; 2057 goto exit_snd_soc;
2054 } 2058 }
2055 2059
@@ -2074,7 +2078,7 @@ static int fsi_remove(struct platform_device *pdev)
2074 2078
2075 pm_runtime_disable(&pdev->dev); 2079 pm_runtime_disable(&pdev->dev);
2076 2080
2077 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai)); 2081 snd_soc_unregister_component(&pdev->dev);
2078 snd_soc_unregister_platform(&pdev->dev); 2082 snd_soc_unregister_platform(&pdev->dev);
2079 2083
2080 fsi_stream_remove(&master->fsia); 2084 fsi_stream_remove(&master->fsia);
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
index 4cc2d64ef476..af19f77b7bf0 100644
--- a/sound/soc/sh/hac.c
+++ b/sound/soc/sh/hac.c
@@ -310,15 +310,19 @@ static struct snd_soc_dai_driver sh4_hac_dai[] = {
310#endif 310#endif
311}; 311};
312 312
313static const struct snd_soc_component_driver sh4_hac_component = {
314 .name = "sh4-hac",
315};
316
313static int hac_soc_platform_probe(struct platform_device *pdev) 317static int hac_soc_platform_probe(struct platform_device *pdev)
314{ 318{
315 return snd_soc_register_dais(&pdev->dev, sh4_hac_dai, 319 return snd_soc_register_component(&pdev->dev, &sh4_hac_component,
316 ARRAY_SIZE(sh4_hac_dai)); 320 sh4_hac_dai, ARRAY_SIZE(sh4_hac_dai));
317} 321}
318 322
319static int hac_soc_platform_remove(struct platform_device *pdev) 323static int hac_soc_platform_remove(struct platform_device *pdev)
320{ 324{
321 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sh4_hac_dai)); 325 snd_soc_unregister_component(&pdev->dev);
322 return 0; 326 return 0;
323} 327}
324 328
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c
index 8526e1edaf45..5014a884afee 100644
--- a/sound/soc/sh/migor.c
+++ b/sound/soc/sh/migor.c
@@ -153,7 +153,7 @@ static int migor_dai_init(struct snd_soc_pcm_runtime *rtd)
153static struct snd_soc_dai_link migor_dai = { 153static struct snd_soc_dai_link migor_dai = {
154 .name = "wm8978", 154 .name = "wm8978",
155 .stream_name = "WM8978", 155 .stream_name = "WM8978",
156 .cpu_dai_name = "siu-i2s-dai", 156 .cpu_dai_name = "siu-pcm-audio",
157 .codec_dai_name = "wm8978-hifi", 157 .codec_dai_name = "wm8978-hifi",
158 .platform_name = "siu-pcm-audio", 158 .platform_name = "siu-pcm-audio",
159 .codec_name = "wm8978.0-001a", 159 .codec_name = "wm8978.0-001a",
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c
index 34facdc9e4ac..9dc24ffa892a 100644
--- a/sound/soc/sh/siu_dai.c
+++ b/sound/soc/sh/siu_dai.c
@@ -726,6 +726,10 @@ static struct snd_soc_dai_driver siu_i2s_dai = {
726 .ops = &siu_dai_ops, 726 .ops = &siu_dai_ops,
727}; 727};
728 728
729static const struct snd_soc_component_driver siu_i2s_component = {
730 .name = "siu-i2s",
731};
732
729static int siu_probe(struct platform_device *pdev) 733static int siu_probe(struct platform_device *pdev)
730{ 734{
731 const struct firmware *fw_entry; 735 const struct firmware *fw_entry;
@@ -783,7 +787,8 @@ static int siu_probe(struct platform_device *pdev)
783 dev_set_drvdata(&pdev->dev, info); 787 dev_set_drvdata(&pdev->dev, info);
784 788
785 /* register using ARRAY version so we can keep dai name */ 789 /* register using ARRAY version so we can keep dai name */
786 ret = snd_soc_register_dais(&pdev->dev, &siu_i2s_dai, 1); 790 ret = snd_soc_register_component(&pdev->dev, &siu_i2s_component,
791 &siu_i2s_dai, 1);
787 if (ret < 0) 792 if (ret < 0)
788 goto edaiinit; 793 goto edaiinit;
789 794
@@ -796,7 +801,7 @@ static int siu_probe(struct platform_device *pdev)
796 return ret; 801 return ret;
797 802
798esocregp: 803esocregp:
799 snd_soc_unregister_dai(&pdev->dev); 804 snd_soc_unregister_component(&pdev->dev);
800edaiinit: 805edaiinit:
801 iounmap(info->reg); 806 iounmap(info->reg);
802emapreg: 807emapreg:
@@ -823,7 +828,7 @@ static int siu_remove(struct platform_device *pdev)
823 pm_runtime_disable(&pdev->dev); 828 pm_runtime_disable(&pdev->dev);
824 829
825 snd_soc_unregister_platform(&pdev->dev); 830 snd_soc_unregister_platform(&pdev->dev);
826 snd_soc_unregister_dai(&pdev->dev); 831 snd_soc_unregister_component(&pdev->dev);
827 832
828 iounmap(info->reg); 833 iounmap(info->reg);
829 iounmap(info->yram); 834 iounmap(info->yram);
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c
index c8e73a703934..e889405ebd38 100644
--- a/sound/soc/sh/ssi.c
+++ b/sound/soc/sh/ssi.c
@@ -379,15 +379,19 @@ static struct snd_soc_dai_driver sh4_ssi_dai[] = {
379#endif 379#endif
380}; 380};
381 381
382static const struct snd_soc_component_driver sh4_ssi_component = {
383 .name = "sh4-ssi",
384};
385
382static int sh4_soc_dai_probe(struct platform_device *pdev) 386static int sh4_soc_dai_probe(struct platform_device *pdev)
383{ 387{
384 return snd_soc_register_dais(&pdev->dev, sh4_ssi_dai, 388 return snd_soc_register_component(&pdev->dev, &sh4_ssi_component,
385 ARRAY_SIZE(sh4_ssi_dai)); 389 sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));
386} 390}
387 391
388static int sh4_soc_dai_remove(struct platform_device *pdev) 392static int sh4_soc_dai_remove(struct platform_device *pdev)
389{ 393{
390 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai)); 394 snd_soc_unregister_component(&pdev->dev);
391 return 0; 395 return 0;
392} 396}
393 397
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ff4b45a5d796..45aa1d3a4a52 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -58,6 +58,7 @@ static DEFINE_MUTEX(client_mutex);
58static LIST_HEAD(dai_list); 58static LIST_HEAD(dai_list);
59static LIST_HEAD(platform_list); 59static LIST_HEAD(platform_list);
60static LIST_HEAD(codec_list); 60static LIST_HEAD(codec_list);
61static LIST_HEAD(component_list);
61 62
62/* 63/*
63 * This is a timeout to do a DAPM powerdown after a stream is closed(). 64 * This is a timeout to do a DAPM powerdown after a stream is closed().
@@ -3740,7 +3741,7 @@ static inline char *fmt_multiple_name(struct device *dev,
3740 * 3741 *
3741 * @dai: DAI to register 3742 * @dai: DAI to register
3742 */ 3743 */
3743int snd_soc_register_dai(struct device *dev, 3744static int snd_soc_register_dai(struct device *dev,
3744 struct snd_soc_dai_driver *dai_drv) 3745 struct snd_soc_dai_driver *dai_drv)
3745{ 3746{
3746 struct snd_soc_codec *codec; 3747 struct snd_soc_codec *codec;
@@ -3787,14 +3788,13 @@ int snd_soc_register_dai(struct device *dev,
3787 3788
3788 return 0; 3789 return 0;
3789} 3790}
3790EXPORT_SYMBOL_GPL(snd_soc_register_dai);
3791 3791
3792/** 3792/**
3793 * snd_soc_unregister_dai - Unregister a DAI from the ASoC core 3793 * snd_soc_unregister_dai - Unregister a DAI from the ASoC core
3794 * 3794 *
3795 * @dai: DAI to unregister 3795 * @dai: DAI to unregister
3796 */ 3796 */
3797void snd_soc_unregister_dai(struct device *dev) 3797static void snd_soc_unregister_dai(struct device *dev)
3798{ 3798{
3799 struct snd_soc_dai *dai; 3799 struct snd_soc_dai *dai;
3800 3800
@@ -3813,7 +3813,6 @@ found:
3813 kfree(dai->name); 3813 kfree(dai->name);
3814 kfree(dai); 3814 kfree(dai);
3815} 3815}
3816EXPORT_SYMBOL_GPL(snd_soc_unregister_dai);
3817 3816
3818/** 3817/**
3819 * snd_soc_register_dais - Register multiple DAIs with the ASoC core 3818 * snd_soc_register_dais - Register multiple DAIs with the ASoC core
@@ -3821,7 +3820,7 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_dai);
3821 * @dai: Array of DAIs to register 3820 * @dai: Array of DAIs to register
3822 * @count: Number of DAIs 3821 * @count: Number of DAIs
3823 */ 3822 */
3824int snd_soc_register_dais(struct device *dev, 3823static int snd_soc_register_dais(struct device *dev,
3825 struct snd_soc_dai_driver *dai_drv, size_t count) 3824 struct snd_soc_dai_driver *dai_drv, size_t count)
3826{ 3825{
3827 struct snd_soc_codec *codec; 3826 struct snd_soc_codec *codec;
@@ -3885,7 +3884,6 @@ err:
3885 3884
3886 return ret; 3885 return ret;
3887} 3886}
3888EXPORT_SYMBOL_GPL(snd_soc_register_dais);
3889 3887
3890/** 3888/**
3891 * snd_soc_unregister_dais - Unregister multiple DAIs from the ASoC core 3889 * snd_soc_unregister_dais - Unregister multiple DAIs from the ASoC core
@@ -3893,14 +3891,13 @@ EXPORT_SYMBOL_GPL(snd_soc_register_dais);
3893 * @dai: Array of DAIs to unregister 3891 * @dai: Array of DAIs to unregister
3894 * @count: Number of DAIs 3892 * @count: Number of DAIs
3895 */ 3893 */
3896void snd_soc_unregister_dais(struct device *dev, size_t count) 3894static void snd_soc_unregister_dais(struct device *dev, size_t count)
3897{ 3895{
3898 int i; 3896 int i;
3899 3897
3900 for (i = 0; i < count; i++) 3898 for (i = 0; i < count; i++)
3901 snd_soc_unregister_dai(dev); 3899 snd_soc_unregister_dai(dev);
3902} 3900}
3903EXPORT_SYMBOL_GPL(snd_soc_unregister_dais);
3904 3901
3905/** 3902/**
3906 * snd_soc_register_platform - Register a platform with the ASoC core 3903 * snd_soc_register_platform - Register a platform with the ASoC core
@@ -4139,6 +4136,92 @@ found:
4139} 4136}
4140EXPORT_SYMBOL_GPL(snd_soc_unregister_codec); 4137EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);
4141 4138
4139
4140/**
4141 * snd_soc_register_component - Register a component with the ASoC core
4142 *
4143 */
4144int snd_soc_register_component(struct device *dev,
4145 const struct snd_soc_component_driver *cmpnt_drv,
4146 struct snd_soc_dai_driver *dai_drv,
4147 int num_dai)
4148{
4149 struct snd_soc_component *cmpnt;
4150 int ret;
4151
4152 dev_dbg(dev, "component register %s\n", dev_name(dev));
4153
4154 cmpnt = devm_kzalloc(dev, sizeof(*cmpnt), GFP_KERNEL);
4155 if (!cmpnt) {
4156 dev_err(dev, "ASoC: Failed to allocate memory\n");
4157 return -ENOMEM;
4158 }
4159
4160 cmpnt->name = fmt_single_name(dev, &cmpnt->id);
4161 if (!cmpnt->name) {
4162 dev_err(dev, "ASoC: Failed to simplifying name\n");
4163 return -ENOMEM;
4164 }
4165
4166 cmpnt->dev = dev;
4167 cmpnt->driver = cmpnt_drv;
4168 cmpnt->num_dai = num_dai;
4169
4170 /*
4171 * snd_soc_register_dai() uses fmt_single_name(), and
4172 * snd_soc_register_dais() uses fmt_multiple_name()
4173 * for dai->name which is used for name based matching
4174 */
4175 if (1 == num_dai)
4176 ret = snd_soc_register_dai(dev, dai_drv);
4177 else
4178 ret = snd_soc_register_dais(dev, dai_drv, num_dai);
4179 if (ret < 0) {
4180 dev_err(dev, "ASoC: Failed to regster DAIs: %d\n", ret);
4181 goto error_component_name;
4182 }
4183
4184 mutex_lock(&client_mutex);
4185 list_add(&cmpnt->list, &component_list);
4186 mutex_unlock(&client_mutex);
4187
4188 dev_dbg(cmpnt->dev, "ASoC: Registered component '%s'\n", cmpnt->name);
4189
4190 return ret;
4191
4192error_component_name:
4193 kfree(cmpnt->name);
4194
4195 return ret;
4196}
4197EXPORT_SYMBOL_GPL(snd_soc_register_component);
4198
4199/**
4200 * snd_soc_unregister_component - Unregister a component from the ASoC core
4201 *
4202 */
4203void snd_soc_unregister_component(struct device *dev)
4204{
4205 struct snd_soc_component *cmpnt;
4206
4207 list_for_each_entry(cmpnt, &component_list, list) {
4208 if (dev == cmpnt->dev)
4209 goto found;
4210 }
4211 return;
4212
4213found:
4214 snd_soc_unregister_dais(dev, cmpnt->num_dai);
4215
4216 mutex_lock(&client_mutex);
4217 list_del(&cmpnt->list);
4218 mutex_unlock(&client_mutex);
4219
4220 dev_dbg(dev, "ASoC: Unregistered component '%s'\n", cmpnt->name);
4221 kfree(cmpnt->name);
4222}
4223EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
4224
4142/* Retrieve a card's name from device tree */ 4225/* Retrieve a card's name from device tree */
4143int snd_soc_of_parse_card_name(struct snd_soc_card *card, 4226int snd_soc_of_parse_card_name(struct snd_soc_card *card,
4144 const char *propname) 4227 const char *propname)
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index c7c4b20395bb..14d57e89bcba 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -170,6 +170,10 @@ struct snd_soc_dai_driver spdif_in_dai = {
170 .ops = &spdif_in_dai_ops, 170 .ops = &spdif_in_dai_ops,
171}; 171};
172 172
173static const struct snd_soc_component_driver spdif_in_component = {
174 .name = "spdif-in",
175};
176
173static irqreturn_t spdif_in_irq(int irq, void *arg) 177static irqreturn_t spdif_in_irq(int irq, void *arg)
174{ 178{
175 struct spdif_in_dev *host = (struct spdif_in_dev *)arg; 179 struct spdif_in_dev *host = (struct spdif_in_dev *)arg;
@@ -258,7 +262,8 @@ static int spdif_in_probe(struct platform_device *pdev)
258 return ret; 262 return ret;
259 } 263 }
260 264
261 ret = snd_soc_register_dai(&pdev->dev, &spdif_in_dai); 265 ret = snd_soc_register_component(&pdev->dev, &spdif_in_component,
266 &spdif_in_dai, 1);
262 if (ret != 0) { 267 if (ret != 0) {
263 clk_put(host->clk); 268 clk_put(host->clk);
264 return ret; 269 return ret;
@@ -271,7 +276,7 @@ static int spdif_in_remove(struct platform_device *pdev)
271{ 276{
272 struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev); 277 struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev);
273 278
274 snd_soc_unregister_dai(&pdev->dev); 279 snd_soc_unregister_component(&pdev->dev);
275 dev_set_drvdata(&pdev->dev, NULL); 280 dev_set_drvdata(&pdev->dev, NULL);
276 281
277 clk_put(host->clk); 282 clk_put(host->clk);
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 5eac4cda2fd7..1e3c3dda3598 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -270,6 +270,10 @@ static struct snd_soc_dai_driver spdif_out_dai = {
270 .ops = &spdif_out_dai_ops, 270 .ops = &spdif_out_dai_ops,
271}; 271};
272 272
273static const struct snd_soc_component_driver spdif_out_component = {
274 .name = "spdif-out",
275};
276
273static int spdif_out_probe(struct platform_device *pdev) 277static int spdif_out_probe(struct platform_device *pdev)
274{ 278{
275 struct spdif_out_dev *host; 279 struct spdif_out_dev *host;
@@ -314,7 +318,8 @@ static int spdif_out_probe(struct platform_device *pdev)
314 318
315 dev_set_drvdata(&pdev->dev, host); 319 dev_set_drvdata(&pdev->dev, host);
316 320
317 ret = snd_soc_register_dai(&pdev->dev, &spdif_out_dai); 321 ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
322 &spdif_out_dai, 1);
318 if (ret != 0) { 323 if (ret != 0) {
319 clk_put(host->clk); 324 clk_put(host->clk);
320 return ret; 325 return ret;
@@ -327,7 +332,7 @@ static int spdif_out_remove(struct platform_device *pdev)
327{ 332{
328 struct spdif_out_dev *host = dev_get_drvdata(&pdev->dev); 333 struct spdif_out_dev *host = dev_get_drvdata(&pdev->dev);
329 334
330 snd_soc_unregister_dai(&pdev->dev); 335 snd_soc_unregister_component(&pdev->dev);
331 dev_set_drvdata(&pdev->dev, NULL); 336 dev_set_drvdata(&pdev->dev, NULL);
332 337
333 clk_put(host->clk); 338 clk_put(host->clk);
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index 336dcdd3e8a4..b5cee92f82e8 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -248,6 +248,10 @@ static struct snd_soc_dai_driver tegra20_ac97_dai = {
248 .ops = &tegra20_ac97_dai_ops, 248 .ops = &tegra20_ac97_dai_ops,
249}; 249};
250 250
251static const struct snd_soc_component_driver tegra20_ac97_component = {
252 .name = DRV_NAME,
253};
254
251static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg) 255static bool tegra20_ac97_wr_rd_reg(struct device *dev, unsigned int reg)
252{ 256{
253 switch (reg) { 257 switch (reg) {
@@ -398,7 +402,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
398 ac97->playback_dma_data.width = 32; 402 ac97->playback_dma_data.width = 32;
399 ac97->playback_dma_data.req_sel = of_dma[1]; 403 ac97->playback_dma_data.req_sel = of_dma[1];
400 404
401 ret = snd_soc_register_dais(&pdev->dev, &tegra20_ac97_dai, 1); 405 ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component,
406 &tegra20_ac97_dai, 1);
402 if (ret) { 407 if (ret) {
403 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); 408 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
404 ret = -ENOMEM; 409 ret = -ENOMEM;
@@ -408,7 +413,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
408 ret = tegra_pcm_platform_register(&pdev->dev); 413 ret = tegra_pcm_platform_register(&pdev->dev);
409 if (ret) { 414 if (ret) {
410 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); 415 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
411 goto err_unregister_dai; 416 goto err_unregister_component;
412 } 417 }
413 418
414 ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev); 419 ret = tegra_asoc_utils_init(&ac97->util_data, &pdev->dev);
@@ -434,8 +439,8 @@ err_asoc_utils_fini:
434 tegra_asoc_utils_fini(&ac97->util_data); 439 tegra_asoc_utils_fini(&ac97->util_data);
435err_unregister_pcm: 440err_unregister_pcm:
436 tegra_pcm_platform_unregister(&pdev->dev); 441 tegra_pcm_platform_unregister(&pdev->dev);
437err_unregister_dai: 442err_unregister_component:
438 snd_soc_unregister_dai(&pdev->dev); 443 snd_soc_unregister_component(&pdev->dev);
439err_clk_put: 444err_clk_put:
440 clk_put(ac97->clk_ac97); 445 clk_put(ac97->clk_ac97);
441err: 446err:
@@ -447,7 +452,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev)
447 struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev); 452 struct tegra20_ac97 *ac97 = dev_get_drvdata(&pdev->dev);
448 453
449 tegra_pcm_platform_unregister(&pdev->dev); 454 tegra_pcm_platform_unregister(&pdev->dev);
450 snd_soc_unregister_dai(&pdev->dev); 455 snd_soc_unregister_component(&pdev->dev);
451 456
452 tegra_asoc_utils_fini(&ac97->util_data); 457 tegra_asoc_utils_fini(&ac97->util_data);
453 458
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c
index caa772de5a18..8b1ceb82c86f 100644
--- a/sound/soc/tegra/tegra20_i2s.c
+++ b/sound/soc/tegra/tegra20_i2s.c
@@ -276,6 +276,10 @@ static const struct snd_soc_dai_driver tegra20_i2s_dai_template = {
276 .symmetric_rates = 1, 276 .symmetric_rates = 1,
277}; 277};
278 278
279static const struct snd_soc_component_driver tegra20_i2s_component = {
280 .name = DRV_NAME,
281};
282
279static bool tegra20_i2s_wr_rd_reg(struct device *dev, unsigned int reg) 283static bool tegra20_i2s_wr_rd_reg(struct device *dev, unsigned int reg)
280{ 284{
281 switch (reg) { 285 switch (reg) {
@@ -419,7 +423,8 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
419 goto err_pm_disable; 423 goto err_pm_disable;
420 } 424 }
421 425
422 ret = snd_soc_register_dai(&pdev->dev, &i2s->dai); 426 ret = snd_soc_register_component(&pdev->dev, &tegra20_i2s_component,
427 &i2s->dai, 1);
423 if (ret) { 428 if (ret) {
424 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); 429 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
425 ret = -ENOMEM; 430 ret = -ENOMEM;
@@ -429,13 +434,13 @@ static int tegra20_i2s_platform_probe(struct platform_device *pdev)
429 ret = tegra_pcm_platform_register(&pdev->dev); 434 ret = tegra_pcm_platform_register(&pdev->dev);
430 if (ret) { 435 if (ret) {
431 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); 436 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
432 goto err_unregister_dai; 437 goto err_unregister_component;
433 } 438 }
434 439
435 return 0; 440 return 0;
436 441
437err_unregister_dai: 442err_unregister_component:
438 snd_soc_unregister_dai(&pdev->dev); 443 snd_soc_unregister_component(&pdev->dev);
439err_suspend: 444err_suspend:
440 if (!pm_runtime_status_suspended(&pdev->dev)) 445 if (!pm_runtime_status_suspended(&pdev->dev))
441 tegra20_i2s_runtime_suspend(&pdev->dev); 446 tegra20_i2s_runtime_suspend(&pdev->dev);
@@ -456,7 +461,7 @@ static int tegra20_i2s_platform_remove(struct platform_device *pdev)
456 tegra20_i2s_runtime_suspend(&pdev->dev); 461 tegra20_i2s_runtime_suspend(&pdev->dev);
457 462
458 tegra_pcm_platform_unregister(&pdev->dev); 463 tegra_pcm_platform_unregister(&pdev->dev);
459 snd_soc_unregister_dai(&pdev->dev); 464 snd_soc_unregister_component(&pdev->dev);
460 465
461 clk_put(i2s->clk_i2s); 466 clk_put(i2s->clk_i2s);
462 467
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index 04771d14d343..6fce0be5eaa3 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -182,6 +182,10 @@ static struct snd_soc_dai_driver tegra20_spdif_dai = {
182 .ops = &tegra20_spdif_dai_ops, 182 .ops = &tegra20_spdif_dai_ops,
183}; 183};
184 184
185static const struct snd_soc_component_driver tegra20_spdif_component = {
186 .name = DRV_NAME,
187};
188
185static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) 189static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg)
186{ 190{
187 switch (reg) { 191 switch (reg) {
@@ -329,7 +333,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
329 goto err_pm_disable; 333 goto err_pm_disable;
330 } 334 }
331 335
332 ret = snd_soc_register_dai(&pdev->dev, &tegra20_spdif_dai); 336 ret = snd_soc_register_component(&pdev->dev, &tegra20_spdif_component,
337 &tegra20_spdif_dai, 1);
333 if (ret) { 338 if (ret) {
334 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); 339 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
335 ret = -ENOMEM; 340 ret = -ENOMEM;
@@ -339,13 +344,13 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
339 ret = tegra_pcm_platform_register(&pdev->dev); 344 ret = tegra_pcm_platform_register(&pdev->dev);
340 if (ret) { 345 if (ret) {
341 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); 346 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
342 goto err_unregister_dai; 347 goto err_unregister_component;
343 } 348 }
344 349
345 return 0; 350 return 0;
346 351
347err_unregister_dai: 352err_unregister_component:
348 snd_soc_unregister_dai(&pdev->dev); 353 snd_soc_unregister_component(&pdev->dev);
349err_suspend: 354err_suspend:
350 if (!pm_runtime_status_suspended(&pdev->dev)) 355 if (!pm_runtime_status_suspended(&pdev->dev))
351 tegra20_spdif_runtime_suspend(&pdev->dev); 356 tegra20_spdif_runtime_suspend(&pdev->dev);
@@ -366,7 +371,7 @@ static int tegra20_spdif_platform_remove(struct platform_device *pdev)
366 tegra20_spdif_runtime_suspend(&pdev->dev); 371 tegra20_spdif_runtime_suspend(&pdev->dev);
367 372
368 tegra_pcm_platform_unregister(&pdev->dev); 373 tegra_pcm_platform_unregister(&pdev->dev);
369 snd_soc_unregister_dai(&pdev->dev); 374 snd_soc_unregister_component(&pdev->dev);
370 375
371 clk_put(spdif->clk_spdif_out); 376 clk_put(spdif->clk_spdif_out);
372 377
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index f4e1ce82750a..f138d8fea977 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -336,6 +336,10 @@ static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
336 .symmetric_rates = 1, 336 .symmetric_rates = 1,
337}; 337};
338 338
339static const struct snd_soc_component_driver tegra30_i2s_component = {
340 .name = DRV_NAME,
341};
342
339static bool tegra30_i2s_wr_rd_reg(struct device *dev, unsigned int reg) 343static bool tegra30_i2s_wr_rd_reg(struct device *dev, unsigned int reg)
340{ 344{
341 switch (reg) { 345 switch (reg) {
@@ -464,7 +468,8 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
464 goto err_pm_disable; 468 goto err_pm_disable;
465 } 469 }
466 470
467 ret = snd_soc_register_dai(&pdev->dev, &i2s->dai); 471 ret = snd_soc_register_component(&pdev->dev, &tegra30_i2s_component,
472 &i2s->dai, 1);
468 if (ret) { 473 if (ret) {
469 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); 474 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
470 ret = -ENOMEM; 475 ret = -ENOMEM;
@@ -474,13 +479,13 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
474 ret = tegra_pcm_platform_register(&pdev->dev); 479 ret = tegra_pcm_platform_register(&pdev->dev);
475 if (ret) { 480 if (ret) {
476 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); 481 dev_err(&pdev->dev, "Could not register PCM: %d\n", ret);
477 goto err_unregister_dai; 482 goto err_unregister_component;
478 } 483 }
479 484
480 return 0; 485 return 0;
481 486
482err_unregister_dai: 487err_unregister_component:
483 snd_soc_unregister_dai(&pdev->dev); 488 snd_soc_unregister_component(&pdev->dev);
484err_suspend: 489err_suspend:
485 if (!pm_runtime_status_suspended(&pdev->dev)) 490 if (!pm_runtime_status_suspended(&pdev->dev))
486 tegra30_i2s_runtime_suspend(&pdev->dev); 491 tegra30_i2s_runtime_suspend(&pdev->dev);
@@ -501,7 +506,7 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
501 tegra30_i2s_runtime_suspend(&pdev->dev); 506 tegra30_i2s_runtime_suspend(&pdev->dev);
502 507
503 tegra_pcm_platform_unregister(&pdev->dev); 508 tegra_pcm_platform_unregister(&pdev->dev);
504 snd_soc_unregister_dai(&pdev->dev); 509 snd_soc_unregister_component(&pdev->dev);
505 510
506 clk_put(i2s->clk_i2s); 511 clk_put(i2s->clk_i2s);
507 512
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c
index 68d42403d9b5..6839f88167d0 100644
--- a/sound/soc/tegra/tegra_wm9712.c
+++ b/sound/soc/tegra/tegra_wm9712.c
@@ -55,7 +55,7 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd)
55static struct snd_soc_dai_link tegra_wm9712_dai = { 55static struct snd_soc_dai_link tegra_wm9712_dai = {
56 .name = "AC97 HiFi", 56 .name = "AC97 HiFi",
57 .stream_name = "AC97 HiFi", 57 .stream_name = "AC97 HiFi",
58 .cpu_dai_name = "tegra-ac97-pcm", 58 .cpu_dai_name = "tegra20-ac97",
59 .codec_dai_name = "wm9712-hifi", 59 .codec_dai_name = "wm9712-hifi",
60 .codec_name = "wm9712-codec", 60 .codec_name = "wm9712-codec",
61 .init = tegra_wm9712_init, 61 .init = tegra_wm9712_init,
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 16ab69635e2e..8a2840304d28 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -170,6 +170,10 @@ static struct snd_soc_dai_driver txx9aclc_ac97_dai = {
170 }, 170 },
171}; 171};
172 172
173static const struct snd_soc_component_driver txx9aclc_ac97_component = {
174 .name = "txx9aclc-ac97",
175};
176
173static int txx9aclc_ac97_dev_probe(struct platform_device *pdev) 177static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
174{ 178{
175 struct txx9aclc_plat_drvdata *drvdata; 179 struct txx9aclc_plat_drvdata *drvdata;
@@ -205,12 +209,13 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
205 if (err < 0) 209 if (err < 0)
206 return err; 210 return err;
207 211
208 return snd_soc_register_dai(&pdev->dev, &txx9aclc_ac97_dai); 212 return snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component,
213 &txx9aclc_ac97_dai, 1);
209} 214}
210 215
211static int txx9aclc_ac97_dev_remove(struct platform_device *pdev) 216static int txx9aclc_ac97_dev_remove(struct platform_device *pdev)
212{ 217{
213 snd_soc_unregister_dai(&pdev->dev); 218 snd_soc_unregister_component(&pdev->dev);
214 return 0; 219 return 0;
215} 220}
216 221
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index 94a3e5705aaa..f1e8a5ecb00b 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -768,6 +768,11 @@ static struct snd_soc_dai_driver ux500_msp_dai_drv[UX500_NBR_OF_DAI] = {
768 }, 768 },
769}; 769};
770 770
771static const struct snd_soc_component_driver ux500_msp_component = {
772 .name = "ux500-msp",
773};
774
775
771static int ux500_msp_drv_probe(struct platform_device *pdev) 776static int ux500_msp_drv_probe(struct platform_device *pdev)
772{ 777{
773 struct ux500_msp_i2s_drvdata *drvdata; 778 struct ux500_msp_i2s_drvdata *drvdata;
@@ -825,8 +830,8 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
825 } 830 }
826 dev_set_drvdata(&pdev->dev, drvdata); 831 dev_set_drvdata(&pdev->dev, drvdata);
827 832
828 ret = snd_soc_register_dai(&pdev->dev, 833 ret = snd_soc_register_component(&pdev->dev, &ux500_msp_component,
829 &ux500_msp_dai_drv[drvdata->msp->id]); 834 &ux500_msp_dai_drv[drvdata->msp->id], 1);
830 if (ret < 0) { 835 if (ret < 0) {
831 dev_err(&pdev->dev, "Error: %s: Failed to register MSP%d!\n", 836 dev_err(&pdev->dev, "Error: %s: Failed to register MSP%d!\n",
832 __func__, drvdata->msp->id); 837 __func__, drvdata->msp->id);
@@ -844,7 +849,7 @@ static int ux500_msp_drv_probe(struct platform_device *pdev)
844 return 0; 849 return 0;
845 850
846err_reg_plat: 851err_reg_plat:
847 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv)); 852 snd_soc_unregister_component(&pdev->dev);
848err_init_msp: 853err_init_msp:
849 clk_put(drvdata->clk); 854 clk_put(drvdata->clk);
850err_clk: 855err_clk:
@@ -861,7 +866,7 @@ static int ux500_msp_drv_remove(struct platform_device *pdev)
861 866
862 ux500_pcm_unregister_platform(pdev); 867 ux500_pcm_unregister_platform(pdev);
863 868
864 snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(ux500_msp_dai_drv)); 869 snd_soc_unregister_component(&pdev->dev);
865 870
866 devm_regulator_put(drvdata->reg_vape); 871 devm_regulator_put(drvdata->reg_vape);
867 prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s"); 872 prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s");