From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Graeme Gregory <gg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC - Add support for upto 16 channels on OMAP MCBSP
Date: Thu, 05 Nov 2009 10:05:20 +0000 [thread overview]
Message-ID: <1257415520.3603.161.camel@odin> (raw)
In-Reply-To: <200911051026.39538.peter.ujfalusi@nokia.com>
On Thu, 2009-11-05 at 10:26 +0200, Peter Ujfalusi wrote:
> On Wednesday 04 November 2009 19:53:55 ext Liam Girdwood wrote:
> > From: Graeme Gregory <gg@slimlogic.co.uk>
> >
> > This patch increases the number of supported audio channels from 4
> > to 16 and was sponsored by Shotspotter inc.
> >
> > Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
> > Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
> > ---
> > sound/soc/omap/omap-mcbsp.c | 71
> > +++++++++++++++++++++++++++++------------- 1 files changed, 49
> > insertions(+), 22 deletions(-)
> >
snip
>
> I would have done this a bit differently:
>
> ...
> /* Check if the number of channels are valid */
> if (channels < 1 || channels > 16) {
> /* Unsupported number of channels */
> /* Probably would be good to have some error message about it? */
> return -EINVAL;
> }
>
Not really required as soc-core takes care of this for us :)
> format = mcbsp_data->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
> wpf = channels = params_channels(params);
>
> if (channels == 2 && format == SND_SOC_DAIFMT_I2S) {
> /* Use dual-phase frames */
> regs->rcr2 |= RPHASE;
> regs->xcr2 |= XPHASE;
> /* Set 1 word per (McBSP) frame for phase1 and phase2 */
> wpf--;
> regs->rcr2 |= RFRLEN2(wpf - 1);
> regs->xcr2 |= XFRLEN2(wpf - 1);
> }
> /* Set word per (McBSP) frame for phase1 */
> regs->rcr1 |= RFRLEN1(wpf - 1);
> regs->xcr1 |= XFRLEN1(wpf - 1);
>
I prefer this too.
Liam
prev parent reply other threads:[~2009-11-05 10:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 17:53 [PATCH] ASoC - Add support for upto 16 channels on OMAP MCBSP Liam Girdwood
2009-11-04 18:28 ` Mark Brown
2009-11-04 18:55 ` Graeme Gregory
2009-11-04 19:46 ` Liam Girdwood
2009-11-05 7:51 ` Jarkko Nikula
2009-11-05 14:55 ` Liam Girdwood
2009-11-05 19:28 ` Jarkko Nikula
2009-11-05 20:08 ` Liam Girdwood
2009-11-06 13:20 ` Mark Brown
2009-11-06 14:25 ` Liam Girdwood
2009-11-06 15:00 ` Mark Brown
2009-11-05 8:14 ` Peter Ujfalusi
2009-11-05 8:26 ` Peter Ujfalusi
2009-11-05 10:05 ` Liam Girdwood [this message]
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=1257415520.3603.161.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=peter.ujfalusi@nokia.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.