[Elphel-support] sound/jack on camera
Andrey Latin
andrey.latin at gmail.com
Sun Oct 18 23:33:36 PDT 2009
Hi all!
Can anybody testing jack/audio on elphel camera?
Download snd.tgz and do next:
1. put archive on camera to directory* /mnt/flash/local via ftp*
2. login to camera
* cd /mnt/flash/local*
* tar -xzf snd.tgz*
* rm -rf snd.tgz*
3. Now You can test it
- connect USB sound card to camera
- login via telnet
- define environment var
*[root at Elphel353 /]# export LD_LIBRARY_PATH=/usr/local/lib*
and start jackd:
*[root at Elphel353 /]# jackd -dalsa -dhw:0 -n3 -p512 -s -S*
*jackd 0.116.2*
*Copyright 2001-2005 Paul Davis and others.*
*jackd comes with ABSOLUTELY NO WARRANTY*
*This is free software, and you are welcome to redistribute it*
*under certain conditions; see the file COPYING for details*
*JACK compiled with System V SHM support.*
*loading driver ..*
*creating alsa driver ...
hw:0|hw:0|512|3|48000|0|0|nomon|swmeter|soft-mode|16bit*
*control device hw:0*
*configuring for 48000Hz, period = 512 frames (10.7 ms), buffer = 3 periods*
*ALSA: final selected sample format for capture: 16bit little-endian*
*ALSA: use 3 periods for capture*
*ALSA: final selected sample format for playback: 16bit little-endian*
*ALSA: use 3 periods for playback*
*playback and capture sample rates do not match (48000 vs. 24000)*
if You have different samplerate for capture/playback(as example, on my USB
sound card)
cancel jackd via ctrl-c and restart it via next command
*[root at Elphel353 /]# jackd -dalsa -dplug:hw:0 -n3 -p512 -s -S*
Ok, now we can look avialable audio channels.(login another telnet session,
session #2, for example)
*[root at Elphel353 /]# export LD_LIBRARY_PATH=/usr/local/lib*
*[root at Elphel353 /]# jack_lsp*
*system:capture_1*
*system:capture_2*
*system:playback_1*
*system:playback_2*
*[root at Elphel353 /]# jack_metro -b 120 &*
We starting simple metronom. Look at avialable channels:
*[root at Elphel353 /]# jack_lsp*
*system:capture_1*
*system:capture_2*
*system:playback_1*
*system:playback_2*
*metro:120_bpm*
- login telnet more(session #3, for example):
*[root at Elphel353 /]# export LD_LIBRARY_PATH=/usr/local/lib*
*[root at Elphel353 /]# dmpaudio -c1 -t1 -p/var/tmp/hdd/tm -f wav -n dmpaudio*
where */var/tmp/hdd* - path to directory where stored dump file
*tm* - prefix of file, filename look as "*tm2009-09-27T05:08:44.wav*"
- go to session #2 enter:
*[root at Elphel353 /]# jack_lsp*
*system:capture_1*
*system:capture_2*
*system:playback_1*
*system:playback_2*
*metro:120_bpm*
*dmpaudio:in_1*
or *[root at Elphel353]# jack_lsp -p*
*system:capture_1*
* properties: output,physical,terminal,*
*system:capture_2*
* properties: output,physical,terminal,*
*system:playback_1*
* properties: input,physical,terminal,*
*system:playback_2*
* properties: input,physical,terminal,*
*metro:120_bpm*
* properties: output,*
*dmpaudio:in_1*
* properties: input,*
Connect, for example, metro:120_bpm to dmpaudio:in_1. Go to session #2 and
enter
*[root at Elphel353]# jack_connect metro:120_bpm dmpaudio:in_1*
*[root at Elphel353]# jack_lsp -c*
*system:capture_1*
*system:capture_2*
*system:playback_1*
*system:playback_2*
*metro:120_bpm*
* dmpaudio:in_1*
*dmpaudio:in_1*
* metro:120_bpm*
Go to session #3 and enter "start"
waiting some time - enter "stop"
Now You can play *.wav file and hear "beep"
Ok, disconnect metro:120_bpm from dmpaudio:in_1 (go to session #2) and
connect audio capture channel to our dump program
Connect mic to sound card.
*[root at Elphel353]# jack_disconnect metro:120_bpm dmpaudio:in_1*
*[root at Elphel353]# jack_connect system:capture_1 dmpaudio:in_1*
Go to session #3, enter command "start". Now You starting record from mic.
Playing some time and stop record
Enter command "stop". Trying play dumped wav file - You can hear sound from
mic.
Ok, now mixing two sources to dump file, go to session #2
*[root at Elphel353]# jack_connect metro:120_bpm dmpaudio:in_1*
*[root at Elphel353]# jack_lsp -c*
*system:capture_1*
* dmpaudio:in_1
system:capture_2*
*system:playback_1*
*system:playback_2*
*metro:120_bpm*
* dmpaudio:in_1*
*dmpaudio:in_1*
* metro:120_bpm*
* system:capture_1*
Go to session #3 and enter commend "start", make recording from mic and beat
from software metronom
Playing some time and enter command "stop". Testing new dumped file - in
file sound from mic and beat from software metronom
Enter command "quit".
wbr, Andrey Latin
PS. I am modifying configuration files for correct building flash image for
camera. When it'll ready - I'll commi it to CVS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20091019/53c6133d/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snd.tgz
Type: application/x-gzip
Size: 718261 bytes
Desc: not available
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20091019/53c6133d/attachment.tgz>
More information about the Support-list
mailing list