alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jassi Brar <jassisinghbrar@gmail.com>
To: Seungwhan Youn <claude.youn@gmail.com>
Cc: Peter.Hsiang@maxim-ic.com, alsa-devel@alsa-project.org,
	broonie@opensource.wolfsonmicro.com, jinyoungp@nvidia.com,
	lrg@slimlogic.co.uk
Subject: Re: [PATCH 3/3] ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2
Date: Fri, 13 May 2011 12:36:21 +0530	[thread overview]
Message-ID: <BANLkTikpAL_aPU=p=3ftEiEKi2+V4QLM5w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTim7ZQ+Uq8M1p7EX=ma80wCO8MsPdQ@mail.gmail.com>

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.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2011-05-13  7:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12  5:58 [PATCH 0/3] ASoC: codecs: max98088: bug fixes and changes jinyoungp
2011-05-12  5:58 ` [PATCH 1/3] ASoC: codecs: max98088: Fixed invalid register definitions in mixer controls jinyoungp
2011-05-12  5:58 ` [PATCH 2/3] ASoC: codecs: max98088: Moved the EX Limiter Mode from dapm widget to control jinyoungp
2011-05-12  5:58 ` [PATCH 3/3] ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2 jinyoungp
2011-05-12 20:43   ` Seungwhan Youn
2011-05-13  6:53     ` Jinyoung Park
2011-05-13  7:06     ` Jassi Brar [this message]
2011-05-13  7:11   ` Jassi Brar
2011-05-13  8:25     ` Jinyoung Park
2011-05-13  8:37       ` Jassi Brar
2011-05-18  0:28       ` Peter Hsiang
2011-05-12  8:42 ` [PATCH 0/3] ASoC: codecs: max98088: bug fixes and changes Liam Girdwood
2011-05-16  4:33 ` 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='BANLkTikpAL_aPU=p=3ftEiEKi2+V4QLM5w@mail.gmail.com' \
    --to=jassisinghbrar@gmail.com \
    --cc=Peter.Hsiang@maxim-ic.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=claude.youn@gmail.com \
    --cc=jinyoungp@nvidia.com \
    --cc=lrg@slimlogic.co.uk \
    /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).