星期三, 11月 18, 2009

Linux sound architecture - pulseaudio/alsa/codecs

Below is the processes of sound architecture what I know.
Only base on alsa architecture, and be aware OSS is not supported by Linux anymore.
*recording
mic --> audio codec --> audio codec interface (snd_hda_codec) --> alsa kernel driver --> /dev/snd/* --> alsa api --> alsa lib (you can have the different recording type here) --> sound recorder

*playing
totem --> gstreamer --> pulseaudio --> alsa lib --> alsa api --> alsa kernel --> /dev/snd/* --> alsa kernel driver --> audio controller driver --> audio controller --> speaker

** Vocabulary **
gstreamer : for some codecs that default doesn't support, like mp3 or divx.
alsa kernel driver : like soundcore, snd, snd_pcm, snd_timer...etc
audio controller driver : snd_hda_intel
audio codec interface : snd_hda_codec

** notes **
gnome-sound-recorder only support ogg and wav
packages:
helix for realplayer (non-free), and will touch the alsa lib directly.
gstreamer for the others free audio codecs, below lists the main packages.
-gst-plugins-base
contains a basic set of well-supported plug-ins
-gst-plugins-ugly
contains a set of well-supported plug-ins, but might pose problems for distributors
-gst-plugins-bad
contains a set of less supported plug-ins that haven't passed the rigorous quality testing we expect

星期二, 11月 10, 2009

tips or useful diag tools under Linux

* audio
audacity -- professional audio editor
(help to see the audio wave pattern or spectrum)
amixer -- command line mixer tuning program
(another is alsamixer in GUI mode)
arecord -- alsa command line audio recording program

*video
glxgears -- 3D testing tool
(quick to figure out the 3D performance)
xrandr -- command line interface to check and use the video port
(can check the all connecting video interface and output the video signal to dedicate device)