aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBen Zhang <benzh@chromium.org>2015-07-21 14:46:26 -0700
committerMark Brown <broonie@kernel.org>2015-07-22 10:54:22 +0100
commita6c2a32ac83567f15e9af3dcbc73148ce68b2ced (patch)
treea2aad6959b4f28fd1be66e624e7aa0b61a3974ab /sound
parentLinux 4.2-rc2 (diff)
downloadlinux-dev-a6c2a32ac83567f15e9af3dcbc73148ce68b2ced.tar.xz
linux-dev-a6c2a32ac83567f15e9af3dcbc73148ce68b2ced.zip
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
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ssm4567.c8
1 files changed, 7 insertions, 1 deletions
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)