Skip to contentSkip to conversation

ASoC: ep93xx: convert to use snd_soc_register_card()

PATCH Applied Mika Westerberg 6 participants 20 messages Sep 11, 2011 – Sep 18, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ASoC: ep93xx: convert to use snd_soc_register_card()

Here is a series of patches which convert ep93xx ASoC drivers to use snd_soc_register_card(). This has the advantage that the machine drivers get loaded automatically by udev. Also this gets rid of machine_is_xxx() from the machine drivers.

Tested on Sim.One. The edb93xx and snappercl15 changes are compile tested only.

Mika Westerberg (7):
ASoC: ep93xx-pcm: add MODULE_ALIAS
ASoC: simone: convert to use snd_soc_register_card()
ASoC: edb93xx: convert to use snd_soc_register_card()
ASoC: snappercl15: convert to use snd_soc_register_card()
ARM: ep93xx: simone: register audio platform device
ARM: ep93xx: edb93xx: register audio platform device
ARM: ep93xx: snappercl15: register audio platform device

 arch/arm/mach-ep93xx/edb93xx.c     |    6 +++
 arch/arm/mach-ep93xx/simone.c      |   13 +++++++-
 arch/arm/mach-ep93xx/snappercl15.c |   13 +++++++-
 sound/soc/ep93xx/edb93xx.c         |   60 ++++++++++++++++++---------------
 sound/soc/ep93xx/ep93xx-pcm.c      |    1 +
 sound/soc/ep93xx/simone.c          |   64 ++++++++++++++++++++----------------
 sound/soc/ep93xx/snappercl15.c     |   53 ++++++++++++++++++++---------
 7 files changed, 136 insertions(+), 74 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/7 ASoC: ep93xx-pcm: add MODULE_ALIAS

To get the PCM module loaded automatically by udev et al. we need to add a proper MODULE_ALIAS.

---
 sound/soc/ep93xx/ep93xx-pcm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/ep93xx/ep93xx-pcm.c +1 -0
index 8dfd3ad..d00230a 100644
@@ -355,3 +355,4 @@ module_exit(ep93xx_soc_platform_exit);
 MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("EP93xx ALSA PCM interface");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:ep93xx-pcm-audio");
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 2/7 ASoC: simone: convert to use snd_soc_register_card()

In reply to Mika Westerberg

Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device.

In addition we use platform_device_register_simple() to create a platform device for the codec. This function will handle putting and deleting the device automatically which simplifies the error handling in the machine driver.

---
 sound/soc/ep93xx/simone.c |   64 +++++++++++++++++++++++++-------------------
 1 files changed, 36 insertions(+), 28 deletions(-)
sound/soc/ep93xx/simone.c +36 -28
index 2868179..968cb31 100644
@@ -39,53 +39,61 @@ static struct snd_soc_card snd_soc_simone = {
 };
 
 static struct platform_device *simone_snd_ac97_device;
-static struct platform_device *simone_snd_device;
 
-static int __init simone_init(void)
+static int __devinit simone_probe(struct platform_device *pdev)
 {
+	struct snd_soc_card *card = &snd_soc_simone;
 	int ret;
 
-	if (!machine_is_sim_one())
-		return -ENODEV;
-
-	simone_snd_ac97_device = platform_device_alloc("ac97-codec", -1);
-	if (!simone_snd_ac97_device)
-		return -ENOMEM;
+	simone_snd_ac97_device = platform_device_register_simple("ac97-codec",
+								 -1, NULL, 0);
+	if (IS_ERR(simone_snd_ac97_device))
+		return PTR_ERR(simone_snd_ac97_device);
 
-	ret = platform_device_add(simone_snd_ac97_device);
-	if (ret)
-		goto fail1;
+	card->dev = &pdev->dev;
 
-	simone_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!simone_snd_device) {
-		ret = -ENOMEM;
-		goto fail2;
+	ret = snd_soc_register_card(card);
+	if (ret) {
+		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+			ret);
+		platform_device_unregister(simone_snd_ac97_device);
 	}
 
-	platform_set_drvdata(simone_snd_device, &snd_soc_simone);
-	ret = platform_device_add(simone_snd_device);
-	if (ret)
-		goto fail3;
+	return ret;
+}
+
+static int __devexit simone_remove(struct platform_device *pdev)
+{
+	struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+	snd_soc_unregister_card(card);
+	platform_device_unregister(simone_snd_ac97_device);
 
 	return 0;
+}
 
-fail3:
-	platform_device_put(simone_snd_device);
-fail2:
-	platform_device_del(simone_snd_ac97_device);
-fail1:
-	platform_device_put(simone_snd_ac97_device);
-	return ret;
+static struct platform_driver simone_driver = {
+	.driver		= {
+		.name	= "simone-audio",
+		.owner	= THIS_MODULE,
+	},
+	.probe		= simone_probe,
+	.remove		= __devexit_p(simone_remove),
+};
+
+static int __init simone_init(void)
+{
+	return platform_driver_register(&simone_driver);
 }
 module_init(simone_init);
 
 static void __exit simone_exit(void)
 {
-	platform_device_unregister(simone_snd_device);
-	platform_device_unregister(simone_snd_ac97_device);
+	platform_driver_unregister(&simone_driver);
 }
 module_exit(simone_exit);
 
 MODULE_DESCRIPTION("ALSA SoC Simplemachines Sim.One");
 MODULE_AUTHOR("Mika Westerberg <[email protected]>");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:simone-audio");
Signature · 1 line
1.7.5.4
#3 lore raw

PATCH 3/7 ASoC: edb93xx: convert to use snd_soc_register_card()

In reply to Mika Westerberg

Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Cc Alexander Sverdlin <[email protected]>
---
 sound/soc/ep93xx/edb93xx.c |   60 ++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 27 deletions(-)
sound/soc/ep93xx/edb93xx.c +33 -27
index d3aa151..0134d4e 100644
@@ -28,12 +28,6 @@
 #include <mach/hardware.h>
 #include "ep93xx-pcm.h"
 
-#define edb93xx_has_audio() (machine_is_edb9301() ||	\
-			     machine_is_edb9302() ||	\
-			     machine_is_edb9302a() ||	\
-			     machine_is_edb9307a() ||	\
-			     machine_is_edb9315a())
-
 static int edb93xx_hw_params(struct snd_pcm_substream *substream,
 			     struct snd_pcm_hw_params *params)
 {
@@ -94,49 +88,61 @@ static struct snd_soc_card snd_soc_edb93xx = {
 	.num_links	= 1,
 };
 
-static struct platform_device *edb93xx_snd_device;
-
-static int __init edb93xx_init(void)
+static int __devinit edb93xx_probe(struct platform_device *pdev)
 {
+	struct snd_soc_card *card = &snd_soc_edb93xx;
 	int ret;
 
-	if (!edb93xx_has_audio())
-		return -ENODEV;
-
 	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
 				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
 				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
 	if (ret)
 		return ret;
 
-	edb93xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!edb93xx_snd_device) {
-		ret = -ENOMEM;
-		goto free_i2s;
+	card->dev = &pdev->dev;
+
+	ret = snd_soc_register_card(card);
+	if (ret) {
+		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+			ret);
+		ep93xx_i2s_release();
 	}
 
-	platform_set_drvdata(edb93xx_snd_device, &snd_soc_edb93xx);
-	ret = platform_device_add(edb93xx_snd_device);
-	if (ret)
-		goto device_put;
+	return ret;
+}
 
