All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
@ 2017-03-08  7:26   ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-08  7:26 UTC (permalink / raw)
  To: Mark Brown, Sylwester Nawrocki; +Cc: Linux-ALSA, Simon, linux-renesas-soc


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
tried to replace aux_comp_list to component_dev_list,
but it failed because of binding timing. Thus, Sylwester fixuped it by
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
was remove replaceable list (= list_aux) from snd_soc_component by using
new "auxiliary" flags (but it failed).
Because of this background, current code has reborned card_aux_list
(= same as original list_aux), and almost pointless "auxiliary" flags.

Let's remove pointless "auxiliary" flags by this patch
This means, it is same as revert both
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

Not-yet-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
request-Tested-by-from: Sylwester Nawrocki <s.nawrocki@samsung.com>
---

>> Sylwester

I created this patch, but I can't check.
Sylwester, can you please check this patch ?

 include/sound/soc.h  |  1 -
 sound/soc/soc-core.c | 15 +++++----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index dd78507..316fdce 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -815,7 +815,6 @@ struct snd_soc_component {
 
 	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
 	unsigned int registered_as_component:1;
-	unsigned int auxiliary:1; /* for auxiliary component of the card */
 	unsigned int suspended:1; /* is in suspend PM state */
 
 	struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e7d876a..5933851 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1777,7 +1777,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 	}
 
 	component->init = aux_dev->init;
-	component->auxiliary = 1;
 	list_add(&component->card_aux_list, &card->aux_comp_list);
 
 	return 0;
@@ -1789,14 +1788,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 
 static int soc_probe_aux_devices(struct snd_soc_card *card)
 {
-	struct snd_soc_component *comp, *tmp;
+	struct snd_soc_component *comp;
 	int order;
 	int ret;
 
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
-		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
-					 card_aux_list) {
+		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
 			if (comp->driver->probe_order == order) {
 				ret = soc_probe_component(card,	comp);
 				if (ret < 0) {
@@ -1805,7 +1803,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
 						comp->name, ret);
 					return ret;
 				}
-				list_del(&comp->card_aux_list);
 			}
 		}
 	}
@@ -1821,14 +1818,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
 		list_for_each_entry_safe(comp, _comp,
-			&card->component_dev_list, card_list) {
-
-			if (!comp->auxiliary)
-				continue;
+			&card->aux_comp_list, card_aux_list) {
 
 			if (comp->driver->remove_order == order) {
 				soc_remove_component(comp);
-				comp->auxiliary = 0;
+				/* remove it from the card's aux_comp_list */
+				list_del(&comp->card_aux_list);
 			}
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
@ 2017-03-08  7:26   ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-08  7:26 UTC (permalink / raw)
  To: Mark Brown, Sylwester Nawrocki; +Cc: linux-renesas-soc, Linux-ALSA, Simon


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
tried to replace aux_comp_list to component_dev_list,
but it failed because of binding timing. Thus, Sylwester fixuped it by
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
was remove replaceable list (= list_aux) from snd_soc_component by using
new "auxiliary" flags (but it failed).
Because of this background, current code has reborned card_aux_list
(= same as original list_aux), and almost pointless "auxiliary" flags.

Let's remove pointless "auxiliary" flags by this patch
This means, it is same as revert both
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

Not-yet-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
request-Tested-by-from: Sylwester Nawrocki <s.nawrocki@samsung.com>
---

>> Sylwester

I created this patch, but I can't check.
Sylwester, can you please check this patch ?

 include/sound/soc.h  |  1 -
 sound/soc/soc-core.c | 15 +++++----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index dd78507..316fdce 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -815,7 +815,6 @@ struct snd_soc_component {
 
 	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
 	unsigned int registered_as_component:1;
-	unsigned int auxiliary:1; /* for auxiliary component of the card */
 	unsigned int suspended:1; /* is in suspend PM state */
 
 	struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e7d876a..5933851 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1777,7 +1777,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 	}
 
 	component->init = aux_dev->init;
-	component->auxiliary = 1;
 	list_add(&component->card_aux_list, &card->aux_comp_list);
 
 	return 0;
@@ -1789,14 +1788,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 
 static int soc_probe_aux_devices(struct snd_soc_card *card)
 {
-	struct snd_soc_component *comp, *tmp;
+	struct snd_soc_component *comp;
 	int order;
 	int ret;
 
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
-		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
-					 card_aux_list) {
+		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
 			if (comp->driver->probe_order == order) {
 				ret = soc_probe_component(card,	comp);
 				if (ret < 0) {
@@ -1805,7 +1803,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
 						comp->name, ret);
 					return ret;
 				}
-				list_del(&comp->card_aux_list);
 			}
 		}
 	}
