From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Austin, Brian" <Brian.Austin@cirrus.com>
Cc: "<alsa-devel@alsa-project.org>" <alsa-devel@alsa-project.org>,
"<joe@nucleusys.com>" <joe@nucleusys.com>,
"<vinod.koul@linux.intel.com>" <vinod.koul@linux.intel.com>,
"<ramesh.babu@intel.com>" <ramesh.babu@intel.com>,
"<lrg@ti.com>" <lrg@ti.com>
Subject: Re: [PATCH v2] ASoC: Add support for cs42l73 codec
Date: Wed, 5 Oct 2011 11:40:53 +0100 [thread overview]
Message-ID: <20111005104053.GD9783@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <555001A4-0B4D-48A9-B7B6-D8DF9E5F72E6@cirrus.com>
On Tue, Oct 04, 2011 at 07:17:16PM +0000, Austin, Brian wrote:
> if (spc & xSPDIF_PCM) {
> spc &= (31 << 3); /* Clear PCM mode, set MSB->LSB */
> switch(format){
> case SND_SOC_DAIFMT_DSP_B:
> if (inv == SND_SOC_DAIFMT_IB_IF)
> spc |= (xPCM_MODE0 << 4);
>
> if (inv == SND_SOC_DAIFMT_IB_NF)
> spc |= (xPCM_MODE1 << 4);
> break;
> case SND_SOC_DAIFMT_DSP_A:
> if (inv == SND_SOC_DAIFMT_IB_IF)
> spc |= (xPCM_MODE1 << 4);
> break;
> default:
> return -EINVAL;
> }
> }
This looks a lot better modulo the coding style issue (switch is not a
function). Using snd_soc_update_bits() would be even better.
next prev parent reply other threads:[~2011-10-05 10:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 16:41 [PATCH v2] ASoC: Add support for cs42l73 codec Brian Austin
2011-09-30 17:34 ` Vinod Koul
2011-09-30 18:32 ` Austin, Brian
2011-10-01 17:22 ` Vinod Koul
2011-09-30 18:50 ` Lars-Peter Clausen
2011-09-30 19:19 ` Austin, Brian
2011-10-01 5:04 ` Babu, Ramesh
2011-10-05 21:55 ` Austin, Brian
2011-10-02 18:40 ` Mark Brown
2011-10-04 17:53 ` Austin, Brian
2011-10-04 19:17 ` Austin, Brian
2011-10-05 10:40 ` Mark Brown [this message]
2011-10-04 21:38 ` 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=20111005104053.GD9783@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=Brian.Austin@cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=joe@nucleusys.com \
--cc=lrg@ti.com \
--cc=ramesh.babu@intel.com \
--cc=vinod.koul@linux.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 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).