Skip to contentSkip to conversation

ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

PATCH In review Kuninori Morimoto 3 participants 4 messages Apr 28, 2016 – May 13, 2016 7 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): SG2PR06MB091988495E83C8D724EE7238D89D0@SG2PR06MB0919.apcprd06.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): SG2PR06MB0919B1E63014EEEF1EC2855BD89D0@SG2PR06MB0919.apcprd06.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): SG2PR06MB0919512C80CF663D8BC4A682D8680@SG2PR06MB0919.apcprd06.prod.outlook.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

PATCH 1/1 ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

From: Kuninori Morimoto <[email protected]>

Current rsnd_mod_call is counting its calling count to avoid unbalanced function pair calling for error cases (ex init <-> quit). SSI parent is now controlled as "mod" on current rsnd driver. Because of this reason, SSI .remove function will be called twice if it was used as SSI parent when user tried unbind. But probe/remove pair were not counted. This patch counts probe/remove functions to avoid it. Special thans Hiep

---
 sound/soc/sh/rcar/rsnd.h | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
sound/soc/sh/rcar/rsnd.h +7 -6
index fc89a67..a8f61d7 100644
@@ -276,8 +276,9 @@ struct rsnd_mod {
 /*
  * status
  *
- * 0xH0000CB0
+ * 0xH0000CBA
  *
+ * A	0: probe	1: remove
  * B	0: init		1: quit
  * C	0: start	1: stop
  *
@@ -287,19 +288,19 @@ struct rsnd_mod {
  * H	0: fallback
  * H	0: hw_params
  */
+#define __rsnd_mod_shift_probe		0
+#define __rsnd_mod_shift_remove		0
 #define __rsnd_mod_shift_init		4
 #define __rsnd_mod_shift_quit		4
 #define __rsnd_mod_shift_start		8
 #define __rsnd_mod_shift_stop		8
-#define __rsnd_mod_shift_probe		28 /* always called */
-#define __rsnd_mod_shift_remove		28 /* always called */
 #define __rsnd_mod_shift_irq		28 /* always called */
 #define __rsnd_mod_shift_pcm_new	28 /* always called */
 #define __rsnd_mod_shift_fallback	28 /* always called */
 #define __rsnd_mod_shift_hw_params	28 /* always called */
 
-#define __rsnd_mod_add_probe		0
-#define __rsnd_mod_add_remove		0
+#define __rsnd_mod_add_probe		 1
+#define __rsnd_mod_add_remove		-1
 #define __rsnd_mod_add_init		 1
 #define __rsnd_mod_add_quit		-1
 #define __rsnd_mod_add_start		 1
@@ -310,7 +311,7 @@ struct rsnd_mod {
 #define __rsnd_mod_add_hw_params	0
 
 #define __rsnd_mod_call_probe		0
-#define __rsnd_mod_call_remove		0
+#define __rsnd_mod_call_remove		1
 #define __rsnd_mod_call_init		0
 #define __rsnd_mod_call_quit		1
 #define __rsnd_mod_call_start		0
Signature · 1 line
1.9.1
maintainer
#8 lore raw

Applied "ASoC: rsnd: count .probe/.remove for rsnd_mod_call()" to the asoc tree

The patch

ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 1a5658c213116d56a1a38e83588f6636a57d6374 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Thu, 28 Apr 2016 01:49:48 +0000
Subject: [PATCH] ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

Current rsnd_mod_call is counting its calling count to avoid unbalanced function pair calling for error cases (ex init <-> quit). SSI parent is now controlled as "mod" on current rsnd driver. Because of this reason, SSI .remove function will be called twice if it was used as SSI parent when user tried unbind. But probe/remove pair were not counted. This patch counts probe/remove functions to avoid it. Special thans Hiep

---
 sound/soc/sh/rcar/rsnd.h | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
sound/soc/sh/rcar/rsnd.h +7 -6
index fc89a67258ca..a8f61d79333b 100644
@@ -276,8 +276,9 @@ struct rsnd_mod {
 /*
  * status
  *
- * 0xH0000CB0
+ * 0xH0000CBA
  *
+ * A	0: probe	1: remove
  * B	0: init		1: quit
  * C	0: start	1: stop
  *
@@ -287,19 +288,19 @@ struct rsnd_mod {
  * H	0: fallback
  * H	0: hw_params
  */
+#define __rsnd_mod_shift_probe		0
+#define __rsnd_mod_shift_remove		0
 #define __rsnd_mod_shift_init		4
 #define __rsnd_mod_shift_quit		4
 #define __rsnd_mod_shift_start		8
 #define __rsnd_mod_shift_stop		8
-#define __rsnd_mod_shift_probe		28 /* always called */
-#define __rsnd_mod_shift_remove		28 /* always called */
 #define __rsnd_mod_shift_irq		28 /* always called */
 #define __rsnd_mod_shift_pcm_new	28 /* always called */
 #define __rsnd_mod_shift_fallback	28 /* always called */
 #define __rsnd_mod_shift_hw_params	28 /* always called */
 
-#define __rsnd_mod_add_probe		0
-#define __rsnd_mod_add_remove		0
+#define __rsnd_mod_add_probe		 1
+#define __rsnd_mod_add_remove		-1
 #define __rsnd_mod_add_init		 1
 #define __rsnd_mod_add_quit		-1
 #define __rsnd_mod_add_start		 1
@@ -310,7 +311,7 @@ struct rsnd_mod {
 #define __rsnd_mod_add_hw_params	0
 
 #define __rsnd_mod_call_probe		0
-#define __rsnd_mod_call_remove		0
+#define __rsnd_mod_call_remove		1
 #define __rsnd_mod_call_init		0
 #define __rsnd_mod_call_quit		1
 #define __rsnd_mod_call_start		0
Signature · 1 line
2.8.0.rc3
#9 lore raw

Re: Applied "ASoC: rsnd: count .probe/.remove for rsnd_mod_call()" to the asoc tree

Hi Mr Mark Brown, Mr Morimoto

I have used this patch for testting Rcar-sound unbind/rebind on the RcarH3 board. result is good(Rcar-sound can unbind/rebind without error warning )

Best regards,

Quoted 87 lines · Mark Brown

The patch

ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 1a5658c213116d56a1a38e83588f6636a57d6374 Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
Date: Thu, 28 Apr 2016 01:49:48 +0000
Subject: [PATCH] ASoC: rsnd: count .probe/.remove for rsnd_mod_call()

Current rsnd_mod_call is counting its calling count to avoid unbalanced function pair calling for error cases (ex init <-> quit). SSI parent is now controlled as "mod" on current rsnd driver. Because of this reason, SSI .remove function will be called twice if it was used as SSI parent when user tried unbind. But probe/remove pair were not counted. This patch counts probe/remove functions to avoid it. Special thans Hiep

---
  sound/soc/sh/rcar/rsnd.h | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
sound/soc/sh/rcar/rsnd.h +6 -5
index fc89a67258ca..a8f61d79333b 100644
@@ -276,8 +276,9 @@ struct rsnd_mod {
  /*
   * status
   *
- * 0xH0000CB0
+ * 0xH0000CBA
   *
+ * A	0: probe	1: remove
   * B	0: init		1: quit
   * C	0: start	1: stop
   *
@@ -287,19 +288,19 @@ struct rsnd_mod {
   * H	0: fallback
   * H	0: hw_params
   */
+#define __rsnd_mod_shift_probe		0
+#define __rsnd_mod_shift_remove		0
  #define __rsnd_mod_shift_init		4
  #define __rsnd_mod_shift_quit		4
  #define __rsnd_mod_shift_start		8
  #define __rsnd_mod_shift_stop		8
-#define __rsnd_mod_shift_probe		28 /* always called */
-#define __rsnd_mod_shift_remove		28 /* always called */
  #define __rsnd_mod_shift_irq		28 /* always called */
  #define __rsnd_mod_shift_pcm_new	28 /* always called */
  #define __rsnd_mod_shift_fallback	28 /* always called */
  #define __rsnd_mod_shift_hw_params	28 /* always called */
 
-#define __rsnd_mod_add_probe		0
-#define __rsnd_mod_add_remove		0
+#define __rsnd_mod_add_probe		 1
+#define __rsnd_mod_add_remove		-1
  #define __rsnd_mod_add_init		 1
  #define __rsnd_mod_add_quit		-1
  #define __rsnd_mod_add_start		 1

sound/soc/sh/rcar/rsnd.h struct rsnd_mod { · line 317

Quoted 8 lines
sound/soc/sh/rcar/rsnd.h +1 -1
@@ -310,7 +311,7 @@ struct rsnd_mod {
  #define __rsnd_mod_add_hw_params	0
 
  #define __rsnd_mod_call_probe		0
-#define __rsnd_mod_call_remove		0
+#define __rsnd_mod_call_remove		1
  #define __rsnd_mod_call_init		0
  #define __rsnd_mod_call_quit		1
  #define __rsnd_mod_call_start		0

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

#10 lore raw

Re: Applied "ASoC: rsnd: count .probe/.remove for rsnd_mod_call()" to the asoc tree

Hi Nguyen

Quoted 5 lines

I have used this patch for testting Rcar-sound unbind/rebind on the RcarH3 board.
result is good(Rcar-sound can unbind/rebind without error warning )

good to hear that.
Thanks