-	return 0;
+static int __devexit edb93xx_remove(struct platform_device *pdev)
+{
+	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
-device_put:
-	platform_device_put(edb93xx_snd_device);
-free_i2s:
+	snd_soc_unregister_card(card);
 	ep93xx_i2s_release();
-	return ret;
+
+	return 0;
+}
+
+static struct platform_driver edb93xx_driver = {
+	.driver		= {
+		.name	= "edb93xx-audio",
+		.owner	= THIS_MODULE,
+	},
+	.probe		= edb93xx_probe,
+	.remove		= __devexit_p(edb93xx_remove),
+};
+
+static int __init edb93xx_init(void)
+{
+	return platform_driver_register(&edb93xx_driver);
 }
 module_init(edb93xx_init);
 
 static void __exit edb93xx_exit(void)
 {
-	platform_device_unregister(edb93xx_snd_device);
-	ep93xx_i2s_release();
+	platform_driver_unregister(&edb93xx_driver);
 }
 module_exit(edb93xx_exit);
 
 MODULE_AUTHOR("Alexander Sverdlin <[email protected]>");
 MODULE_DESCRIPTION("ALSA SoC EDB93xx");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:edb93xx-audio");
Signature · 1 line
1.7.5.4
#4 lore raw

Re: [PATCH 3/7] ASoC: edb93xx: convert to use snd_soc_register_card()

Hello, Mika!

Have you tried the driver on reference boards?
For me it doesn't work any more. Boot messages are ok, as before, but alsa open produces such messages:

Jan  1 00:32:19 IPCUn user.err kernel: asoc: can't open platform

ep93xx-pcm-audio

and fails.
I'll try to investigate further...

Quoted 109 lines · Mika Westerberg

Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Cc Alexander Sverdlin <[email protected]>
---
 sound/soc/ep93xx/edb93xx.c |   60 ++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 27 deletions(-)
sound/soc/ep93xx/edb93xx.c +33 -27
index d3aa151..0134d4e 100644
@@ -28,12 +28,6 @@
 #include <mach/hardware.h>
 #include "ep93xx-pcm.h"
 
-#define edb93xx_has_audio() (machine_is_edb9301() ||	\
-			     machine_is_edb9302() ||	\
-			     machine_is_edb9302a() ||	\
-			     machine_is_edb9307a() ||	\
-			     machine_is_edb9315a())
-
 static int edb93xx_hw_params(struct snd_pcm_substream *substream,
 			     struct snd_pcm_hw_params *params)
 {
@@ -94,49 +88,61 @@ static struct snd_soc_card snd_soc_edb93xx = {
 	.num_links	= 1,
 };
 
-static struct platform_device *edb93xx_snd_device;
-
-static int __init edb93xx_init(void)
+static int __devinit edb93xx_probe(struct platform_device *pdev)
 {
+	struct snd_soc_card *card = &snd_soc_edb93xx;
 	int ret;
 
-	if (!edb93xx_has_audio())
-		return -ENODEV;
-
 	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
 				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
 				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
 	if (ret)
 		return ret;
 
-	edb93xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!edb93xx_snd_device) {
-		ret = -ENOMEM;
-		goto free_i2s;
+	card->dev = &pdev->dev;
+
+	ret = snd_soc_register_card(card);
+	if (ret) {
+		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+			ret);
+		ep93xx_i2s_release();
 	}
 
-	platform_set_drvdata(edb93xx_snd_device, &snd_soc_edb93xx);
-	ret = platform_device_add(edb93xx_snd_device);
-	if (ret)
-		goto device_put;
+	return ret;
+}
 
-	return 0;
+static int __devexit edb93xx_remove(struct platform_device *pdev)
+{
+	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
-device_put:
-	platform_device_put(edb93xx_snd_device);
-free_i2s:
+	snd_soc_unregister_card(card);
 	ep93xx_i2s_release();
-	return ret;
+
+	return 0;
+}
+
+static struct platform_driver edb93xx_driver = {
+	.driver		= {
+		.name	= "edb93xx-audio",
+		.owner	= THIS_MODULE,
+	},
+	.probe		= edb93xx_probe,
+	.remove		= __devexit_p(edb93xx_remove),
+};
+
+static int __init edb93xx_init(void)
+{
+	return platform_driver_register(&edb93xx_driver);
 }
 module_init(edb93xx_init);
 
 static void __exit edb93xx_exit(void)
 {
-	platform_device_unregister(edb93xx_snd_device);
-	ep93xx_i2s_release();
+	platform_driver_unregister(&edb93xx_driver);
 }
 module_exit(edb93xx_exit);
 
 MODULE_AUTHOR("Alexander Sverdlin <[email protected]>");
 MODULE_DESCRIPTION("ALSA SoC EDB93xx");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:edb93xx-audio");
#5 lore raw

Re: [PATCH 3/7] ASoC: edb93xx: convert to use snd_soc_register_card()

Quoted 2 lines · Alexander Sverdlin

Have you tried the driver on reference boards?

No - I don't have any of those.

Quoted 4 lines

For me it doesn't work any more. Boot messages are ok, as before, but alsa open produces such messages:

Jan  1 00:32:19 IPCUn user.err kernel: asoc: can't open platform

ep93xx-pcm-audio

Do you have the first patch ("ASoC: ep93xx-pcm: add MODULE_ALIAS") in this series applied? Have you tried whether it still works if you compile everything in?

#6 lore raw

Re: [PATCH 3/7] ASoC: edb93xx: convert to use snd_soc_register_card()

Hello!

I've checked mainline linux-next without your patches, it's broken too. So your patches are not the root cause for that.

Quoted 15 lines · Mika Westerberg
Quoted 2 lines · Alexander Sverdlin

Have you tried the driver on reference boards?

No - I don't have any of those.

Quoted 4 lines

For me it doesn't work any more. Boot messages are ok, as before, but alsa open produces such messages:

Jan  1 00:32:19 IPCUn user.err kernel: asoc: can't open platform

ep93xx-pcm-audio

Do you have the first patch ("ASoC: ep93xx-pcm: add MODULE_ALIAS") in this series applied? Have you tried whether it still works if you compile everything in?

#7 lore raw

Re: [PATCH 3/7] ASoC: edb93xx: convert to use snd_soc_register_card()

Quoted 3 lines · Alexander Sverdlin

I've checked mainline linux-next without your patches, it's broken too. So your patches are not the root cause for that.

Ok thanks.

Still it would be good to find out which causes it to fail. Are you able to load all the modules manually? Does it work then?

#8 lore raw

Re: [PATCH 3/7] ASoC: edb93xx: convert to use snd_soc_register_card()

Hello!

Quoted 10 lines · Mika Westerberg
Quoted 3 lines · Alexander Sverdlin

I've checked mainline linux-next without your patches, it's broken too. So your patches are not the root cause for that.

Ok thanks.

Still it would be good to find out which causes it to fail. Are you able to load all the modules manually? Does it work then?

I've limited access to hardware at the moment, so I'll find out that, but it will not be so fast )

#9 lore raw

PATCH 4/7 ASoC: snappercl15: convert to use snd_soc_register_card()

In reply to Mika Westerberg

Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device.

---
 sound/soc/ep93xx/snappercl15.c |   53 +++++++++++++++++++++++++++-------------
 1 files changed, 36 insertions(+), 17 deletions(-)
sound/soc/ep93xx/snappercl15.c +36 -17
index c8aa8a5..f74ac54 100644
@@ -104,37 +104,56 @@ static struct snd_soc_card snd_soc_snappercl15 = {
 	.num_links	= 1,
 };
 
