From: Johannes Berg <johannes@sipsolutions.net>
To: Paul Mackerras <paulus@samba.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, benjamin@sipsolutions.net
Subject: Re: [RFC/PATCH] Stop Apple i2s DMA gracefully
Date: Thu, 02 Nov 2006 09:29:28 +0100 [thread overview]
Message-ID: <1162456168.3241.2.camel@ux156> (raw)
In-Reply-To: <17732.11228.441627.300383@cargo.ozlabs.ibm.com>
On Sun, 2006-10-29 at 15:19 +1100, Paul Mackerras wrote:
> case SNDRV_PCM_TRIGGER_STOP:
> case SNDRV_PCM_TRIGGER_SUSPEND:
> if (!pi->dbdma_ring.running) {
> result = -EALREADY;
> goto out_unlock;
> }
> + pi->dbdma_ring.running = 0;
>
> - /* turn off all relevant bits */
> - out_le32(&pi->dbdma->control,
> - (RUN | WAKE | FLUSH | PAUSE) << 16);
> - {
> - /* FIXME: move to own function */
> - int timeout = 5000;
> - while ((in_le32(&pi->dbdma->status) & RUN)
> - && --timeout > 0)
> - udelay(1);
> - if (!timeout)
> - printk(KERN_ERR
> - "i2sbus: timed out turning "
> - "off dbdma engine!\n");
> - }
> + /* Set the S0 bit to make the DMA branch to the stop cmd */
> + out_le32(&pi->dbdma->control, (1 << 16) | 1);
> + pi->dbdma_ring.stopping = 1;
Something that just crossed my mind because Ben was complaining about
suspend/resume breakage... In the suspend case we actually have to make
sure to have DMA stopped, no?
johannes
-------------------------------------------------------------------------
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
next prev parent reply other threads:[~2006-11-02 8:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-29 4:19 [RFC/PATCH] Stop Apple i2s DMA gracefully Paul Mackerras
2006-10-29 8:49 ` Johannes Berg
2006-10-29 10:47 ` Paul Mackerras
2006-10-29 12:23 ` Johannes Berg
2006-10-31 14:14 ` Takashi Iwai
2006-11-01 1:05 ` Paul Mackerras
2006-11-02 8:29 ` Johannes Berg [this message]
2006-11-02 21:54 ` Paul Mackerras
2006-11-02 22:59 ` Johannes Berg
2006-11-06 10:38 ` Takashi Iwai
2006-11-06 10:41 ` Paul Mackerras
2006-11-06 10:50 ` Johannes Berg
2006-11-28 12:03 ` Takashi Iwai
2006-11-06 10:47 ` Johannes Berg
2007-02-08 13:12 ` [PATCH] aoa i2sbus: " Johannes Berg
2007-02-08 14:07 ` Takashi Iwai
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=1162456168.3241.2.camel@ux156 \
--to=johannes@sipsolutions.net \
--cc=alsa-devel@alsa-project.org \
--cc=benjamin@sipsolutions.net \
--cc=paulus@samba.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox