All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abramo Bagnara <abramo.bagnara@libero.it>
To: Jaroslav Kysela <perex@suse.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: dmix plugin
Date: Thu, 13 Feb 2003 14:10:07 +0100	[thread overview]
Message-ID: <3E4B992F.BFDE3E41@libero.it> (raw)
In-Reply-To: Pine.LNX.4.44.0302121015420.14550-100000@pnote.perex-int.cz

Jaroslav Kysela wrote:
> 
> Hi all,
> 
>         a next step to get the lowlatency sharing of exclusive PCM devices
> is in ALSA CVS - the dmix (direct mixing) plugin..
>         How it works? Basically, the playback in driver runs forewer
> without any xrun detection. The ring buffer (only just played areas) is
> also silenced in each interrupt. Then we have multiple clients and a
> process (server) which passes the file descriptor of playback devices to
> them. The server also takes care about freeing of used shm memory and
> semaphore.
>         The big step forward is that we share one mmaped ring buffer
> accross many processes and each process can add samples into it without
> any process<->kernel swaps. Also, each processes are independant, thus
> failing of one doesn't break others. It's not multithreaded, we don't need
> this mechanism.

Good work, Jaroslav!

I'd like to understand how you've thought to solve:
a) contemporary access to same sample
b) sum overflow (now I'm unable to remember the technical term)

For a) I can imagine some effective tricks (xadd or
store/sum/check/retry or period size mutex), but I really don't see what
you'll invent for b) ;-)

Without this correctness concerns this approach is very much efficient
(compared to server based one), I wonder only if this will be true also
when correctness will be taken in account. BTW someone knows how much is
relevant the audible impact of this lack of correctness?

One thing I'm definitely sure is that this is the *perfect* approach for
pcm_share (at least now I don't see any drawbacks).

-- 
Abramo Bagnara                       mailto:abramo.bagnara@libero.it

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  parent reply	other threads:[~2003-02-13 13:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-12  9:45 dmix plugin Jaroslav Kysela
2003-02-12 12:18 ` Takashi Iwai
2003-02-12 13:55   ` Jaroslav Kysela
2003-02-12 12:57 ` Paul Davis
2003-02-13 13:10 ` Abramo Bagnara [this message]
2003-02-16 13:27   ` Jaroslav Kysela
2003-02-16 18:00     ` Abramo Bagnara
     [not found] <20030212125323.C75F059D34D@kerberos.suse.cz>
2003-02-12 13:32 ` Jaroslav Kysela
  -- strict thread matches above, loose matches on Subject: below --
2003-02-12 18:04 Marc Titinger
2003-02-12 19:21 ` Jaroslav Kysela
2003-02-13  9:51   ` Takashi Iwai
2003-02-13 16:30     ` Jaroslav Kysela
2003-02-13 10:28 Marc Titinger
2003-02-17 10:04 Jaroslaw Sobierski

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=3E4B992F.BFDE3E41@libero.it \
    --to=abramo.bagnara@libero.it \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@suse.cz \
    /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.