ASoC: Remove unneeded WM9713 header include from SMDK WM9713 driver
PATCH 1/3 ASoC: Remove unneeded WM9713 header include from SMDK WM9713 driver
--- sound/soc/s3c24xx/smdk_wm9713.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +0 -1
@@ -15,7 +15,6 @@#include <linux/device.h> #include <sound/soc.h> -#include "../codecs/wm9713.h" #include "s3c-dma.h" #include "s3c-ac97.h"
Signature · 1 line
1.7.1
PATCH 2/3 ASoC: Clarify naming for SMDK WM9713 driver
At least some of the systems using this device have multiple audio subsystems so provide some guidance to userspace about which one this is.
--- sound/soc/s3c24xx/smdk_wm9713.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +1 -1
@@ -52,7 +52,7 @@ static struct snd_soc_dai_link smdk_dai = { };static struct snd_soc_card smdk = { - .name ="SMDK" , + .name ="SMDK WM9713" , .dai_link = &smdk_dai, .num_links =1 , };
Signature · 1 line
1.7.1
Re: [PATCH 2/3] ASoC: Clarify naming for SMDK WM9713 driver
Quoted 14 lines · Mark Brown
At least some of the systems using this device have multiple audio subsystems so provide some guidance to userspace about which one this is.
Signed-off-by Mark Brown <[email protected]>---
sound/soc/s3c24xx/smdk_wm9713.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/s3c24xx/smdk_wm9713.c +0
-0
sound/soc/s3c24xx/smdk_wm9713.c static struct snd_soc_dai_link smdk_dai = { · line 58
Quoted 8 lines
sound/soc/s3c24xx/smdk_wm9713.c +1
-1@@ -52,7 +52,7 @@ static struct snd_soc_dai_link smdk_dai = { }; static struct snd_soc_card smdk = { - .name = "SMDK", + .name = "SMDK WM9713", .dai_link = &smdk_dai, .num_links = 1, };
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
PATCH 3/3 ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
In reply to Mark BrownOtherwise we try to re-register the CODEC device if the module is reloaded and sysfs becomes miserable.
--- sound/soc/s3c24xx/smdk_wm9713.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +1 -0
@@ -95,6 +95,7 @@ err: static void __exit smdk_exit(void) {platform_device_unregister (smdk_snd_ac97_device); +platform_device_unregister (smdk_snd_wm9713_device); }module_init (smdk_init);
Signature · 1 line
1.7.1
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 13 lines · Mark Brown
Otherwise we try to re-register the CODEC device if the module is reloaded and sysfs becomes miserable.
Signed-off-by Mark Brown <[email protected]>---
sound/soc/s3c24xx/smdk_wm9713.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)sound/soc/s3c24xx/smdk_wm9713.c +0
-0
sound/soc/s3c24xx/smdk_wm9713.c err: · line 101
Quoted 7 lines
sound/soc/s3c24xx/smdk_wm9713.c +1
-0@@ -95,6 +95,7 @@ err: static void __exit smdk_exit(void) { platform_device_unregister(smdk_snd_ac97_device); + platform_device_unregister(smdk_snd_wm9713_device); } module_init(smdk_init);
I think we need more than this to make module load/unload/load work. Like the soc-audio device added. Wouldn't that spoil the party next time the module is tried to loaded ?
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 8 lines · Jassi Brar
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown
Quoted 6 lines
static void
__exitsmdk_exit(void)
{platform_device_unregister(smdk_snd_ac97_device);
+platform_device_unregister(smdk_snd_wm9713_device); }
Quoted 5 lines
Quoted 1 line
module_init(smdk_init);
I think we need more than this to make module load/unload/load work. Like the soc-audio device added. Wouldn't that spoil the party next time the module is tried to loaded ?
Yes, the soc-audio device does need to be unregistered - it's the smdk_snd_ac97_device that was already being unregistered here.
Jassi Brar
Acked-byRe: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 9 lines · Mark Brown
Quoted 8 lines · Jassi Brar
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown
Quoted 6 lines
static void
__exitsmdk_exit(void)
{platform_device_unregister(smdk_snd_ac97_device);
+platform_device_unregister(smdk_snd_wm9713_device); }
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
module_init(smdk_init);
I think we need more than this to make module load/unload/load work. Like the soc-audio device added. Wouldn't that spoil the party next time the module is tried to loaded ?
Yes, the soc-audio device does need to be unregistered - it's the
smdk_snd_ac97_devicethat was already being unregistered here.
Even though more needs to be done to achieve purpose of this patch, this change is harmless.
So as is or with more changes....
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 3 lines · Jassi Brar
Even though more needs to be done to achieve purpose of this patch, this change is harmless.
So as is or with more changes....
Could you be more specific about what other changes you believe are needed?
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 8 lines · Mark Brown
Quoted 3 lines · Jassi Brar
Even though more needs to be done to achieve purpose of this patch, this change is harmless.
So as is or with more changes....Could you be more specific about what other changes you believe are needed?
IIUIC, the aim of this patch is to be able to reload the module, which isn't going to work simply with this chage - we need to do as well something about the 'soc-audio' platform device added the first time ?
So IMHO, this change is a right step but not enough.
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 9 lines · Jassi Brar
On Fri, Sep 24, 2010 at 6:22 PM, Mark Brown
Quoted 2 lines
Could you be more specific about what other changes you believe are needed?
IIUIC, the aim of this patch is to be able to reload the module, which isn't going to work simply with this chage - we need to do as well something about the 'soc-audio' platform device added the first time ?
So IMHO, this change is a right step but not enough.
As I said in reply to your earlier mail the pre-existing code in the driver already does that:
sound/soc/s3c24xx/smdk_wm9713.c +0 -0
@@ -95,6 +95,7 @@ err: static void __exit smdk_exit(void) {platform_device_unregister (smdk_snd_ac97_device);
This preexisting line from the context is cleaning up the soc-audio device.
+ platform_device_unregister(smdk_snd_wm9713_device);
This new line cleans up the wm9713-codec device which is also added in the probe function (yay AC'97!).
Reloading the module works, I've been doing that rather a lot.
Re: [PATCH 3/3] ASoC: Clean up the CODEC device as well as the board for SMDK WM9713
Quoted 24 lines · Mark Brown
Quoted 9 lines · Jassi Brar
On Fri, Sep 24, 2010 at 6:22 PM, Mark Brown
Quoted 2 lines
Could you be more specific about what other changes you believe are needed?
IIUIC, the aim of this patch is to be able to reload the module, which isn't going to work simply with this chage - we need to do as well something about the 'soc-audio' platform device added the first time ?
So IMHO, this change is a right step but not enough.As I said in reply to your earlier mail the pre-existing code in the driver already does that:
sound/soc/s3c24xx/smdk_wm9713.c +0
-0@@ -95,6 +95,7 @@ err: static void __exit smdk_exit(void) { platform_device_unregister(smdk_snd_ac97_device);This preexisting line from the context is cleaning up the soc-audio device.
Quoted 6 lines
+
platform_device_unregister(smdk_snd_wm9713_device);This new line cleans up the wm9713-codec device which is also added in the probe function (yay AC'97!).
Reloading the module works, I've been doing that rather a lot.
Ok, I forgot unregister would free the object.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 10 lines · Mark Brown
Signed-off-by Mark Brown <[email protected]>---
sound/soc/s3c24xx/smdk_wm9713.c | 1 -1 files changed, 0 insertions(+), 1 deletions(-)sound/soc/s3c24xx/smdk_wm9713.c +0
-0
sound/soc/s3c24xx/smdk_wm9713.c line 19
Quoted 6 lines
sound/soc/s3c24xx/smdk_wm9713.c +0
-1@@ -15,7 +15,6 @@ #include <linux/device.h> #include <sound/soc.h> -#include "../codecs/wm9713.h" #include "s3c-dma.h" #include "s3c-ac97.h"
If it compiles now,
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 3 lines · Jassi Brar
If it compiles now,
Acked-by Jassi Brar <[email protected]>
Yes, the change to multi-component means that there's no direct references to the DAI structures or CODEC device in the machine drivers (it's just directly written strings) and since the SMDKs use the standard AC'97 clock there's no need for any reconfiguration of the clocking, the defines for which are the normal reason machine drivers still need to include the CODEC header.
Quoted 1 line · Mark Brown
Signed-off-by Mark Brown <[email protected]>
All
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk