All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails
@ 2015-06-29  3:15 Axel Lin
  2015-06-29  5:19 ` Haojian Zhuang
  2015-07-07 13:57 ` Applied "ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-06-29  3:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Haojian Zhuang, Liam Girdwood

88pm860x does not support slave mode, so it returns -EINVAL for
PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before
return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt.

This patch adds comment for the reason to return -EINVAL for
PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if
pm860x_set_dai_sysclk fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/88pm860x-codec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index 38b3dad..4d91a6a 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1028,10 +1028,8 @@ static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
 
 	if (dir == PM860X_CLK_DIR_OUT)
 		pm860x->dir = PM860X_CLK_DIR_OUT;
-	else {
-		pm860x->dir = PM860X_CLK_DIR_IN;
+	else	/* Slave mode is not supported */
 		return -EINVAL;
-	}
 
 	return 0;
 }
-- 
2.1.0

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

* Re: [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails
  2015-06-29  3:15 [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails Axel Lin
@ 2015-06-29  5:19 ` Haojian Zhuang
  2015-07-07 13:57 ` Applied "ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Haojian Zhuang @ 2015-06-29  5:19 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Liam Girdwood

On Mon, 2015-06-29 at 11:15 +0800, Axel Lin wrote:
> 88pm860x does not support slave mode, so it returns -EINVAL for
> PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before
> return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt.
> 
> This patch adds comment for the reason to return -EINVAL for
> PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if
> pm860x_set_dai_sysclk fails.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  sound/soc/codecs/88pm860x-codec.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
> index 38b3dad..4d91a6a 100644
> --- a/sound/soc/codecs/88pm860x-codec.c
> +++ b/sound/soc/codecs/88pm860x-codec.c
> @@ -1028,10 +1028,8 @@ static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
>  
>  	if (dir == PM860X_CLK_DIR_OUT)
>  		pm860x->dir = PM860X_CLK_DIR_OUT;
> -	else {
> -		pm860x->dir = PM860X_CLK_DIR_IN;
> +	else	/* Slave mode is not supported */
>  		return -EINVAL;
> -	}
>  
>  	return 0;
>  }

Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>

Regards
Haojian

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

* Applied "ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails" to the asoc tree
  2015-06-29  3:15 [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails Axel Lin
  2015-06-29  5:19 ` Haojian Zhuang
@ 2015-07-07 13:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-07-07 13:57 UTC (permalink / raw)
  To: Axel Lin, Haojian Zhuang, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails

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 93ec3a1ad5b86aef8ca90d2b149ded0f6bb689f5 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Mon, 29 Jun 2015 11:15:23 +0800
Subject: [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if
 pm860x_set_dai_sysclk fails

88pm860x does not support slave mode, so it returns -EINVAL for
PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before
return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt.

This patch adds comment for the reason to return -EINVAL for
PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if
pm860x_set_dai_sysclk fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/88pm860x-codec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index 38b3dad..4d91a6a 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1028,10 +1028,8 @@ static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
 
 	if (dir == PM860X_CLK_DIR_OUT)
 		pm860x->dir = PM860X_CLK_DIR_OUT;
-	else {
-		pm860x->dir = PM860X_CLK_DIR_IN;
+	else	/* Slave mode is not supported */
 		return -EINVAL;
-	}
 
 	return 0;
 }
-- 
2.1.4

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

end of thread, other threads:[~2015-07-07 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29  3:15 [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails Axel Lin
2015-06-29  5:19 ` Haojian Zhuang
2015-07-07 13:57 ` Applied "ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails" to the asoc tree 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.