Useful Links for Sound:
0.0) A simple blow-by-blow end users guide to setting up the non-programmatic parts of alsa
http://www.linuxjournal.com/node/8234/print
(Helpful for the alsa.conf and.rc constructs syntax, easy to read, non technical)
0.00) The technical version of the above article by the same people
http://www.linuxjournal.com/node/6735/print
0) A huge and outdated list of things we might want to dig through
http://www.clug.in-chemnitz.de/vortr...soundapps.html
0.2) The outrageously out-of-date
http://linux-sound.org/ (REALLY needs a haircut)
0.5) Two very complete and highly obscure alsa init programs
http://alumnos.elo.utfsm.cl/~yanez/a...mple-programs/
1) Salsa: The small ALSA:
http://www.alsa-project.org/main/ind.../SALSA-Library
2) Notes on X-compiling Alsa (adjust to your flavour)
http://omappedia.org/wiki/ALSA_Setup#ALSA_library
3)
http://www.alsa-project.org/main/index.php/DevEmbedded
Excerpt: Clearly you need to check what you actually
NEED for your device
building the minimal alsa library.
--disable-aload disable reading /dev/aload*
--disable-mixer Disable the mixer component
--disable-pcm Disable the PCM component
--disable-rawmidi Disable the raw MIDI component
--disable-hwdep Disable the hwdep component
--disable-seq Disable the sequencer component
--disable-instr Disable the instrument component
--disable-alisp Disable the alisp component
--with-pcm-plugins=<list> Build PCM plugins
Note that only hw plugin is important for pcm if applications will do all conversions itself.
for example:
./configure --disable-aload --disable-mixer --disable-rawmidi
--disable-hwdep --disable-seq --disable-instr --disable-alisp
--with-pcm-plugins=hw
# also you could:
strip -g --remove-section=.comment --remove-section=.note libasound.so
# however don't strip statics AIUI.
4)
http://www.alsa-project.org/main/ind...Developer_Zone
or
http://home.roadrunner.com/~jgglatt/tech/aplay.htm are great resources for getting going
or the very basic
http://superuser.com/questions/35727...configure-alsa
or the more technical
http://www.sabi.co.uk/Notes/linuxSoundALSA.html
and the more esoteric test area
http://tldp.org/HOWTO/Alsa-sound-6.html
or the almost complete full-duplex example:
http://www.saunalahti.fi/~s7l/blog/2...0Duplex%20ALSA
or
http://www.suse.de/~mana/alsa090_howto.html#sect03 isn't bad either
5)
alsactl tip: If
alsactl is available, you can adjust input/output/level values to your liking and execute:
alsactl -f settings.alsa store and, reversely
alsactl -f settings.alsa restore on startup.
6) Notes on PCM Latency
frames should be the number of frames (samples) you want to write from the buffer. Your system's sound driver will start transferring those samples to the sound card right away, and they will be played at a constant rate.
The latency is introduced in several places. There's latency from the data buffered by the driver while waiting to be transferred to the card. There's at least one buffer full of data that's being transferred to the card at any given moment, and there's buffering on the application side, which is what you seem to be concerned about.
To reduce latency on the application side you need to write the smallest buffer that will work for you. If your application performs a DSP task, that's typically one window's worth of data.
There's no advantage in writing small buffers in a loop - just go ahead and write everything in one go - but there's an important point to understand: to minimize latency, your application should write to the driver no faster than the driver is writing data to the sound card, or you'll end up piling up more data and accumulating more and more latency.
7) How to select an ALSA sound card and have concurrent, simultaneus playback using dmix
http://ptspts.blogspot.co.uk/2009/03...-and-have.html
8) Alsa issues help
http://www.alsa-project.org/~valenty...i-HOWTO-7.html
9) Alsa bits and bats
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
http://www.alsa-project.org/alsa-doc.../examples.html
10) The midi Guy
http://home.roadrunner.com/~jgglatt/progs/software.htm
midi
http://home.roadrunner.com/~jgglatt/...rawmidplay.htm
11) Ring Buffer:
http://soundprogramming.net/programm..._a_ring_buffer
12) SDL
http://www.libsdl.org/download-1.2.php
13) x-compiling Gstreamer for kindle (Incomplete)
http://www.mobileread.mobi/forums/sh...d.php?t=119284
14) A cool read for embedded linux - outdated I believe as ever.
Audio in Embedded linux systems
ADVANCED MATHS AND SOUND CONCEPTS:
15) Some serious reading for the big folks
http://www.dspguru.com/dsp/tricks/sine_tone_generator
16) more serious crunching tricks (thanks GM)
http://aggregate.org/MAGIC/#Log2%20of%20an%20Integer
I'll update/expand this as I find decent stuff