@@ -1821,14 +1818,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
 		list_for_each_entry_safe(comp, _comp,
-			&card->component_dev_list, card_list) {
-
-			if (!comp->auxiliary)
-				continue;
+			&card->aux_comp_list, card_aux_list) {
 
 			if (comp->driver->remove_order == order) {
 				soc_remove_component(comp);
-				comp->auxiliary = 0;
+				/* remove it from the card's aux_comp_list */
+				list_del(&comp->card_aux_list);
 			}
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [alsa-devel] [PATCH][RFC] ASoC: core: remove pointless auxiliary   from snd_soc_component
  2017-03-08  7:26   ` Kuninori Morimoto
@ 2017-03-22  4:24     ` Kuninori Morimoto
  -1 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-22  4:24 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: Mark Brown, linux-renesas-soc, Linux-ALSA, Simon


Hi Sylwester

Can you test this patch if possible ?

> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
> tried to replace aux_comp_list to component_dev_list,
> but it failed because of binding timing. Thus, Sylwester fixuped it by
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
> 
> One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
> was remove replaceable list (= list_aux) from snd_soc_component by using
> new "auxiliary" flags (but it failed).
> Because of this background, current code has reborned card_aux_list
> (= same as original list_aux), and almost pointless "auxiliary" flags.
> 
> Let's remove pointless "auxiliary" flags by this patch
> This means, it is same as revert both
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
> 
> Not-yet-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> request-Tested-by-from: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> 
> >> Sylwester
> 
> I created this patch, but I can't check.
> Sylwester, can you please check this patch ?
> 
>  include/sound/soc.h  |  1 -
>  sound/soc/soc-core.c | 15 +++++----------
>  2 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index dd78507..316fdce 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -815,7 +815,6 @@ struct snd_soc_component {
>  
>  	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
>  	unsigned int registered_as_component:1;
> -	unsigned int auxiliary:1; /* for auxiliary component of the card */
>  	unsigned int suspended:1; /* is in suspend PM state */
>  
>  	struct list_head list;
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index e7d876a..5933851 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -1777,7 +1777,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
>  	}
>  
>  	component->init = aux_dev->init;
> -	component->auxiliary = 1;
>  	list_add(&component->card_aux_list, &card->aux_comp_list);
>  
>  	return 0;
> @@ -1789,14 +1788,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
>  
>  static int soc_probe_aux_devices(struct snd_soc_card *card)
>  {
> -	struct snd_soc_component *comp, *tmp;
> +	struct snd_soc_component *comp;
>  	int order;
>  	int ret;
>  
>  	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
>  		order++) {
> -		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
> -					 card_aux_list) {
> +		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
>  			if (comp->driver->probe_order == order) {
>  				ret = soc_probe_component(card,	comp);
>  				if (ret < 0) {
> @@ -1805,7 +1803,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
>  						comp->name, ret);
>  					return ret;
>  				}
> -				list_del(&comp->card_aux_list);
>  			}
>  		}
>  	}
> @@ -1821,14 +1818,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
>  	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
>  		order++) {
>  		list_for_each_entry_safe(comp, _comp,
> -			&card->component_dev_list, card_list) {
> -
> -			if (!comp->auxiliary)
> -				continue;
> +			&card->aux_comp_list, card_aux_list) {
>  
>  			if (comp->driver->remove_order == order) {
>  				soc_remove_component(comp);
> -				comp->auxiliary = 0;
> +				/* remove it from the card's aux_comp_list */
> +				list_del(&comp->card_aux_list);
>  			}
>  		}
>  	}
> -- 
> 1.9.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [alsa-devel] [PATCH][RFC] ASoC: core: remove pointless auxiliary   from snd_soc_component
@ 2017-03-22  4:24     ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-22  4:24 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: Mark Brown, linux-renesas-soc, Linux-ALSA, Simon


Hi Sylwester

Can you test this patch if possible ?

> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
> tried to replace aux_comp_list to component_dev_list,
> but it failed because of binding timing. Thus, Sylwester fixuped it by
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
> 
> One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
> was remove replaceable list (= list_aux) from snd_soc_component by using
> new "auxiliary" flags (but it failed).
> Because of this background, current code has reborned card_aux_list
> (= same as original list_aux), and almost pointless "auxiliary" flags.
> 
> Let's remove pointless "auxiliary" flags by this patch
> This means, it is same as revert both
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
> 
> Not-yet-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> request-Tested-by-from: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> 
> >> Sylwester
> 
> I created this patch, but I can't check.
> Sylwester, can you please check this patch ?
> 
>  include/sound/soc.h  |  1 -
>  sound/soc/soc-core.c | 15 +++++----------
>  2 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index dd78507..316fdce 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -815,7 +815,6 @@ struct snd_soc_component {
>  
>  	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
>  	unsigned int registered_as_component:1;
> -	unsigned int auxiliary:1; /* for auxiliary component of the card */
>  	unsigned int suspended:1; /* is in suspend PM state */
>  
>  	struct list_head list;
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index e7d876a..5933851 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -1777,7 +1777,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
>  	}
>  
>  	component->init = aux_dev->init;
> -	component->auxiliary = 1;
>  	list_add(&component->card_aux_list, &card->aux_comp_list);
>  
>  	return 0;
> @@ -1789,14 +1788,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
>  
>  static int soc_probe_aux_devices(struct snd_soc_card *card)
>  {
> -	struct snd_soc_component *comp, *tmp;
> +	struct snd_soc_component *comp;
>  	int order;
>  	int ret;
>  
>  	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
>  		order++) {
> -		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
> -					 card_aux_list) {
> +		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
>  			if (comp->driver->probe_order == order) {
>  				ret = soc_probe_component(card,	comp);
>  				if (ret < 0) {
> @@ -1805,7 +1803,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
>  						comp->name, ret);
>  					return ret;
>  				}
> -				list_del(&comp->card_aux_list);
>  			}
>  		}
>  	}
> @@ -1821,14 +1818,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
>  	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
>  		order++) {
>  		list_for_each_entry_safe(comp, _comp,
> -			&card->component_dev_list, card_list) {
> -
> -			if (!comp->auxiliary)
> -				continue;
> +			&card->aux_comp_list, card_aux_list) {
>  
>  			if (comp->driver->remove_order == order) {
>  				soc_remove_component(comp);
> -				comp->auxiliary = 0;
> +				/* remove it from the card's aux_comp_list */
> +				list_del(&comp->card_aux_list);
>  			}
>  		}
>  	}
> -- 
> 1.9.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
  2017-03-08  7:26   ` Kuninori Morimoto
  (?)
  (?)
@ 2017-03-22 11:30   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 10+ messages in thread
From: Sylwester Nawrocki @ 2017-03-22 11:30 UTC (permalink / raw)
  To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

On 03/08/2017 08:26 AM, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
> tried to replace aux_comp_list to component_dev_list,
> but it failed because of binding timing. Thus, Sylwester fixuped it by
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
>
> One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
> was remove replaceable list (= list_aux) from snd_soc_component by using
> new "auxiliary" flags (but it failed).
> Because of this background, current code has reborned card_aux_list
> (= same as original list_aux), and almost pointless "auxiliary" flags.
>
> Let's remove pointless "auxiliary" flags by this patch
> This means, it is same as revert both
> commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
> commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").
>
> Not-yet-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> request-Tested-by-from: Sylwester Nawrocki <s.nawrocki@samsung.com>

I tested in on top of v4.11-rc3 on the TM2 board and didn't notice any issues,
the sound card got initialized properly.

Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [alsa-devel] [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
  2017-03-22  4:24     ` Kuninori Morimoto
  (?)
