At 4 Jun 2002 04:12:39 -0000,
[EMAIL PROTECTED] wrote:
> 
> > 
> > btw, creation of pcm devices is independent from mixer 
> devices.
> > so, i'm wondering why, too...
> > 
> > the descriptor info is necessary to build and look up 
> pcms and
> > controls for alsa.  basically the usb descriptor includes 
> _all_
> > necessary information to get the driver work.
> > 
> 
> I guessed that. So in the interest of fully documenting 
> ALSA driver design are you or others who grok it willing to 
> write some notes on how to use/read that info?

writing a proc file is really easy.  you can simply copy the code from
one of the driver.

but the proc info, such as usb descriptor dump, is hardware (driver)
dependent.  it's up to the driver author.  so i cannot summarize the
"general" usage for such files. 

ok, let me comment major proc files...

***

/proc/asound/cards (RO)
        the list of registered cards

/proc/asound/version (RO)
        the version and date the driver was built

/proc/asound/devices (RO)
        the list of registered ALSA devices (minor=116)

/proc/asound/hwdep (RO)
        the list of hwdep (hardware dependent) controls

/proc/asound/meminfo (RO)
        memory usage information

/proc/asound/pcm (RO)
        the list of allocated pcm streams

/proc/asound/dev
        the directory containing device files.  device files
        are created dynamically.
        in the case without devfs, this directory is usually
        linked to /dev/snd

/proc/asound/oss
        the directory containing info about oss emulation

/proc/asound/seq
        the directory containing info about sequencer

/proc/asound/cardX (X = 0-7)
        the card-specific directory


***

device files under /proc/asound/dev

generally the file is named as aaaCxDy, where aaa is the service name,
x the card number (0-7) and y the device number (0-).

controlC?       control devices (i.e. mixer, etc.)
hwC?D?          hwdep devices
midiC?D?        rawmidi devices
pcmC?D?p        pcm playback devices
pcmC?D?c        pcm capture devices
seq             sequencer device
timer           timer device

***

info about OSS emulation

the contents of the files under this directory are changed
dynamically.  when no oss emulation modules (snd-pcm-oss,
snd-mixer-oss) are loaded, no pcm nor mixer devices will be
listed.

/proc/asound/oss/devices (RO)
        the list of devices already registered

/proc/asound/oss/sndstat (RO)
        /dev/sndstat compatible list

***

card-specific proc files

id (RO)
        the id string of the card

ac97#? (RO)
        AC97 codec information

ac97#?regs (RO)
        (printable) register dump

midi? (RO)
        the current status of input/output on the
        rawmidi device

pcm?p
        the directory status of the given pcm playback stream
pcm?c
        the directory status of the given pcm capture stream

***

pcm stream information

pcm??/info (RO)
        the pcm stream general info (card, device, name, etc.)

pcm??/oss (RO)
        oss emulation info (shown only when the pcm is opened
        as an oss device).

pcm??/sub?
        the substream information directory

pcm??/sub?/info (RO)
        the pcm substream general info (card, device, name, etc.)

pcm??/sub?/status (RO)
        the current status of the given pcm substream
        (status, position, delay, tick time, etc.)

pcm??/sub?/hw_params (RO)
        hw_params set-up on the substream
        (buffer size, format, etc.)

pcm??/sub?/sw_params (RO)
        sw_params set-up on the substream
        (threshold, etc.)

pcm??/sub?/prealloc (RW)
        the number of pre-allocated buffer size in kb.
        you can specify the buffer size by writing to this proc file:

        # echo 128 > /proc/asound/card0/pcm0p/sub0/prealloc

        to allocate 128kbyte for playback, substream #0, stream #0
        on the card #0.

***


Takashi

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to