From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: alsa-devel@alsa-project.org, Barry Song <21cnbao@gmail.com>,
linux-kernel@vger.kernel.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH 2/2] ASoC: ad193x: Use snd_soc_update_bits for read-modify-write
Date: Fri, 14 Oct 2011 20:10:01 +0100 [thread overview]
Message-ID: <20111014191000.GB2931@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1318582987.19976.2.camel@phoenix>
On Fri, Oct 14, 2011 at 05:03:07PM +0800, Axel Lin wrote:
> reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
> - reg = (mute > 0) ? reg | AD193X_DAC_MASTER_MUTE : reg &
> - (~AD193X_DAC_MASTER_MUTE);
> + if (mute)
> + reg |= AD193X_DAC_MASTER_MUTE;
> + else
> + reg &= ~AD193X_DAC_MASTER_MUTE;
> snd_soc_write(codec, AD193X_DAC_CTRL2, reg);
This is still using snd_soc_read() and snd_soc_write() (though it is a
cleanup).
next prev parent reply other threads:[~2011-10-14 19:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 9:01 [PATCH 1/2] ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK Axel Lin
2011-10-14 9:03 ` [PATCH 2/2] ASoC: ad193x: Use snd_soc_update_bits for read-modify-write Axel Lin
2011-10-14 19:10 ` Mark Brown [this message]
2011-10-15 3:21 ` Axel Lin
2011-10-17 21:37 ` Mark Brown
2011-10-18 3:23 ` Barry Song
2011-10-14 19:38 ` [PATCH 1/2] ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK Mark Brown
2011-10-14 19:48 ` Lars-Peter Clausen
2011-10-14 20:07 ` Mark Brown
2011-10-14 20:09 ` Lars-Peter Clausen
2011-10-14 20:17 ` 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=20111014191000.GB2931@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=21cnbao@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).