[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Protux-devel] some diplomacy...
From: |
Martin Herren |
Subject: |
Re: [Protux-devel] some diplomacy... |
Date: |
Sun, 2 Feb 2003 12:19:32 +0100 |
On Sun, 02 Feb 2003 03:10:39 -0200
Luciano Giordana <address@hidden> wrote:
> oh my God, somebody understands my pain...
>
> I am experiences EXACLTY the same...
>
> so I decided.
>
> until I find some good soul to explain what is a "DEVICE" for ALSA, and what
> is PCM, subdevice, subunit dir, configuration space, and all other
> non-standard ideas they introduced in audio world..., I will make this :
> MustuxAudioDeviceMapper will look for stereo buses, which is any THING
> (device, pcm, whatever) that can play and capture in stereo mode,
>
> when it is found, libmustux will , itself, handle the subdevicing. If user
> wants to record only from right channel, MustuxAudioDevice mapper will STILL
> record in stereo, but will make only the right channel data visible to user.
> Even if different tracks gets different channels, it will be transparent to
> the application. if MustuxAudioDeviceMapper cannot find stereo buses, it will
> allow only mono bus operation, so each track will be able to receive/send
> audio data only from/to 1 bus each
>
> Maybe it will be slower, but it will work similarly to VEGAS. And this will
> be
> like this until somebody decides to write ALSA docs for normal people, and
> not olny for ALSA developers (you can see I am really angry with ALSA docs)
yes i think that's the only way for the moment.
In the alsa doxygen-doc there is a example code for generating a sinus, and you
can choose a lot of options, like access method (interleaved or
non-interleaved), device/subdevice. I played with it, and never could get
anything but a stereo signal, even when i set the number of channels to 1.
Under /proc/asound/Live i've got pcm0c, pcm0p ,pcm1c, pcm2c and pcm3p, that
means 2 playback devices.
When i playback the sinus using device plughw:0,0 (or plughw:0) i hear the
sinus. With plughw:0,3 it seems to work too, but i don't hear anything (it's
perhaps the digital out).
Using hw:0,0 is also ok, but hw:0,3 gives an error (Rate doesn't match).
using plughw:0,1 or plughw:0,2 generates an error (no such device), which is ok
are pcm1 and pcm2 are only capture.
so there the mapping between /proc pcm device and alsa-device seems to be:
pcmX -> (plug)hw:Y,X
where Y is the number of the card.
But the different pcmXp/c devices under /proc seems not to pe different ways of
accessing the card, but really different buses on the card.
So my wild guess for my SB-Live:
pcm0c: line in
pcm0p: line out
pcm1c: mic in
pcm2c: CD in
pcm3p: digital out
i'll try to make some test to check that (perhaps pcm1c and 2c are inverted)
But everything seems to say that splitting a stereo signal into two monos
should be done in the application. But perhaps accessing the bus as
non-interleaved will make it easier (faster) to split it ?
> ps - for example : I am using those snd_hw_test_rate(...) functions, to test
> if a device/bus/pcm/anything (from now on I will call is the ALSA
> CRAPICES...), can support some rate. I tryed 1GHz on a Sound Blaster 16 !!!!
> and it returns OK !!!! Isnt it crappy ?
As far as i understood alsa yet, is that there are 2 ways of accessing a card.
Either directly, or through a plugin. That's probably the difference between a
hw:y,x and a plughw:y,x device. If you access it through a plugin, you can use
any rate, and the plugin will convert it to a rate that is supported by the
card. If you make direct access, you have to check if the rate is really
supported.
So did you access your SB16 through a plugin or directly ?
If you accessed it through a plugin, it should be normal that you get OK, alsa
will just downsample the data before really sending it to the card.
If you made a direct access, perhaps we could write a driver to use all those
old sb16's as wireless network cards... (if they can do 1 GHz, they probably
can do 2.4 GHz as well)
just joking.
/Martin
--
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch
Martin Herren +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc
pgpAFelTgxs5t.pgp
Description: PGP signature