From: Daniel Mack <daniel@caiaq.de>
To: pHilipp Zabel <philipp.zabel@gmail.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@sirena.org.uk>
Subject: Re: snd-soc-pxa-ssp I2C/FIFO issues
Date: Wed, 11 Mar 2009 19:21:49 +0100 [thread overview]
Message-ID: <20090311182149.GD29871@buzzloop.caiaq.de> (raw)
In-Reply-To: <74d0deb30903111110h4e441959yec421225a4b90cc9@mail.gmail.com>
On Wed, Mar 11, 2009 at 07:10:28PM +0100, pHilipp Zabel wrote:
> > Philipp, could you test that again on your board, please?
> > Applies on top of the other one ("pxa-ssp: don't touch ssp registers
> > ...") I just posted.
>
> Tested-by me. Of course this still doesn't help me to enable 16-bit
> DMA transfers for stereo, but it doesn't hurt either.
Ok, but good to know this does not break your config.
> > struct ssp_priv {
> > struct ssp_dev dev;
> > unsigned int sysclk;
> > + unsigned int scr_div;
>
> Really needed? Or could we just check SSCR0 below?
Well, SSCR0_SerClkDiv() is defined as follows:
#define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */
#define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
I thought about adding a reverse macro just for that case, but that
seemed a lot more intrusive.
> > switch (priv->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
> > case SND_SOC_DAIFMT_I2S:
> > - /* Cleared when the DAI format is set */
> > - sspsp = ssp_read_reg(ssp, SSPSP) | SSPSP_SFRMWDTH(width);
> > + sspsp = ssp_read_reg(ssp, SSPSP);
> > +
> > + if ((priv->scr_div == 4) && (width == 16)) {
>
> sscr0 & SSCR0_SCR == SSCR0_SerClkDiv(4) instead?
Yes, could do that, but I doubt it is more readable? But we would save
one entry in the priv struct, so I'll do it.
> > - /* We always use a network mode so we always require TDM slots
> > - * - complain loudly and fail if they've not been set up yet.
> > - */
> > - if (!(ssp_read_reg(ssp, SSTSA) & 0xf)) {
> > - dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n");
> > - return -EINVAL;
> > - }
> > -
>
> I wonder if this check was useful in some case? If so, we could
> replace it with something like this:
Yep, we didn't kill the network mode entirely, you're right. Will fix
this in a follow-up.
Thanks,
Daniel
next prev parent reply other threads:[~2009-03-11 18:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 14:47 snd-soc-pxa-ssp I2C/FIFO issues pHilipp Zabel
2009-03-09 15:03 ` Liam Girdwood
2009-03-09 15:14 ` Mark Brown
2009-03-09 16:01 ` pHilipp Zabel
2009-03-09 16:16 ` Daniel Mack
2009-03-09 15:36 ` Daniel Mack
2009-03-09 16:00 ` pHilipp Zabel
2009-03-09 17:44 ` Mark Brown
2009-03-10 15:47 ` Daniel Mack
2009-03-11 18:10 ` pHilipp Zabel
2009-03-11 18:21 ` Daniel Mack [this message]
2009-03-11 18:42 ` Daniel Mack
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=20090311182149.GD29871@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@sirena.org.uk \
--cc=philipp.zabel@gmail.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.