All of lore.kernel.org
 help / color / mirror / Atom feed
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: Thu, 17 Nov 2005 12:09:39 +0100	[thread overview]
Message-ID: <op.s0dtadhrq5yxc3@merlin> (raw)
In-Reply-To: <437B6D8D.50101@superbug.co.uk>

Dnia 16-11-2005 o 18:34:05 James Courtier-Dutton <James@superbug.co.uk>  
napisał:

> 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?
>>  Thanks,
>> Sameer.
>>
>
> Why would you want to do this?
> The purpose of dmix is to simply work around the limitation of the  
> hardware.
> If you want some other purpose, I would suggest using a sound server  
> like arts or a different approach altogether like using jackd

He just want to use ALSA :-).
It seems impossible to use default dmix output in case of non hardware  
slave
or non DMA ring buffer hw device so for some people dmix is a solution
but for some of them it is not. Also there is a problem with some OSS apps.

Using jackd on top of ALSA is just wasting resorces. If jackd is so good  
then it should
work directly on top of device driver. ALSA lib is not needed in this case.

But jackd needs patched kernel, RT priority and jackd-aware applications.
So it is not easy solution anyway. If you are using just a few apps which  
you
can patch then no problem here. But in case of workstation and WWW  
browsers,
Flash, Java, Realplayer and some other proprietary apps with no sources  
(games ;-))
it is really hard. aoss is far from perfect and some apps disable use of  
LD_PRELOAD
so this method is sometimes unusable, kernel OSS emulation is not complete  
and
not mixing at all (it needs kernel mixing IMHO which is not politically  
correct :-)).

So where to go - commercial OSS software is doing input/output mixing in  
kernel
and for private use is free of charge. There are some limitations of course
but its normal.

 From my point of view ALSA API is not much better then OSS.
There are some weak points in both. Programming sound in ALSA needs a  
little bit
more lines of code then in OSS case. Lack of good doc is a very bad  
situaction.

You can use many methods to access sound card through ALSA: normal  
read/write,
memory mapping, calbacks and some mixed modes. I just can't find a doc  
stating
clearly which mode is the best one in which situaction and how to properly  
use it.
For example I tested aoss with callbacks but because callbacks use signals  
which
are disabled by some apps so we have no sound in this case.

Some programs work better with OSS aoss emulation then while directly  
using ALSA
which means that their ALSA code is bad. Lack of good explanation of  
proper API
usage is the reason. Source doxygen means not much for me - I know that  
this parameter
is int and mean period size for example but what period size to use and in  
which case.
Examples are rather simple and often not explaining what to do in error  
situactions.
Creators of ALSA should made some good docs - users just don't know enough  
to point out
important things. Users Wiki pages are nice but they often present results  
of user experiments
and no real explanation.

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

  reply	other threads:[~2005-11-17 11:09 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
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 [this message]
  -- 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.s0dtadhrq5yxc3@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.