Skip to content

Commit

Permalink
ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ben Zhang authored and Mark Brown committed Jul 22, 2015
1 parent bc0195a commit a6c2a32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/soc/codecs/ssm4567.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6c2a32

Please sign in to comment.