From: "Adam Tlałka" <atlka@pg.gda.pl>
To: "alsa-devel@lists.sourceforge.net" <alsa-devel@lists.sourceforge.net>
Subject: Re: Dmix and non SND_PCM_TYPE_HW slaves
Date: Wed, 16 Nov 2005 19:03:54 +0100 [thread overview]
Message-ID: <op.s0chssfcq5yxc3@merlin> (raw)
In-Reply-To: <s5h4q6chb0n.wl%tiwai@suse.de>
Dnia 16-11-2005 o 16:23:36 Takashi Iwai <tiwai@suse.de> napisał:
> At Wed, 16 Nov 2005 16:14:31 +0100 (CET),
> Jaroslav Kysela wrote:
>>
>> On Wed, 16 Nov 2005, Takashi Iwai wrote:
>>
>> > At Wed, 16 Nov 2005 15:24:26 +0100 (CET),
>> > Jaroslav Kysela wrote:
>> > >
>> > > On Tue, 15 Nov 2005, Takashi Iwai wrote:
>> > >
>> > > > At Tue, 15 Nov 2005 08:39:06 +0100 (CET),
>> > > > Jaroslav wrote:
>> > > > >
>> > > > > On Tue, 15 Nov 2005 sameer.kittur@flextronicssoftware.com wrote:
>> > > > >
>> > > > > > Hi all,
>> > > > > >
>> > > > > > Is there a reason why Dmix cannot use a non
>> SND_PCM_TYPE_HW slave? Is
>> > > > > > there no way to re-direct the Dmix output to another plugin
>> or an
>> > > > > > external I/O or a filter plugin?
>> > > > >
>> > > > > It's impossible without massive changes to the dmix code and
>> structure.
>> > > > > Dmix uses too much driver specific things like the PCM timer,
>> passing PCM
>> > > > > device file-descriptor among applications etc. Also, the
>> latency can be
>> > > > > much worse when the dmix plugin will use only SHM ring buffer
>> or so.
>> > > >
>> > > > Actually, it's difficult to apply the current dmix model to a
>> > > > (user-space) driver without DMA like bluez. We need to gather the
>> > > > data from all clients and send only once to the hardware in such a
>> > > > case. So, the solution with a sound server looks most
>> appropriate.
>> > >
>> > > It's not so difficult, but extra double buffering will be added
>> between
>> > > producer and consumer, so the latency increases min. twice.
>> >
>> > Hmm, but still this doesn't work well. Remember that the data chunk
>> > once tranferred cannot be modified any longer. Hence, to get a low
>> > latency, the buffer must be sent just before the active update.
>> > In the best case, we may have only 2 periods in practice.
>> >
>> > This would work if a server process runs in a high task priority, but
>> > not for the models with parallel accessses like dmix.
>>
>> I meant a daemon with RT priority which will "emulate" DMA.
>
> I see. Then, surely it's not difficult :)
Maybe but again problem may rise if we have more RT apps in the system.
If kernel treats all RT apps same way we will have problems anyway.
Only true solution is doing this in the kernel so it knows which latency
is needed and can woke up proper app in the proper time.
Sorry to say that but under high load and while big apps rescheduling is
done
ALSA is doing rather poorly. Without kernel support it can't be resolved
and current approach leads to dead end IMHO.
Regards
--
Adam Tlałka mailto:atlka@pg.gda.pl ^v^ ^v^ ^v^
PGP public key: finger atlka@sunrise.pg.gda.pl
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click
next prev parent reply other threads:[~2005-11-16 18:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 7:08 Dmix and non SND_PCM_TYPE_HW slaves sameer.kittur
2005-11-15 7:39 ` Jaroslav Kysela
2005-11-15 10:22 ` Takashi Iwai
2005-11-16 14:24 ` Jaroslav Kysela
2005-11-16 14:50 ` Takashi Iwai
2005-11-16 15:14 ` Jaroslav Kysela
2005-11-16 15:23 ` Takashi Iwai
2005-11-16 18:03 ` Adam Tlałka [this message]
2005-11-16 18:23 ` Takashi Iwai
2005-11-17 10:18 ` Adam Tlałka
2005-11-17 11:01 ` Takashi Iwai
2005-11-16 17:34 ` James Courtier-Dutton
2005-11-17 11:09 ` Adam Tlałka
-- strict thread matches above, loose matches on Subject: below --
2005-11-17 9:16 sameer.kittur
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=op.s0chssfcq5yxc3@merlin \
--to=atlka@pg.gda.pl \
--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.