[alsa-devel] [PATCH 1/3] ASoC: Remove unneeded WM9713 header include from SMDK WM9713 driver
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/smdk_wm9713.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 11086f8..8619a9a 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -15,7 +15,6 @@ #include <linux/device.h> #include <sound/soc.h>
-#include "../codecs/wm9713.h" #include "s3c-dma.h" #include "s3c-ac97.h"
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 broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/smdk_wm9713.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 8619a9a..78a4a30 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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, };
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
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 broonie@opensource.wolfsonmicro.com
sound/soc/s3c24xx/smdk_wm9713.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 8619a9a..78a4a30 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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, };
Acked-by: Jassi Brar jassi.brar@samsung.com
Otherwise we try to re-register the CODEC device if the module is reloaded and sysfs becomes miserable.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/s3c24xx/smdk_wm9713.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 78a4a30..33ba8fd 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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);
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
Otherwise we try to re-register the CODEC device if the module is reloaded and sysfs becomes miserable.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
sound/soc/s3c24xx/smdk_wm9713.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 78a4a30..33ba8fd 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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 ?
On Thu, Sep 23, 2010 at 11:53:00PM +0900, Jassi Brar wrote:
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown
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 ?
Yes, the soc-audio device does need to be unregistered - it's the smdk_snd_ac97_device that was already being unregistered here.
On Thu, Sep 23, 2010 at 11:56 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Thu, Sep 23, 2010 at 11:53:00PM +0900, Jassi Brar wrote:
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown
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 ?
Yes, the soc-audio device does need to be unregistered - it's the smdk_snd_ac97_device that 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....
Acked-by: Jassi Brar jassi.brar@samsung.com
On Fri, Sep 24, 2010 at 09:27:02AM +0900, Jassi Brar wrote:
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?
On Fri, Sep 24, 2010 at 6:22 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Fri, Sep 24, 2010 at 09:27:02AM +0900, Jassi Brar wrote:
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.
On Fri, Sep 24, 2010 at 08:10:50PM +0900, Jassi Brar wrote:
On Fri, Sep 24, 2010 at 6:22 PM, Mark Brown
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:
--- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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.
On Fri, Sep 24, 2010 at 9:01 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Fri, Sep 24, 2010 at 08:10:50PM +0900, Jassi Brar wrote:
On Fri, Sep 24, 2010 at 6:22 PM, Mark Brown
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:
--- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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.
Ok, I forgot unregister would free the object.
On Thu, Sep 23, 2010 at 11:40 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
sound/soc/s3c24xx/smdk_wm9713.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/smdk_wm9713.c b/sound/soc/s3c24xx/smdk_wm9713.c index 11086f8..8619a9a 100644 --- a/sound/soc/s3c24xx/smdk_wm9713.c +++ b/sound/soc/s3c24xx/smdk_wm9713.c @@ -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,
Acked-by: Jassi Brar jassi.brar@samsung.com
On Thu, Sep 23, 2010 at 11:46:20PM +0900, Jassi Brar wrote:
If it compiles now,
Acked-by: Jassi Brar jassi.brar@samsung.com
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.
On Thu, 2010-09-23 at 15:40 +0100, Mark Brown wrote:
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com
All
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
participants (3)
-
Jassi Brar
-
Liam Girdwood
-
Mark Brown