All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
@ 2011-01-11 11:43 Dimitris Papastamos
  2011-01-11 11:47 ` Liam Girdwood
  2011-01-11 18:32 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Dimitris Papastamos @ 2011-01-11 11:43 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, patches

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2ff708a..52aaef9 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1748,6 +1748,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
 	list_for_each_entry(codec, &codec_list, list) {
 		if (codec->cache_init)
 			continue;
+		/* by default we don't override the compress_type */
+		compress_type = 0;
 		/* check to see if we need to override the compress_type */
 		for (i = 0; i < card->num_configs; ++i) {
 			codec_conf = &card->codec_conf[i];
@@ -1758,18 +1760,6 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
 					break;
 			}
 		}
-		if (i == card->num_configs) {
-			/* no need to override the compress_type so
-			 * go ahead and do the standard thing */
-			ret = snd_soc_init_codec_cache(codec, 0);
-			if (ret < 0) {
-				mutex_unlock(&card->mutex);
-				return;
-			}
-			continue;
-		}
-		/* override the compress_type with the one supplied in
-		 * the machine driver */
 		ret = snd_soc_init_codec_cache(codec, compress_type);
 		if (ret < 0) {
 			mutex_unlock(&card->mutex);
-- 
1.7.3.5

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

* Re: [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
  2011-01-11 11:43 [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality Dimitris Papastamos
@ 2011-01-11 11:47 ` Liam Girdwood
  2011-01-11 18:32 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2011-01-11 11:47 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, Mark Brown, patches

On Tue, 2011-01-11 at 11:43 +0000, Dimitris Papastamos wrote:
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-core.c |   14 ++------------
>  1 files changed, 2 insertions(+), 12 deletions(-)
> 

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

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

* Re: [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
  2011-01-11 11:43 [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality Dimitris Papastamos
  2011-01-11 11:47 ` Liam Girdwood
@ 2011-01-11 18:32 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-01-11 18:32 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, patches, Liam Girdwood

On Tue, Jan 11, 2011 at 11:43:51AM +0000, Dimitris Papastamos wrote:
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>

Applied, thanks.

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

* [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
@ 2011-01-11 11:36 Dimitris Papastamos
  2011-01-11 11:35 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Dimitris Papastamos @ 2011-01-11 11:36 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, patches

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2ff708a..13c4092 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1761,15 +1761,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
 		if (i == card->num_configs) {
 			/* no need to override the compress_type so
 			 * go ahead and do the standard thing */
-			ret = snd_soc_init_codec_cache(codec, 0);
-			if (ret < 0) {
-				mutex_unlock(&card->mutex);
-				return;
-			}
-			continue;
+			compress_type = 0;
 		}
-		/* override the compress_type with the one supplied in
-		 * the machine driver */
 		ret = snd_soc_init_codec_cache(codec, compress_type);
 		if (ret < 0) {
 			mutex_unlock(&card->mutex);
-- 
1.7.3.5

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

* Re: [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
  2011-01-11 11:36 Dimitris Papastamos
@ 2011-01-11 11:35 ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-01-11 11:35 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, patches, Liam Girdwood

On Tue, Jan 11, 2011 at 11:36:13AM +0000, Dimitris Papastamos wrote:

>  		if (i == card->num_configs) {
>  			/* no need to override the compress_type so
>  			 * go ahead and do the standard thing */
> -			ret = snd_soc_init_codec_cache(codec, 0);
> -			if (ret < 0) {
> -				mutex_unlock(&card->mutex);
> -				return;
> -			}
> -			continue;
> +			compress_type = 0;
>  		}

Even simpler would be to init compress_type to zero and remove the
check.

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

end of thread, other threads:[~2011-01-11 18:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 11:43 [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality Dimitris Papastamos
2011-01-11 11:47 ` Liam Girdwood
2011-01-11 18:32 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-01-11 11:36 Dimitris Papastamos
2011-01-11 11:35 ` 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.