On Fri, May 13, 2011 at 2:13 AM, Seungwhan Youn claude.youn@gmail.com wrote:
Hi Mr. Jin Park,
On Thu, May 12, 2011 at 2:58 PM, jinyoungp@nvidia.com wrote:
From: Jin Park jinyoungp@nvidia.com
Added digital mute function in DAI1 and DAI2.
Signed-off-by: Jin Park jinyoungp@nvidia.com
sound/soc/codecs/max98088.c | 32 ++++++++++++++++++++++++++++++++ sound/soc/codecs/max98088.h | 13 +++++++++++++ 2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index c520093..b5ccf37 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1582,6 +1582,36 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai, return 0; }
+static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute) +{
- struct snd_soc_codec *codec = codec_dai->codec;
- int reg;
- if (mute)
- reg = M98088_DAI_MUTE;
- else
- reg = 0;
In this case, ~M98088_DAI_MUTE is more nice then "0" to me.
No need. The snd_soc_update_bits takes care of masking. Better still, one could simply init reg to 0 and discard the else clause.