[alsa-devel] how does hw:0, 1 eventually get mapped to /dev/snd/controlC0 and company? is this on the wiki somewhere?

Takashi Iwai tiwai at suse.de
Mon Apr 2 11:20:44 CEST 2007


At Fri, 30 Mar 2007 11:22:27 -0700,
John Utz wrote:
> 
> as usual, plz forgive my poor citing.
> 
> -----Original Message-----
> From: rlrevell at gmail.com on behalf of Lee Revell
> Sent: Thu 3/29/2007 7:10 PM
> To: John Utz
> Cc: Takashi Iwai; alsa-devel at alsa-project.org
> Subject: Re: [alsa-devel] how does hw:0, 1 eventually get mapped to /dev/snd/controlC0
> and company? is this on the wiki somewhere?
> 
> Hello Lee;
> 
> Thankyou for taking the time to respond, i appreciate it!
> 
> On 3/29/07, John Utz <John.Utz at dmx.com> wrote:
> > since i dont need a generic solution, it would be very helpful to me to not use
> alsa-lib and just use the alsa modules the way that our current version of the player
> uses /dev/dsp from the alsa oss-compat kernel modules.
> >
> > i'd like to open and playback to /dev/snd/pcmC0D0p and /dev/snd/pcmC0D1p directly if
> it's a reasonable thing to do.
> 
> * The alsa-lib <-> kernel interface is intentionally undocumented.  The
> * only officially supported interface to ALSA is via alsa-lib.
> 
> you can still document things even if you dont support them!
> 
> most app writers will use the lib because it does a very good job of dealing with all
> the inscrutable mandatory details of getting sound out of an arbitrary device.
> 
> but it's not the best fit for everybody!
> 
> what if you have a very teensy tiny filesystem and you dont want to fill your limited
> space with text configuration files and executable code that reads the conf files and
> executes test calls that you as a developer already know the answer to because you are
> the guy that also wrote the driver for the only hardware that you will ever use?
> 
> The lib code is in front of me and i have a compiler and a debugger and i will figure
> it out in the fullness of time.

I know of demands on recent many embedded systems.
Now alsa-lib can be built in fairly small size by choosing appropriate
components via configure options.  Of course, it would be more smaller
if the interface is rewritten somehow, though.

> Make no mistake, it will be kind of a fun adventure!
> 
> But having fun is supposed to be just a side effect of doing a good job for my
> employer and to do a good job for my employer i need to meet a rather short deadline!
> 
> Thus i am executing my responsibility as an effective employee by asking for help on
> this matter.
> 
> * If you really refuse to use alsa-lib (it's not that big, I've used it
> * in embedded projects),
> 
> 'refuse' is much too strong of a term!
> 
> i seek to minimize:
> 
> 1. the filesystem space required
> 2. the build complexity involved in building our product.
> 
> i have to cross-compile *everything!* and currently i am the *only* guy in the whole
> company that's doing this job, i wish to provide as simple a build process as possible
> for my future self or my windows centric coworkers.
> 
> * then just enable ALSA's OSS emulation and continue to use /dev/dsp.
> 
> does /dev/dsp support use of 4 channel output? how would one create 4 individual mono
> streams with /dev/dsp?
> 
> i dont think this is possible. am i mistaken?

Not impossible but much harder if you cope with ALSA drivers...
At least, the current OSS emulation won't work easily for such a
purpose as it is.


Takashi


More information about the Alsa-devel mailing list