Audio distortion on SAM9263 (was 'Sound device access causing kernel crash on SAM9263')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again,

Sorry to keep hassling the message board (thanks Benny and Nanang for 
your help so far), but I'm stumped and don't know how to proceed. I'm 
trying to get pjsip working on an AT91SAM9263-EK board (200MHz ARM 
core). I have the code compiled and running now, but the sound is quite 
distorted. Maybe some of this information will enable someone to give me 
the key insight that will make everything work... I hope so!!

I'm using the Angstrom linux distribution obtained through OpenEmbedded 
(unstable branch) and am currently using kernel 2.6.30. The Pjsip I am 
using is the 1.5 release as seen on the pjsip home page. Things I know 
so far:
1) According to this thread 
(http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2007-December/000966.html) 
the target architecture can work!!! (I've tried the SCHED_RR trick, but 
to no avail)
2) The test results returned by mips-test indicate that I should be able 
to run on this architecture quite comfortably with the right parameters
3) According to configure log, it's picked up the alsa drivers OK (have 
installed alsa-dev package) but only /dev/dsp works in practice 
(seg-fault if I try to use any other devices)
4) aplay is only happy with stereo, 16KHz, S16_LE .wav files
5) .wav files play back nicely in pjsip
6) Tones get generated nicely in pjsip (samples/playsine works fine)
7) Connecting simplua to an Asterix pbx gives good one-way audio, but 
won't give 2-way audio - connecting to a single bi-directional port 
instead of one receive and one playback caused a seg fault.


I've tried to distil down to the simplest test, so all I'm doing is 
opening pjsua, then doing 'cc 0 0'. If I understand right, this should 
be purely a test of media and conference bridge stuff and shouldn't care 
about any network considerations. I am also using native compilation at 
the moment to ensure there aren't any problems introduced by cross 
compilation settings. Unfortunately, whenever I try to record from pjsua 
I end up with an empty wav file - the sound distortion I'm hearing is a 
rapid clicking (5-10Hz, I'd say) which plays continuously over any other 
audio which is present.

All tests done with 'pjsua --ec-tail 0 --playback-dev 3 --capture-dev 3 
--add-codec pcma --quality 3'

+ ''  => Distorted
+ '-- stereo' => Distorted
+ '--clock-rate 8000' => No audio
+ '--clock-rate 8000 --stereo'  => Distorted
+ '--clock-rate 16000'  => Distorted
+ '--clock-rate 16000 --stereo' => Distorted
+ '--clock-rate 8000 --snd-clock-rate 8000' => No audio
+ '--clock-rate 8000 --snd-clock-rate 8000 --stereo' => Distorted
+ '--clock-rate 16000 --snd-clock-rate 16000' => Distorted
+ '--clock-rate 16000 --snd-clock-rate 16000 --stereo' => Distorted
+ '--clock-rate 8000 --snd-clock-rate 16000' => Distorted
+ '--clock-rate 8000 --snd-clock-rate 16000 -- stereo' => Distorted
+ '--clock-rate 16000 --snd-clock-rate 8000' => No audio
+ '--clock-rate 16000 --snd-clock-rate 8000 --stereo' => Distorted

I've attached a copy of my config_site.h file. Any help gratefully 
appreciated.

Best Regards,
John Martindale

www.practicalcontrol.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_site.h
Type: text/x-chdr
Size: 974 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091207/f18514bc/attachment.h>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux