Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
Hi!

> >>download & install alsalib
> >>download & install alsautils
> >>create 1007 nodes in /dev
> 
> I really hope you meant permission 1007 nodes, not 1007 nodes!  I'm 
> checking right now, and if the latter is the case, I'm going to 
> uninstall alsa, even if that means my computer will forever be silent, 
> it will be silent in protest.

I meant 1007 nodes... well, not literaly. For sound to work on my
system, I seem to need at least

crw-r--r--  1 root root 116,  0 Mar 24  2005 controlC0
crw-r--r--  1 root root 116, 32 Mar 24  2005 controlC1
crw-rw-rw-  1 root root 116,  4 Feb  1 16:33 hwC0D0
crw-r--r--  1 root root 116, 36 Mar 24  2005 hwC1D0
crw-rw-rw-  1 root root 116,  8 Feb  1 16:33 midiC0D0
crw-rw-rw-  1 root root 116, 24 Feb  1 16:33 pcmC0D0c
crw-rw-rw-  1 root root 116, 16 Feb  1 16:33 pcmC0D0p
crw-rw-rw-  1 root root 116, 48 Feb  1 16:34 pcmC1D0p
crw-rw-rw-  1 root root 116,  1 Feb  1 16:33 seq
crw-rw-rw-  1 root root 116, 33 Feb  1 16:33 timer

...fact that minor numbers are not allocated in Doc*/devices.txt does
not help, either.
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Zachary Amsden

Pavel Machek wrote:


download & install alsalib
download & install alsautils
create 1007 nodes in /dev


I really hope you meant permission 1007 nodes, not 1007 nodes!  I'm 
checking right now, and if the latter is the case, I'm going to 
uninstall alsa, even if that means my computer will forever be silent, 
it will be silent in protest.



(Just for the record, I should note that networking is misdesigned in
similar way; that's why we have eth0 instead of /dev/eth0, and need
special tools to rename network interface. But this mistake dates to
BSD days or something, so we got used to it... and at least you do not
need to keep libnetwork up to date to keep your  net devices working.

So networking provides _ugly_ hardware abstraction, but it provides
it).
  


I might add it got only worse with wireless support, now you can not 
configure card without both ifconfig and iwconfig, so not only is the 
API diverging, the userspace tools to manage it are doing so as well.


Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
Hi!

> 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.

(Just for the record, I should note that networking is misdesigned in
similar way; that's why we have eth0 instead of /dev/eth0, and need
special tools to rename network interface. But this mistake dates to
BSD days or something, so we got used to it... and at least you do not
need to keep libnetwork up to date to keep your  net devices working.

So networking provides _ugly_ hardware abstraction, but it provides
it).

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
Hi!

 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.

(Just for the record, I should note that networking is misdesigned in
similar way; that's why we have eth0 instead of /dev/eth0, and need
special tools to rename network interface. But this mistake dates to
BSD days or something, so we got used to it... and at least you do not
need to keep libnetwork up to date to keep your  net devices working.

So networking provides _ugly_ hardware abstraction, but it provides
it).

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Zachary Amsden

Pavel Machek wrote:


download  install alsalib
download  install alsautils
create 1007 nodes in /dev


I really hope you meant permission 1007 nodes, not 1007 nodes!  I'm 
checking right now, and if the latter is the case, I'm going to 
uninstall alsa, even if that means my computer will forever be silent, 
it will be silent in protest.



(Just for the record, I should note that networking is misdesigned in
similar way; that's why we have eth0 instead of /dev/eth0, and need
special tools to rename network interface. But this mistake dates to
BSD days or something, so we got used to it... and at least you do not
need to keep libnetwork up to date to keep your  net devices working.

So networking provides _ugly_ hardware abstraction, but it provides
it).
  


I might add it got only worse with wireless support, now you can not 
configure card without both ifconfig and iwconfig, so not only is the 
API diverging, the userspace tools to manage it are doing so as well.


Zach
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-15 Thread Pavel Machek
Hi!

 download  install alsalib
 download  install alsautils
 create 1007 nodes in /dev
 
 I really hope you meant permission 1007 nodes, not 1007 nodes!  I'm 
 checking right now, and if the latter is the case, I'm going to 
 uninstall alsa, even if that means my computer will forever be silent, 
 it will be silent in protest.

I meant 1007 nodes... well, not literaly. For sound to work on my
system, I seem to need at least

crw-r--r--  1 root root 116,  0 Mar 24  2005 controlC0
crw-r--r--  1 root root 116, 32 Mar 24  2005 controlC1
crw-rw-rw-  1 root root 116,  4 Feb  1 16:33 hwC0D0
crw-r--r--  1 root root 116, 36 Mar 24  2005 hwC1D0
crw-rw-rw-  1 root root 116,  8 Feb  1 16:33 midiC0D0
crw-rw-rw-  1 root root 116, 24 Feb  1 16:33 pcmC0D0c
crw-rw-rw-  1 root root 116, 16 Feb  1 16:33 pcmC0D0p
crw-rw-rw-  1 root root 116, 48 Feb  1 16:34 pcmC1D0p
crw-rw-rw-  1 root root 116,  1 Feb  1 16:33 seq
crw-rw-rw-  1 root root 116, 33 Feb  1 16:33 timer

...fact that minor numbers are not allocated in Doc*/devices.txt does
not help, either.
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-14 Thread Jaroslav Kysela
On Wed, 14 Mar 2007, Pavel Machek wrote:

> 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. World is not perfect and there are always probes to 
optimize things. We use standard file operations - open/close/ioctl/mmap, 
too.

Jaroslav

-
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: alsa was Re: ABI coupling to hypervisors via CONFIG_PARAVIRT

2007-03-14 Thread Jaroslav Kysela
On Wed, 14 Mar 2007, Pavel Machek wrote:

 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. World is not perfect and there are always probes to 
optimize things. We use standard file operations - open/close/ioctl/mmap, 
too.

Jaroslav

-
Jaroslav Kysela [EMAIL PROTECTED]
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/