wiki:Testing software part (Old)
Last modified 5 years ago Last modified on 09/09/13 16:53:52

!!! There is very old page describes an alsa-driver testing procedure without any hardware

Testing enviroment

I Test description

We need to test a driver (software part) first. We must generate test signal with play program (or with live media) and forward it to capturing program that capture audio stream from alsa device and send it throught network (RTP stream). Then we take an RTP stream on other PC (for correct test, but of course we may test it on same PC). We can capture incoming ethernet RTP traffic with snd_artp ALSA driver and use this driver with Linux JACK audio software (it's strongly recommended because audio software can not set an audio device parameters correctly). Than we starts JACK and run an audio production software (for ex. Audacity), where we can record a received stream. We must see 1kHz sin wave geneated on first PC by play binary.

II Tools description

  • play - program uses for generate 1khz sin signal and forward it to alsa device input
  • aloop24.ko - special alsa loop interface driver. Same that aloop by rewrited for 24-bit depth. You can play tmth to HW:X,1(HW:X,0) and receive this signal on HW:X,0(HWX:X,1).
  • capt - software that capture signal generated by play from aloop device and transmit multicast RTP stream throught ethernet.
  • snd-artp - soundcard driver that receive RTP audio stream

III Steps for testing

  1. Compile testing programs play and capture and aloop24 driver On first PC
  2. Compile snd_artp driver, install JACK, audacity On second PC
  3. insmod aloop24 On first PC
  4. Run play like:
./play hw:2,1

on first PC (if you test on one PC run JACKD firstly, you can receive an "write to audio interface failed (Broken pipe)" error, you must simply continue

by restarting play)

  1. Check network configuration on both PCs. You must have link up, fixed ip on both PCs and route for multicast address (route add -net 224.0.0.0/4 dev eth0) on first PC.
  2. Run capturing program like:
./capt hw:2,0

on first PC. It will produce RTP stream, we may see it with any packet sniffing software.

  1. insmod snd_artp driver On second PC.
  2. Run JACKD like:
/usr/bin/jackd -dalsa -dhw:1,1 -r192000 -p2048 -n3 -i2 -C

-i2 - only two input channels!

-C - capture only!

  1. Run sound production software connect in to jack, record stream and enjoy.