@ 2017-03-22 11:34     ` Sylwester Nawrocki
  2017-03-22 23:55         ` Kuninori Morimoto
  -1 siblings, 1 reply; 10+ messages in thread
From: Sylwester Nawrocki @ 2017-03-22 11:34 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown, linux-renesas-soc, Linux-ALSA, Simon

Hi Morimoto-san,

On 03/22/2017 05:24 AM, Kuninori Morimoto wrote:
> Can you test this patch if possible ?

My apologies for the delay, I just tested the patch
and it seems all correct.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [alsa-devel] [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
  2017-03-22 11:34     ` Sylwester Nawrocki
@ 2017-03-22 23:55         ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-22 23:55 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: Mark Brown, linux-renesas-soc, Linux-ALSA, Simon


Hi Sylwester

> > Can you test this patch if possible ?
> 
> My apologies for the delay, I just tested the patch
> and it seems all correct.

Thank you !
So, I will post it as non-RFC patch and add your Tested-by

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [alsa-devel] [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component
@ 2017-03-22 23:55         ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-22 23:55 UTC (permalink / raw)
  To: Sylwester Nawrocki; +Cc: Mark Brown, linux-renesas-soc, Linux-ALSA, Simon


Hi Sylwester

> > Can you test this patch if possible ?
> 
> My apologies for the delay, I just tested the patch
> and it seems all correct.

Thank you !
So, I will post it as non-RFC patch and add your Tested-by

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Applied "ASoC: core: remove pointless auxiliary from snd_soc_component" to the asoc tree
  2017-03-08  7:26   ` Kuninori Morimoto
@ 2017-03-24 19:16     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-24 19:16 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Sylwester Nawrocki, Mark Brown, Mark Brown, Sylwester Nawrocki,
	linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: core: remove pointless auxiliary from snd_soc_component

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

>From 991454e17070eaf5286a666d9e896fd6fb332c72 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 24 Mar 2017 00:13:00 +0000
Subject: [PATCH] ASoC: core: remove pointless auxiliary from snd_soc_component

commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
tried to replace aux_comp_list to component_dev_list,
but it failed because of binding timing. Thus, Sylwester fixuped it by
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
was remove replaceable list (= list_aux) from snd_soc_component by using
new "auxiliary" flags (but it failed).
Because of this background, current code has reborned card_aux_list
(= same as original list_aux), and almost pointless "auxiliary" flags.

Let's remove pointless "auxiliary" flags by this patch
This means, it is same as revert both
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc.h  |  1 -
 sound/soc/soc-core.c | 15 +++++----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index cdfb55f7aede..ee838b0d5db8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -812,7 +812,6 @@ struct snd_soc_component {
 
 	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
 	unsigned int registered_as_component:1;
-	unsigned int auxiliary:1; /* for auxiliary component of the card */
 	unsigned int suspended:1; /* is in suspend PM state */
 
 	struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d29fbc7195a0..a6f840beacb0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1776,7 +1776,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 	}
 
 	component->init = aux_dev->init;
-	component->auxiliary = 1;
 	list_add(&component->card_aux_list, &card->aux_comp_list);
 
 	return 0;
@@ -1788,14 +1787,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 
 static int soc_probe_aux_devices(struct snd_soc_card *card)
 {
-	struct snd_soc_component *comp, *tmp;
+	struct snd_soc_component *comp;
 	int order;
 	int ret;
 
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
-		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
-					 card_aux_list) {
+		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
 			if (comp->driver->probe_order == order) {
 				ret = soc_probe_component(card,	comp);
 				if (ret < 0) {
@@ -1804,7 +1802,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
 						comp->name, ret);
 					return ret;
 				}
-				list_del(&comp->card_aux_list);
 			}
 		}
 	}
@@ -1820,14 +1817,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
 		list_for_each_entry_safe(comp, _comp,
-			&card->component_dev_list, card_list) {
-
-			if (!comp->auxiliary)
-				continue;
+			&card->aux_comp_list, card_aux_list) {
 
 			if (comp->driver->remove_order == order) {
 				soc_remove_component(comp);
-				comp->auxiliary = 0;
+				/* remove it from the card's aux_comp_list */
+				list_del(&comp->card_aux_list);
 			}
 		}
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Applied "ASoC: core: remove pointless auxiliary from snd_soc_component" to the asoc tree
@ 2017-03-24 19:16     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-24 19:16 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Sylwester Nawrocki, Mark Brown

The patch

   ASoC: core: remove pointless auxiliary from snd_soc_component

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

>From 991454e17070eaf5286a666d9e896fd6fb332c72 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 24 Mar 2017 00:13:00 +0000
Subject: [PATCH] ASoC: core: remove pointless auxiliary from snd_soc_component

commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...")
tried to replace aux_comp_list to component_dev_list,
but it failed because of binding timing. Thus, Sylwester fixuped it by
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...")
was remove replaceable list (= list_aux) from snd_soc_component by using
new "auxiliary" flags (but it failed).
Because of this background, current code has reborned card_aux_list
(= same as original list_aux), and almost pointless "auxiliary" flags.

Let's remove pointless "auxiliary" flags by this patch
This means, it is same as revert both
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and
commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary...").

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc.h  |  1 -
 sound/soc/soc-core.c | 15 +++++----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index cdfb55f7aede..ee838b0d5db8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -812,7 +812,6 @@ struct snd_soc_component {
 
 	unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
 	unsigned int registered_as_component:1;
-	unsigned int auxiliary:1; /* for auxiliary component of the card */
 	unsigned int suspended:1; /* is in suspend PM state */
 
 	struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d29fbc7195a0..a6f840beacb0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1776,7 +1776,6 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 	}
 
 	component->init = aux_dev->init;
-	component->auxiliary = 1;
 	list_add(&component->card_aux_list, &card->aux_comp_list);
 
 	return 0;
@@ -1788,14 +1787,13 @@ static int soc_bind_aux_dev(struct snd_soc_card *card, int num)
 
 static int soc_probe_aux_devices(struct snd_soc_card *card)
 {
-	struct snd_soc_component *comp, *tmp;
+	struct snd_soc_component *comp;
 	int order;
 	int ret;
 
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
-		list_for_each_entry_safe(comp, tmp, &card->aux_comp_list,
-					 card_aux_list) {
+		list_for_each_entry(comp, &card->aux_comp_list, card_aux_list) {
 			if (comp->driver->probe_order == order) {
 				ret = soc_probe_component(card,	comp);
 				if (ret < 0) {
@@ -1804,7 +1802,6 @@ static int soc_probe_aux_devices(struct snd_soc_card *card)
 						comp->name, ret);
 					return ret;
 				}
-				list_del(&comp->card_aux_list);
 			}
 		}
 	}
@@ -1820,14 +1817,12 @@ static void soc_remove_aux_devices(struct snd_soc_card *card)
 	for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
 		order++) {
 		list_for_each_entry_safe(comp, _comp,
-			&card->component_dev_list, card_list) {
-
-			if (!comp->auxiliary)
-				continue;
+			&card->aux_comp_list, card_aux_list) {
 
 			if (comp->driver->remove_order == order) {
 				soc_remove_component(comp);
-				comp->auxiliary = 0;
+				/* remove it from the card's aux_comp_list */
+				list_del(&comp->card_aux_list);
 			}
 		}
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-24 19:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170308072638epcas1p4b3a0c943539f55ec83eb66a3b0fec621@epcas1p4.samsung.com>
2017-03-08  7:26 ` [PATCH][RFC] ASoC: core: remove pointless auxiliary from snd_soc_component Kuninori Morimoto
2017-03-08  7:26   ` Kuninori Morimoto
2017-03-22  4:24   ` [alsa-devel] " Kuninori Morimoto
2017-03-22  4:24     ` Kuninori Morimoto
2017-03-22 11:34     ` Sylwester Nawrocki
2017-03-22 23:55       ` Kuninori Morimoto
2017-03-22 23:55         ` Kuninori Morimoto
2017-03-22 11:30   ` Sylwester Nawrocki
2017-03-24 19:16   ` Applied "ASoC: core: remove pointless auxiliary from snd_soc_component" to the asoc tree Mark Brown
2017-03-24 19:16     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.