All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-alsa@fluff.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/3] ASoC Samsung S3C24xx I2S support.
Date: Tue, 6 Feb 2007 09:18:03 +0000	[thread overview]
Message-ID: <20070206091802.GA14036@trinity.fluff.org> (raw)
In-Reply-To: <s5h7iv0ju2p.wl%tiwai@suse.de>

On Fri, Feb 02, 2007 at 07:25:02PM +0100, Takashi Iwai wrote:
> At Fri, 02 Feb 2007 18:03:19 +0000,
> Liam Girdwood wrote:
> > 
> > diff -r 0f9c7c3b7657 soc/s3c24xx/s3c24xx-i2s.c
> > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> > +++ b/soc/s3c24xx/s3c24xx-i2s.c	Wed Jan 31 16:43:17 2007 +0000
> (snip)
> > +static void s3c24xx_snd_txctrl(int on)
> > +{
> > +	unsigned long iisfcon;
> > +	unsigned long iiscon;
> > +	unsigned long iismod;
> 
> Should be u32.  unsigned long could be 64bit.
> 
> > +static void s3c24xx_snd_rxctrl(int on)
> > +{
> > +	unsigned long iisfcon;
> > +	unsigned long iiscon;
> > +	unsigned long iismod;
> 
> Ditto.
> > +static int s3c24xx_snd_lrsync()
> > +{
> > +	unsigned long iiscon;
> 
> Ditto.
> 
> > +	int timeout = 10000;
> > +
> > +	DBG("Entered %s\n", __FUNCTION__);
> > +
> > +	while (1) {
> > +		iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
> > +		if (iiscon & S3C2410_IISCON_LRINDEX)
> > +			break;
> > +
> > +		if (--timeout < 0)
> > +			return -ETIMEDOUT;
> > +	}
> 
> How tolerant should it be?  This style of busy loop depends on the
> machine speed and isn't reliable.

The most this should wait is 1 sample period, as it is to synchronise
the left/right word clock to the system (otherwise you get randon channel
flips when the s3c24xx is the iis slave)... it may be worth using jiffies
for the timeout. 

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

      parent reply	other threads:[~2007-02-06  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 18:03 [PATCH 1/3] ASoC Samsung S3C24xx I2S support Liam Girdwood
2007-02-02 18:25 ` Takashi Iwai
2007-02-05 17:31   ` Liam Girdwood
2007-02-06  9:18   ` Ben Dooks [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=20070206091802.GA14036@trinity.fluff.org \
    --to=ben-alsa@fluff.org \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=tiwai@suse.de \
    /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.