* [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
@ 2015-07-21 21:46 Ben Zhang
2015-07-21 21:49 ` Lars-Peter Clausen
2015-07-22 9:57 ` Applied "ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt" to the asoc tree Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Ben Zhang @ 2015-07-21 21:46 UTC (permalink / raw)
To: Mark Brown
Cc: Harsha Priya, Ben Zhang, alsa-devel, Lars-Peter Clausen,
Anatol Pomozov
The regmap_write in ssm4567_set_dai_fmt accidentally clears the
TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.
This patch fixes it by using regmap_update_bits with proper mask.
Signed-off-by: Ben Zhang <benzh@chromium.org>
---
sound/soc/codecs/ssm4567.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
index 4662587..a757ab8 100644
--- a/sound/soc/codecs/ssm4567.c
+++ b/sound/soc/codecs/ssm4567.c
@@ -315,7 +315,13 @@ static int ssm4567_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
if (invert_fclk)
ctrl1 |= SSM4567_SAI_CTRL_1_FSYNC;
- return regmap_write(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, ctrl1);
+ return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1,
+ SSM4567_SAI_CTRL_1_BCLK |
+ SSM4567_SAI_CTRL_1_FSYNC |
+ SSM4567_SAI_CTRL_1_LJ |
+ SSM4567_SAI_CTRL_1_TDM |
+ SSM4567_SAI_CTRL_1_PDM,
+ ctrl1);
}
static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)
--
2.4.3.573.g4eafbef
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
2015-07-21 21:46 [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt Ben Zhang
@ 2015-07-21 21:49 ` Lars-Peter Clausen
2015-07-21 22:02 ` Anatol Pomozov
2015-07-22 9:57 ` Applied "ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt" to the asoc tree Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-07-21 21:49 UTC (permalink / raw)
To: Ben Zhang, Mark Brown; +Cc: Harsha Priya, alsa-devel, Anatol Pomozov
On 07/21/2015 11:46 PM, Ben Zhang wrote:
> The regmap_write in ssm4567_set_dai_fmt accidentally clears the
> TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.
>
> This patch fixes it by using regmap_update_bits with proper mask.
>
> Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks.
> ---
> sound/soc/codecs/ssm4567.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
> index 4662587..a757ab8 100644
> --- a/sound/soc/codecs/ssm4567.c
> +++ b/sound/soc/codecs/ssm4567.c
> @@ -315,7 +315,13 @@ static int ssm4567_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
> if (invert_fclk)
> ctrl1 |= SSM4567_SAI_CTRL_1_FSYNC;
>
> - return regmap_write(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, ctrl1);
> + return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1,
> + SSM4567_SAI_CTRL_1_BCLK |
> + SSM4567_SAI_CTRL_1_FSYNC |
> + SSM4567_SAI_CTRL_1_LJ |
> + SSM4567_SAI_CTRL_1_TDM |
> + SSM4567_SAI_CTRL_1_PDM,
> + ctrl1);
> }
>
> static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
2015-07-21 21:49 ` Lars-Peter Clausen
@ 2015-07-21 22:02 ` Anatol Pomozov
0 siblings, 0 replies; 4+ messages in thread
From: Anatol Pomozov @ 2015-07-21 22:02 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Harsha Priya, Ben Zhang, alsa-devel@alsa-project.org, Mark Brown,
Anatol Pomozov
Hi
On Tue, Jul 21, 2015 at 2:49 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 07/21/2015 11:46 PM, Ben Zhang wrote:
>>
>> The regmap_write in ssm4567_set_dai_fmt accidentally clears the
>> TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.
>>
>> This patch fixes it by using regmap_update_bits with proper mask.
>>
>> Signed-off-by: Ben Zhang <benzh@chromium.org>
>
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
>
> Thanks.
>
>> ---
>> sound/soc/codecs/ssm4567.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
>> index 4662587..a757ab8 100644
>> --- a/sound/soc/codecs/ssm4567.c
>> +++ b/sound/soc/codecs/ssm4567.c
>> @@ -315,7 +315,13 @@ static int ssm4567_set_dai_fmt(struct snd_soc_dai
>> *dai, unsigned int fmt)
>> if (invert_fclk)
>> ctrl1 |= SSM4567_SAI_CTRL_1_FSYNC;
>>
>> - return regmap_write(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1,
>> ctrl1);
>> + return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1,
>> + SSM4567_SAI_CTRL_1_BCLK |
>> + SSM4567_SAI_CTRL_1_FSYNC |
>> + SSM4567_SAI_CTRL_1_LJ |
>> + SSM4567_SAI_CTRL_1_TDM |
>> + SSM4567_SAI_CTRL_1_PDM,
>> + ctrl1);
>> }
>>
>> static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)
>>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Applied "ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt" to the asoc tree
2015-07-21 21:46 [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt Ben Zhang
2015-07-21 21:49 ` Lars-Peter Clausen
@ 2015-07-22 9:57 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-07-22 9:57 UTC (permalink / raw)
To: Ben Zhang, Lars-Peter Clausen, Anatol Pomozov, Mark Brown, stable
Cc: alsa-devel
The patch
ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
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 a6c2a32ac83567f15e9af3dcbc73148ce68b2ced Mon Sep 17 00:00:00 2001
From: Ben Zhang <benzh@chromium.org>
Date: Tue, 21 Jul 2015 14:46:26 -0700
Subject: [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
The regmap_write in ssm4567_set_dai_fmt accidentally clears the
TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.
This patch fixes it by using regmap_update_bits with proper mask.
Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
---
sound/soc/codecs/ssm4567.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
index 938d2cb6d78b..84a4f5ad8064 100644
--- a/sound/soc/codecs/ssm4567.c
+++ b/sound/soc/codecs/ssm4567.c
@@ -315,7 +315,13 @@ static int ssm4567_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
if (invert_fclk)
ctrl1 |= SSM4567_SAI_CTRL_1_FSYNC;
- return regmap_write(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, ctrl1);
+ return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1,
+ SSM4567_SAI_CTRL_1_BCLK |
+ SSM4567_SAI_CTRL_1_FSYNC |
+ SSM4567_SAI_CTRL_1_LJ |
+ SSM4567_SAI_CTRL_1_TDM |
+ SSM4567_SAI_CTRL_1_PDM,
+ ctrl1);
}
static int ssm4567_set_power(struct ssm4567 *ssm4567, bool enable)
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-22 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 21:46 [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt Ben Zhang
2015-07-21 21:49 ` Lars-Peter Clausen
2015-07-21 22:02 ` Anatol Pomozov
2015-07-22 9:57 ` Applied "ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt" 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.