All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Timur Tabi <timur@freescale.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] cs4270: add support for slave mode	configurations
Date: Sat, 28 Feb 2009 13:13:43 +0100	[thread overview]
Message-ID: <20090228121343.GA18336@buzzloop.caiaq.de> (raw)
In-Reply-To: <ed82fe3e0902271351nc170b16v71b81754f8aeadd3@mail.gmail.com>

On Fri, Feb 27, 2009 at 03:51:58PM -0600, Timur Tabi wrote:
> > +       /* set master/slave audio interface */
> > +       switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
> > +       case SND_SOC_DAIFMT_CBS_CFS:
> > +               cs4270->slave_mode = 1;
> > +               break;
> > +       case SND_SOC_DAIFMT_CBM_CFM:
> > +               cs4270->slave_mode = 0;
> > +               break;
> > +       case SND_SOC_DAIFMT_CBM_CFS:
> > +               /* unsupported - cs4270 can eigther be slave or master to
> 
> Typo.  However, I suggest you get rid of the "case
> SND_SOC_DAIFMT_CBM_CFS" and in the "default:", just have this:
> 
> > +       default:
>                    /* all other modes are unsupported by the hardware */
> > +               ret = -EINVAL;
> > +       }
> > +

Ok, I'll post a patch for this.

> >        reg = snd_soc_read(codec, CS4270_MODE);
> >        reg &= ~(CS4270_MODE_SPEED_MASK | CS4270_MODE_DIV_MASK);
> > -       reg |= cs4270_mode_ratios[i].speed_mode | cs4270_mode_ratios[i].mclk;
> > +       reg |= cs4270_mode_ratios[i].mclk;
> > +
> > +       if (cs4270->slave_mode)
> > +               reg |= CS4270_MODE_SLAVE;
> > +       else
> > +               reg |= cs4270_mode_ratios[i].speed_mode;
> 
> Are you sure that the mclk bits are still correct in slave mode?  I'm
> looking at table 5 in the CS4270 manual, and it lists settings for
> 1x,2x,4x speed even though the register is set to slave mode instead.

Hmm - mclk bits are set with 'reg |= cs4270_mode_ratios[i].mclk;'
unconditionally, and both speed flags are used when in slave mode. Don't
see where you suspect a flaw here?

Daniel

  reply	other threads:[~2009-02-28 12:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 13:37 [PATCH] cs4270: add support for slave mode configurations Daniel Mack
2009-02-25 15:34 ` Mark Brown
2009-02-25 15:45   ` Daniel Mack
2009-02-25 15:48     ` Mark Brown
2009-02-27 21:51 ` Timur Tabi
2009-02-28 12:13   ` Daniel Mack [this message]
2009-02-28 16:32     ` Timur Tabi
2009-02-28 17:47       ` Daniel Mack
2009-03-01  1:09         ` Timur Tabi
2009-02-28 12:21   ` [PATCH] fix typo and removed unneeded switch case Daniel Mack
2009-03-01  1:11     ` Timur Tabi
2009-03-02 14: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=20090228121343.GA18336@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=timur@freescale.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.