Skip to contentSkip to conversation

ASoC: Remove unneeded WM9713 header include from SMDK WM9713 driver

PATCH In review Mark Brown 3 participants 14 messages Sep 23, 2010 – Sep 24, 2010

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

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
index 11086f8..8619a9a 100644
@@ -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
author
#1 lore raw

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
index 8619a9a..78a4a30 100644
@@ -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
Acked-by on v1 2/3
#2 lore raw

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.

---
 sound/soc/s3c24xx/smdk_wm9713.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +0 -0
index 8619a9a..78a4a30 100644

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

author
#3 lore raw

PATCH 3/3 ASoC: Clean up the CODEC device as well as the board for SMDK WM9713

In reply to Mark Brown

Otherwise 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
index 78a4a30..33ba8fd 100644
@@ -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
#4 lore raw

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.

---
 sound/soc/s3c24xx/smdk_wm9713.c |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +0 -0
index 78a4a30..33ba8fd 100644

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

author
#5 lore raw

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 __exit smdk_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.

Acked-by
#6 lore raw

Re: [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 __exit smdk_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_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....

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author
#7 lore raw

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?

#8 lore raw

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.

author
#9 lore raw

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.

#10 lore raw

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

Acked-by on v1 1/3
#11 lore raw
In reply to Mark Brown
Quoted 10 lines · Mark Brown

---
 sound/soc/s3c24xx/smdk_wm9713.c |    1 -

 1 files changed, 0 insertions(+), 1 deletions(-)
sound/soc/s3c24xx/smdk_wm9713.c +0 -0
index 11086f8..8619a9a 100644

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

author
#12 lore raw
Quoted 3 lines · Jassi Brar

If it compiles now,

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.