Sound issues

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

 



hello everyone!


The sound issue complicities  came from our bug-existed sound driver which I am afraid to have no chance to fix currently, my box running an ubuntu 12.04 arm version.

if no .asoundrc existed, only "arecord -f S16_LE | aplay -f S16_LE" worked fine, and "aplay tests/pjsua/wavs/input.16.wav" got a high-pitched, double-speed-liked voice as well as "pjsip-apps/bin/samples/armv7l-unknown-linux-gnu/playfile tests/pjsua/wavs/input.16.wav"

some tests can be passed fine if I have a special .asoundrc:
arecord -f S16_LE | aplay -f S16_LE
aplay tests/pjsua/wavs/input.16.wav

but playfile got a high-pitched voice despite that .asoundrc is fine for aplay and arecord:
pjsip-apps/bin/samples/armv7l-unknown-linux-gnu/playfile tests/pjsua/wavs/input.16.wav

the special .asoundrc writen:

pcm.mycard {
    type hw
    format "raw"
    card 0
    rate 8000        #YES, 8000 worked fine and 16000 got a high-pitched for aplay
}

ctl.mycard {
    type hw
    card 0
}

pcm.myrecord {
    type hw
    card 0
    format "raw"
    rate 8000        #16000 fine too for arecord
}

pcm.!default{
   type asym
   playback.pcm "mycard"
   capture.pcm "myrecord"
}

The most things I want is pjsystest would get some voice even if it was abnormal one like playfile done. No matter how .asoundrc existed or not pjsystest heard nothing:

administrator at SanLogic:~$ cd pjproject-2.1.0/pjsip-apps/bin          
administrator at SanLogic:~/pjproject-2.1.0/pjsip-apps/bin$ ./pjsystest-armv7l-unknown-linux-gnu                                                             
15:35:55.586 os_core_unix.c !pjlib 2.1 for POSIX initialized                 
15:35:55.602 sip_endpoint.c  .Creating endpoint instance...                  
15:35:55.608          pjlib  .select() I/O Queue created (0x15dc68)          
15:35:55.609 sip_endpoint.c  .Module "mod-msg-print" registered              
15:35:55.610 sip_transport.  .Transport manager created.                     
15:35:55.611   pjsua_core.c  .PJSUA state changed: NULL --> CREATED          
15:35:55.613 sip_endpoint.c  .Module "mod-pjsua-log" registered              
15:35:55.615 sip_endpoint.c  .Module "mod-tsx-layer" registered              
15:35:55.616 sip_endpoint.c  .Module "mod-stateful-util" registered          
15:35:55.617 sip_endpoint.c  .Module "mod-ua" registered                     
15:35:55.618 sip_endpoint.c  .Module "mod-100rel" registered                 
15:35:55.619 sip_endpoint.c  .Module "mod-pjsua" registered                  
15:35:55.622 sip_endpoint.c  .Module "mod-invite" registered                 
15:35:55.958       pa_dev.c  ..PortAudio sound library initialized, status=0 
15:35:55.958       pa_dev.c  ..PortAudio host api count=2                    
15:35:55.958       pa_dev.c  ..Sound device count=7                          
15:35:55.959          pjlib  ..select() I/O Queue created (0x17a7d4)         
15:35:55.986 sip_endpoint.c  .Module "mod-evsub" registered                  
15:35:55.986 sip_endpoint.c  .Module "mod-presence" registered               
15:35:55.986 sip_endpoint.c  .Module "mod-mwi" registered                    
15:35:55.987 sip_endpoint.c  .Module "mod-refer" registered                  
15:35:55.987 sip_endpoint.c  .Module "mod-pjsua-pres" registered             
15:35:55.987 sip_endpoint.c  .Module "mod-pjsua-im" registered               
15:35:55.987 sip_endpoint.c  .Module "mod-pjsua-options" registered          
15:35:55.988   pjsua_core.c  .1 SIP worker threads created                   
15:35:55.988   pjsua_core.c  .pjsua version 2.1 for Linux-3.0.50/armv7l/glibc-2.15 initialized                                                            
15:35:55.988   pjsua_core.c  .PJSUA state changed: CREATED --> INIT          
15:35:55.988   pjsua_core.c  PJSUA state changed: INIT --> STARTING          
15:35:55.988 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered        
15:35:55.988   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING      
M E N U :                                                                    
---------                                                                    
0: Tests                                                                     
  00: Run test wizard                                                        
  01: Device Test                                                            
  02: Play Tone                                                              
  03: Play WAV File1                                                         
  04: Play WAV File2                                                         
  05: Record Audio                                                           
  06: Latency Test                                                           
  07: AEC/AES Test                                                           

  09: Exit
1: Options
  10: View Devices
  11: View Settings

Enter the menu number: 10
15:36:11.190      systest.c  Running Audio Device List
Audio Device List                                     
Found 7 devices                                       
  0: PA [AML-CS42L52:  (hw:0,0)] (2/2)                
  1: PA [sysdefault] (128/128)                        
  2: PA [pulse] (32/32)                               
  3: PA [mycard] (2/2)                                
  4: PA [myrecord] (2/2)                              
  5: PA [default] (2/2)                               
  6: PA [/dev/dsp] (16/16)                            

1:OK  
1     
M E N U :
---------
0: Tests 
  00: Run test wizard
  01: Device Test    
  02: Play Tone      
  03: Play WAV File1 
  04: Play WAV File2 
  05: Record Audio   
  06: Latency Test   
  07: AEC/AES Test   

  09: Exit
1: Options
  10: View Devices
  11: View Settings

Enter the menu number: 02
Audio Tone Playback Test 
This test will play simple ringback tone to the speaker. Please listen carefully for audio impairments such as stutter. You may need to let this test running for a while to make sure that everything is okay. Press OK to start, CANCEL to skip                                                                   
1:OK  9:Cancel                                                               
1                                                                            
15:36:38.755      systest.c  Running Audio Tone Playback Test                
15:36:38.757    pjsua_aud.c  Conf connect: 1 --> 0                           
15:36:38.757    pjsua_aud.c  .Set sound device: capture=-1, playback=-2      
15:36:38.758    pjsua_aud.c  ..Opening sound device PCM at 8000/1/20ms          
15:36:38.817   conference.c  .Port 1 (ringback) transmitting to port 0 (AML-CS42L52:  (hw:0,0))                                                           
Audio Tone Playback Test                                                     
Ringback tone should be playing now in the speaker. Press OK to stop.        
1:OK                                                                         
1                                                                            
Audio Tone Playback Test                                                     
Is the audio okay?                                                           
1:Yes  0:No                                                                  
15:36:44.463    pjsua_aud.c !Closing sound device after idle for 0 second(s) 
15:36:44.464    pjsua_aud.c  .Closing AML-CS42L52:  (hw:0,0) sound playback device and AML-CS42L52:  (hw:0,0) sound capture device                        

1:Yes  0:No  
1            
M E N U :    
---------    
0: Tests     
  00: Run test wizard
  01: Device Test    
  02: Play Tone      
  03: Play WAV File1 
  04: Play WAV File2 
  05: Record Audio   
  06: Latency Test   
  07: AEC/AES Test   

  09: Exit
1: Options
  10: View Devices
  11: View Settings

Enter the menu number: 03
WAV File Playback Test   
This test will play input.8.wav file to the speaker. Please listen carefully for audio impairments such as stutter. Let this test run for a while to make sure that everything is okay. Press OK to start, CANCEL to skip              
1:OK  9:Cancel                                                               
1                                                                            
15:37:09.778      systest.c !Running WAV File Playback Test                  
15:37:09.779    pjsua_aud.c  Creating file player: input.8.wav..             
15:37:09.780    pjsua_aud.c  .Unable to open file for playback: Not found (PJ_ENOTFOUND) [status=70006]                                                   
15:37:09.780    pjsua_aud.c  Creating file player: ../../tests/pjsua/wavs/input.8.wav..                                                                   
15:37:09.782   wav_player.c  .File player '../../tests/pjsua/wavs/input.8.wav' created: samp.rate=8000, ch=1, bufsize=4KB, filesize=67KB                  
15:37:09.782    pjsua_aud.c  .Player created, id=0, slot=1                   
15:37:09.782    pjsua_aud.c  Conf connect: 1 --> 0                           
15:37:09.783    pjsua_aud.c  .Set sound device: capture=-1, playback=-2      
15:37:09.783    pjsua_aud.c  ..Opening sound device PCM at 8000/1/20ms          
15:37:09.839   conference.c  .Port 1 (../../tests/pjsua/wavs/input.8.wav) transmitting to port 0 (AML-CS42L52:  (hw:0,0))                                 
WAV File Playback Test                                                       
WAV file should be playing now in the speaker. Press OK to stop.             
1:OK                                                                         
1                                                                            
15:37:16.798    pjsua_aud.c  Destroying player 0..                           
WAV File Playback Test                                                       
Is the audio okay?                                                           
1:Yes  0:No                                                                  
15:37:16.808    pjsua_aud.c !Closing sound device after idle for 0 second(s) 
15:37:16.808    pjsua_aud.c  .Closing AML-CS42L52:  (hw:0,0) sound playback device and AML-CS42L52:  (hw:0,0) sound capture device                        

1:Yes  0:No  
1            
M E N U :    
---------    
0: Tests     
  00: Run test wizard
  01: Device Test    
  02: Play Tone      
  03: Play WAV File1 
  04: Play WAV File2
  05: Record Audio
  06: Latency Test
  07: AEC/AES Test

  09: Exit
1: Options
  10: View Devices
  11: View Settings

Enter the menu number: 11
15:37:29.530      systest.c !Running Audio Settings
Audio Settings
Version: 2.1
Test clock rate: 8000
Device clock rate: 8000
Aud frame ptime: 20
Channel count: 1
Audio switching: Conf bridge
Snd buff count: 8
Rec dev : -1 (AML-CS42L52:  (hw:0,0)) [PA]
Rec  buf : 100 msec
Play dev: -2 (AML-CS42L52:  (hw:0,0)) [PA]
Play buf: 140 msec

1:OK
1

the *.wav file are copied form svn version as release version missed them.

my build steps:
sudo apt-get install libasound2-dev

svn co http://svn.pjsip.org/repos/pjproject/trunk pjproject
Checked out external at revision 1433.

Checked out revision 4714.
administrator at SanLogic:~$ cd pjproject
administrator at SanLogic:~/pjproject$ svn update
Fetching external item into 'third_party/portaudio'
External at revision 1433.

At revision 4714.

administrator at SanLogic:~/pjproject$ ./configure --disable-video > mylog.configure 2>&1
administrator at SanLogic:~/pjproject$ make dep  > mylog.make-dep 2>&1
administrator at SanLogic:~/pjproject$ make  > mylog.make 2>&1

I post all logs as .tar.gz attach because of size limits

thanks for any helps

Liuwf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140124/d2f48eb5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mylog.tar.gz
Type: application/octet-stream
Size: 29956 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140124/d2f48eb5/attachment-0001.gz>


[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