All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cannon <mark@vuenyx.com>
To: alsa-devel@lists.sourceforge.net
Subject: Re: Re: alsa driver, repeat playback of buffer contents
Date: Mon, 14 Mar 2005 20:14:37 -0500	[thread overview]
Message-ID: <200503142014.37841.mark@vuenyx.com> (raw)
In-Reply-To: <1110846019.15588.28.camel@mindpipe>

I looked at using the mmap() version, and in fact I 
implemented it. It's easy to use, and it is the better 
way to do it, yet I do not see how it solves my 
problem. 

How can I send down a short PCM stream, and have the 
hardware repeat it until told to stop?

Mark

On Monday 14 March 2005 19:20, Lee Revell wrote:
> On Mon, 2005-03-14 at 23:20 +0100, Måns Rullgård 
wrote:
> > Lee Revell <rlrevell@joe-job.com> writes:
> > > On Mon, 2005-03-14 at 15:30 -0500, random.bits 
wrote:
> > >> I have been reading up on the alsa driver. I
> > >> would like to have the alsa driver play a small
> > >> pcm sound bite over and over without have to
> > >> re-write it to the device.
> > >>
> > >> By small, I mean 1.9K in length. I have
> > >> followed the examples enough to get it to play
> > >> the sound bite once, but I cannot figure out
> > >> how to get it to play it multiple times without
> > >> having to make another call to snd_pcm_writei()
> > >> again.
> > >
> > > Why in the heck are you using write() instead of
> > > mmap()?
> >
> > snd_pcm_writei() often uses mmap() behind the
> > scenes.
>
> Right, but AFAICT mmap() should not call write()
> behind the scenes (unless you use the plug layer?). 
> So if you want to be sure to avoid unnecessary
> copying you should just use mmap() directly.
>
> Or am I wrong?  Anyway, the JACK ALSA driver always
> uses mmap() for example.
>
> Lee
>
>
>
> ----------------------------------------------------
>--- SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users. Discover which products
> truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=cl
>ick _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-de
>vel

-- 
Mark Cannon
VP Engineering
Viewnyx Corporation


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

  reply	other threads:[~2005-03-15  1:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14 20:30 alsa driver, repeat playback of buffer contents random.bits
2005-03-14 21:45 ` Lee Revell
2005-03-14 22:20   ` Måns Rullgård
2005-03-15  0:20     ` Lee Revell
2005-03-15  1:14       ` Mark Cannon [this message]
2005-03-15  1:19         ` Lee Revell
2005-03-15  7:49         ` Jaroslav Kysela
2005-03-15 18:49           ` random.bits
2005-03-15 18:49             ` Jaroslav Kysela
2005-03-15 21:34               ` random.bits
2005-03-15  8:14       ` Clemens Ladisch

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=200503142014.37841.mark@vuenyx.com \
    --to=mark@vuenyx.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.