-static struct platform_device *snappercl15_snd_device;
-
-static int __init snappercl15_init(void)
+static int __devinit snappercl15_probe(struct platform_device *pdev)
 {
+	struct snd_soc_card *card = &snd_soc_snappercl15;
 	int ret;
 
-	if (!machine_is_snapper_cl15())
-		return -ENODEV;
-
 	ret = ep93xx_i2s_acquire(EP93XX_SYSCON_DEVCFG_I2SONAC97,
 				 EP93XX_SYSCON_I2SCLKDIV_ORIDE |
 				 EP93XX_SYSCON_I2SCLKDIV_SPOL);
 	if (ret)
 		return ret;
 
-	snappercl15_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!snappercl15_snd_device)
-		return -ENOMEM;
-	
-	platform_set_drvdata(snappercl15_snd_device, &snd_soc_snappercl15);
-	ret = platform_device_add(snappercl15_snd_device);
-	if (ret)
-		platform_device_put(snappercl15_snd_device);
+	card->dev = &pdev->dev;
+
+	ret = snd_soc_register_card(card);
+	if (ret) {
+		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+			ret);
+		ep93xx_i2s_release();
+	}
 
 	return ret;
 }
 
-static void __exit snappercl15_exit(void)
+static int __devexit snappercl15_remove(struct platform_device *pdev)
 {
-	platform_device_unregister(snappercl15_snd_device);
+	struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+	snd_soc_unregister_card(card);
 	ep93xx_i2s_release();
+
+	return 0;
+}
+
+static struct platform_driver snappercl15_driver = {
+	.driver		= {
+		.name	= "snappercl15-audio",
+		.owner	= THIS_MODULE,
+	},
+	.probe		= snappercl15_probe,
+	.remove		= __devexit_p(snappercl15_remove),
+};
+
+static int __init snappercl15_init(void)
+{
+	return platform_driver_register(&snappercl15_driver);
+}
+
+static void __exit snappercl15_exit(void)
+{
+	platform_driver_unregister(&snappercl15_driver);
 }
 
 module_init(snappercl15_init);
@@ -143,4 +162,4 @@ module_exit(snappercl15_exit);
 MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("ALSA SoC Snapper CL15");
 MODULE_LICENSE("GPL");
-
+MODULE_ALIAS("platform:snappercl15-audio");
Signature · 1 line
1.7.5.4
#10 lore raw

PATCH 5/7 ARM: ep93xx: simone: register audio platform device

In reply to Mika Westerberg

Since the ASoC machine driver is now a platform driver we need to register a matching platform device.

---
 arch/arm/mach-ep93xx/simone.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
arch/arm/mach-ep93xx/simone.c +12 -1
index 8392e95..1445ce5 100644
@@ -53,6 +53,17 @@ static struct i2c_board_info __initdata simone_i2c_board_info[] = {
 	},
 };
 
+static struct platform_device simone_audio_device = {
+	.name		= "simone-audio",
+	.id		= -1,
+};
+
+static void __init simone_register_audio(void)
+{
+	ep93xx_register_ac97();
+	platform_device_register(&simone_audio_device);
+}
+
 static void __init simone_init_machine(void)
 {
 	ep93xx_init_devices();
@@ -61,7 +72,7 @@ static void __init simone_init_machine(void)
 	ep93xx_register_fb(&simone_fb_info);
 	ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
 			    ARRAY_SIZE(simone_i2c_board_info));
-	ep93xx_register_ac97();
+	simone_register_audio();
 }
 
 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
Signature · 1 line
1.7.5.4
#11 lore raw

PATCH 6/7 ARM: ep93xx: edb93xx: register audio platform device

In reply to Mika Westerberg

Since the ASoC machine driver is now a platform driver we need to register a matching platform device.

Cc Alexander Sverdlin <[email protected]>
---
 arch/arm/mach-ep93xx/edb93xx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-ep93xx/edb93xx.c +6 -0
index 9969bb1..8dc51e4 100644
@@ -159,6 +159,11 @@ static void __init edb93xx_register_spi(void)
 /*************************************************************************
  * EDB93xx I2S
  *************************************************************************/
+static struct platform_device edb93xx_audio_device = {
+	.name		= "edb93xx-audio",
+	.id		= -1,
+};
+
 static int __init edb93xx_has_audio(void)
 {
 	return (machine_is_edb9301() || machine_is_edb9302() ||
@@ -170,6 +175,7 @@ static void __init edb93xx_register_i2s(void)
 {
 	if (edb93xx_has_audio()) {
 		ep93xx_register_i2s();
+		platform_device_register(&edb93xx_audio_device);
 	}
 }
 
Signature · 1 line
1.7.5.4
#12 lore raw

PATCH 7/7 ARM: ep93xx: snappercl15: register audio platform device

In reply to Mika Westerberg

Since the ASoC machine driver is now a platform driver we need to register a matching platform device.

---
 arch/arm/mach-ep93xx/snappercl15.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
arch/arm/mach-ep93xx/snappercl15.c +12 -1
index 2e9c614..edd75e3 100644
@@ -150,6 +150,17 @@ static struct ep93xxfb_mach_info __initdata snappercl15_fb_info = {
 	.bpp			= 16,
 };
 
+static struct platform_device snappercl15_audio_device = {
+	.name		= "snappercl15-audio",
+	.id		= -1,
+};
+
+static void __init snappercl15_register_audio(void)
+{
+	ep93xx_register_i2s();
+	platform_device_register(&snappercl15_audio_device);
+}
+
 static void __init snappercl15_init_machine(void)
 {
 	ep93xx_init_devices();
@@ -157,7 +168,7 @@ static void __init snappercl15_init_machine(void)
 	ep93xx_register_i2c(&snappercl15_i2c_gpio_data, snappercl15_i2c_data,
 			    ARRAY_SIZE(snappercl15_i2c_data));
 	ep93xx_register_fb(&snappercl15_fb_info);
-	ep93xx_register_i2s();
+	snappercl15_register_audio();
 	platform_device_register(&snappercl15_nand_device);
 }
 
Signature · 1 line
1.7.5.4
Reviewed-by on the v1 series
#13 lore raw
In reply to Mika Westerberg
Quoted 7 lines · Mika Westerberg

Here is a series of patches which convert ep93xx ASoC drivers to use snd_soc_register_card(). This has the advantage that the machine drivers get loaded automatically by udev. Also this gets rid of machine_is_xxx() from the machine drivers.

Tested on Sim.One. The edb93xx and snappercl15 changes are compile tested only.

Thanks for doing this. Unfortunately I don't have any hardware to test any more, but the code looks correct to me.

Whole series:

Quoted 19 lines

Mika Westerberg (7):
ASoC: ep93xx-pcm: add MODULE_ALIAS
ASoC: simone: convert to use snd_soc_register_card()
ASoC: edb93xx: convert to use snd_soc_register_card()
ASoC: snappercl15: convert to use snd_soc_register_card()
ARM: ep93xx: simone: register audio platform device
ARM: ep93xx: edb93xx: register audio platform device
ARM: ep93xx: snappercl15: register audio platform device

 arch/arm/mach-ep93xx/edb93xx.c     |    6 +++
 arch/arm/mach-ep93xx/simone.c      |   13 +++++++-
 arch/arm/mach-ep93xx/snappercl15.c |   13 +++++++-
 sound/soc/ep93xx/edb93xx.c         |   60 ++++++++++++++++++---------------
 sound/soc/ep93xx/ep93xx-pcm.c      |    1 +
 sound/soc/ep93xx/simone.c          |   64 ++++++++++++++++++++----------------
 sound/soc/ep93xx/snappercl15.c     |   53 ++++++++++++++++++++---------
 7 files changed, 136 insertions(+), 74 deletions(-)
#14 lore raw
Quoted 29 lines · Ryan Mallon
Quoted 2 lines · Mika Westerberg

Here is a series of patches which convert ep93xx ASoC drivers to use snd_soc_register_card(). This has the advantage that the machine drivers

get

Quoted 1 line

loaded automatically by udev. Also this gets rid of machine_is_xxx() from

the

Quoted 4 lines

machine drivers.

Tested on Sim.One. The edb93xx and snappercl15 changes are compile tested only.

Thanks for doing this. Unfortunately I don't have any hardware to test any more, but the code looks correct to me.

Whole series:

Quoted 10 lines

Mika Westerberg (7):
ASoC: ep93xx-pcm: add MODULE_ALIAS
ASoC: simone: convert to use snd_soc_register_card()
ASoC: edb93xx: convert to use snd_soc_register_card()
ASoC: snappercl15: convert to use snd_soc_register_card()
ARM: ep93xx: simone: register audio platform device
ARM: ep93xx: edb93xx: register audio platform device
ARM: ep93xx: snappercl15: register audio platform device

Quoted 14 lines
Quoted 4 lines
 arch/arm/mach-ep93xx/edb93xx.c     |    6 +++
 arch/arm/mach-ep93xx/simone.c      |   13 +++++++-
 arch/arm/mach-ep93xx/snappercl15.c |   13 +++++++-
 sound/soc/ep93xx/edb93xx.c         |   60

++++++++++++++++++---------------

Quoted 2 lines
 sound/soc/ep93xx/ep93xx-pcm.c      |    1 +
 sound/soc/ep93xx/simone.c          |   64

++++++++++++++++++++----------------

Quoted 3 lines
 sound/soc/ep93xx/snappercl15.c     |   53 ++++++++++++++++++++---------
 7 files changed, 136 insertions(+), 74 deletions(-)

ASoC parts

#16 lore raw
Quoted 9 lines · Mark Brown
Quoted 3 lines · Liam

ASoC parts

I'm happy with them too - they should probably all go in together, do folks want me to apply them to ASoC or should we merge via the ARM tree?

I'm kind of hoping that Hartley would (N)ACK the mach-ep93xx parts so that they could be merged via ASoC tree.

#17 lore raw
Quoted 5 lines · Mika Westerberg
Quoted 4 lines · Mark Brown
Quoted 1 line · Liam

ASoC parts

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

I'm happy with them too - they should probably all go in together, do folks want me to apply them to ASoC or should we merge via the ARM tree?

I'm kind of hoping that Hartley would (N)ACK the mach-ep93xx parts so that they could be merged via ASoC tree.

Mika,

I'm on vacation this week and did not get a chance to review your patches. I did take a quick glance at them and didn't see any issues.

I think Ryan Mallon looked them over and gave you a Reviewed-by signoff. Go with that one for now. I'll look the patches over next week and if they have not been merged into linux-next by then I'll give you the appropriate sign-off or additional comments.

Thanks for doing this!

Regards,
Hartley

#18 lore raw
Quoted 3 lines · H Hartley Sweeten

I'm on vacation this week and did not get a chance to review your patches. I did take a quick glance at them and didn't see any issues.

There is no hurry with these patches. Enjoy your vacation and check them when you come back and have time, unless they are already merged.

Quoted 3 lines

I think Ryan Mallon looked them over and gave you a Reviewed-by signoff. Go with that one for now. I'll look the patches over next week and if they have not been merged into linux-next by then I'll give you the appropriate sign-off or additional comments.

If Mark is ok with these and Reviewed-by from Ryan is enough then I guess these can be merged in the ASoC tree now. On the other hand if formal acks from ep93xx maintainers are needed, then these can wait until you come back from your vacation.

Applied
#19 lore raw
Quoted 4 lines · Mika Westerberg

If Mark is ok with these and Reviewed-by from Ryan is enough then I guess these can be merged in the ASoC tree now. On the other hand if formal acks from ep93xx maintainers are needed, then these can wait until you come back from your vacation.

I've applied them all, thanks.