All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian McMenamin <adrian@mcmen.demon.co.uk>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Clemens Ladisch <clemens@ladisch.de>, alsa-devel@alsa-project.org
Subject: Re: PCM driver only plays tiny portion of clip
Date: Thu, 02 Mar 2006 20:49:23 +0000	[thread overview]
Message-ID: <1141332564.9233.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1141245699.5860.224.camel@mindpipe>

On Wed, 2006-03-01 at 15:41 -0500, Lee Revell wrote:

> 
> In this example the period (# of frames between interrupts) is 256.  So
> if the app is waiting to write 512 frames (by setting the avail_min
> software parameter) it will be woken up every other interrupt.  (This
> example only makes sense if there are more than 2 periods per buffer,
> otherwise the app is constantly overwriting the data that the hardware
> is playing).
> 
> Lee


I think I have a good idea why my it is not working now - the DMA
routine which transfers sound samples from the main CPU memory to the
ring buffer of the hardware (which is effectively in a different memory
space) is in a kernel thread which, in essence, never gets rescheduled -
so the app thinks there is sound to be transferred but it never is -
hence it gets wedged.

To fix that I need to know what the alsa subsystem calls inside the
driver when it wants a DMA transfer to resume - I have to reschedule the
kernel thread there.

(I have to use a kernel thread or at least something similar to ensure
that the trigger callback remains atomic due to the nature of the SH
DMAC API.)



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

  reply	other threads:[~2006-03-02 20:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 16:07 PCM driver only plays tiny portion of clip Adrian McMenamin
2006-02-27 17:26 ` Clemens Ladisch
2006-02-27 17:35   ` Adrian McMenamin
2006-02-28  7:30     ` Clemens Ladisch
2006-02-28  9:10       ` Adrian McMenamin
2006-02-28 14:55         ` Clemens Ladisch
2006-02-28 15:14           ` Adrian McMenamin
2006-02-28 17:08             ` Clemens Ladisch
2006-02-28 17:36               ` Adrian McMenamin
2006-03-01 19:10                 ` Adrian McMenamin
2006-03-01 19:31                   ` Lee Revell
2006-03-01 19:40                     ` Adrian McMenamin
2006-03-01 19:59                       ` Lee Revell
2006-03-01 20:20                         ` Adrian McMenamin
2006-03-01 20:31                           ` Lee Revell
2006-03-01 20:28                         ` Adrian McMenamin
2006-03-01 20:41                           ` Lee Revell
2006-03-02 20:49                             ` Adrian McMenamin [this message]
2006-03-03  7:27                               ` Clemens Ladisch
2006-03-03  7:42                                 ` Adrian McMenamin
2006-03-03  8:12                                   ` Lee Revell
     [not found]                                     ` <1141373843.9229.4.camel@localhost.localdomain>
2006-03-03  8:45                                       ` Lee Revell
2006-03-03  8:18                                   ` Lee Revell
2006-03-03  8:36                                   ` Lee Revell
2006-03-01 19:45                     ` Adrian McMenamin
2006-02-27 23:08   ` Adrian McMenamin

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=1141332564.9233.6.camel@localhost.localdomain \
    --to=adrian@mcmen.demon.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=rlrevell@joe-job.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.