All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Ben Zhang <benzh@chromium.org>, Mark Brown <broonie@kernel.org>
Cc: Harsha Priya <harshapriya.n@intel.com>,
	alsa-devel@alsa-project.org, Anatol Pomozov <anatol@google.com>
Subject: Re: [PATCH] ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
Date: Tue, 21 Jul 2015 23:49:51 +0200	[thread overview]
Message-ID: <55AEBE7F.4010102@metafoo.de> (raw)
In-Reply-To: <1437515186-1961-1-git-send-email-benzh@chromium.org>

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)
>

  reply	other threads:[~2015-07-21 21:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AEBE7F.4010102@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=anatol@google.com \
    --cc=benzh@chromium.org \
    --cc=broonie@kernel.org \
    --cc=harshapriya.n@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.