From: Pavel Machek <pavel@ucw.cz>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Lee Revell <rlrevell@joe-job.com>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Zachary Amsden <zach@vmware.com>,
Thomas Gleixner <tglx@linutronix.de>,
john stultz <johnstul@us.ibm.com>,
akpm@linux-foundation.org, LKML <linux-kernel@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>, Andi Kleen <ak@suse.de>,
Chris Wright <chrisw@sous-sol.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT
Date: Thu, 15 Mar 2007 10:03:30 +0100 [thread overview]
Message-ID: <20070315090330.GF16330@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.61.0703141644400.8322@tm8103.perex-int.cz>
Hi!
> > > >I think the sound example to the right really shows it.
> > > >/dev/dsp has a
> > > >consistent ABI on a ton of systems. The API below it,
> > > >varies. Linux got
> > > >file_operations and ALSA. Solaris/BSD may have its
> > > >vnode-and-so-on-functions and some sort of OSS.
> > >
> > > I think this is a poor example as applications lose a
> > > lot of
> > > functionality (multiple stream mixing, software volume
> > > control, etc)
> > > by going through the legacy /dev/dsp interface vs. using
> > > native ALSA.
> >
> > OTOH /dev/dsp is nice, clean, unixy interface, while alsa creates ugly
> > ABI you should not even use unless you are libalsa. ouch.
>
> Pavel, calm down.
I'm pretty calm, thank you.
> World is not perfect and there are always probes to
> optimize things. We use standard file operations - open/close/ioctl/mmap,
> too.
Unfortunately AlSA _does not_ provide hardware abstraction. Instead,
it relies on libalsa in userland to do the kernel work. That means
that testing sound is ugly.
Plus, it made some "interesting choices" with naming, basically
inventing parallel system to /dev/. (Why do I have to specify "card 0"
number in xmms, and WTF it means? Why can't alsa use device paths as
rest of sane world?)
So... in dsp, if I wanted to record sound, I did
cat /dev/dsp > /tmp/foo; cat /tmp/foo > /dev/dsp
If that worked, I had usable sound system, and if it broke, I knew it
is kernel fault.
With alsa it is
download & install alsalib
download & install alsautils
create 1007 nodes in /dev
launch alsamixer, figure out what to do from inadequate descriptions
launch arecord, try to guess some suitable options
launch aplay, try to guess some options
...if it does not work, it may be a kernel problem or userspace
problem; I'm left with debugging both. That makes alsa pretty much
untestable.
(For _my_ usage, something like "alsatest" that is self-contained,
preferably statically linked, and just tests microphone and sound
output would be nice. But that does not fix the fact that alsa is
broken by design).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-03-15 9:04 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 18:02 ABI coupling to hypervisors via CONFIG_PARAVIRT Ingo Molnar
2007-03-09 18:28 ` Andi Kleen
2007-03-09 18:30 ` Linus Torvalds
2007-03-09 19:24 ` Ingo Molnar
2007-03-09 19:51 ` Linus Torvalds
2007-03-09 20:12 ` Ingo Molnar
2007-03-09 21:05 ` Jeremy Fitzhardinge
2007-03-09 21:06 ` Linus Torvalds
2007-03-09 21:36 ` Ingo Molnar
2007-03-09 21:40 ` Jeremy Fitzhardinge
2007-03-09 22:27 ` Linus Torvalds
2007-03-09 22:50 ` Ingo Molnar
2007-03-09 23:07 ` Zachary Amsden
2007-03-09 23:10 ` Ingo Molnar
2007-03-09 23:38 ` Zachary Amsden
2007-03-09 21:04 ` Ingo Molnar
2007-03-09 21:27 ` Chris Wright
2007-03-09 21:47 ` Ingo Molnar
2007-03-09 21:59 ` Jeremy Fitzhardinge
2007-03-09 22:12 ` Ingo Molnar
2007-03-09 22:30 ` Jeremy Fitzhardinge
2007-03-09 22:10 ` Chris Wright
2007-03-09 22:24 ` Ingo Molnar
2007-03-09 22:36 ` Jeremy Fitzhardinge
2007-03-09 23:38 ` Ingo Molnar
2007-03-09 22:46 ` Chris Wright
2007-03-09 23:02 ` Ingo Molnar
2007-03-09 23:13 ` Rik van Riel
2007-03-09 20:50 ` Jan Engelhardt
2007-03-09 22:50 ` Lee Revell
2007-03-14 8:41 ` alsa was " Pavel Machek
2007-03-14 15:59 ` Jaroslav Kysela
2007-03-15 9:03 ` Pavel Machek [this message]
2007-03-15 9:10 ` Pavel Machek
2007-03-15 9:23 ` Zachary Amsden
2007-03-15 9:32 ` Pavel Machek
2007-03-09 19:00 ` Chris Wright
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=20070315090330.GF16330@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=chrisw@sous-sol.org \
--cc=jengelh@linux01.gwdg.de \
--cc=jeremy@goop.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=perex@suse.cz \
--cc=rlrevell@joe-job.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=zach@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox