modify your Audiorecord buffer size. yout buffer size should equal your function getbuffersize()'s return value my buffer size is 320.
On 9月11日, 上午11时46分, xie zzl <[email protected]> wrote: > Thanks for reply~~ > My devices info is below: > # cat /proc/asound/devices > 0: [ 0] : control > 16: [ 0- 0]: digital audio playback > 24: [ 0- 0]: digital audiocapture > 33: : timer > > so I changed device name to digital audiocapture,but it doesn't work. > and i don't have asound.conf,does it metter? > The same problme occured when i execute alsa_arecord. > my alsa version is 1.0.17 > > the log is below: > > I/AudioHardwareALSA( 1761): AudioStreamInALSA::AudioStreamInALSA > I/AudioHardwareALSA( 1761): ALSAStreamOps::open --> stream[CAPTURE] > devname[digital audio capture_Speaker_normal] > E/ALSALib ( 1761): external/alsa-lib/src/pcm/pcm.c:2201: > (snd_pcm_open_noupdate) Unknown PCM digital audio > capture_Speaker_normal > E/ALSALib ( 1761): external/alsa-lib/src/pcm/pcm.c:2201: > (snd_pcm_open_noupdate) Unknown PCM digital audio capture_Speaker > E/ALSALib ( 1761): external/alsa-lib/src/pcm/pcm.c:2201: > (snd_pcm_open_noupdate) Unknown PCM digital audiocapture > I/AudioHardwareALSA( 1761): Initialized ALSACAPTUREdevice default > D/AudioHardwareALSA( 1761): SetCAPTUREPCM format to S16_LE (Signed > 16 bit Little Endian) > D/AudioHardwareALSA( 1761): Using 1 channel forCAPTURE. > D/AudioHardwareALSA( 1761): SetCAPTUREsample rate to 8000 HZ > D/AudioHardwareALSA( 1761): Buffer size: 2048 > D/AudioHardwareALSA( 1761): Latency: 256000 > E/ALSALib ( 1761): external/alsa-lib/src/pcm/pcm_mmap.c:371: > (snd_pcm_mmap) mmap failed > E/AudioHardwareALSA( 1761): Unable to set hardware parameters: No such > device or address > W/AudioFlinger( 1761): AudioRecordThread: buffer overflow > W/AudioRecord( 1761): obtainBuffer timed out (is the CPU pegged?) > user=00000000, server=00000000 > > On 9月10日, 下午9时05分, wineleven <[email protected]> wrote: > > > > > Try to specify theCAPTUREdevice name as your board, like hw00:0 or > > hw00:1. > > > Is the default ALSA device supportCAPTURE? > > > On Sep 10, 5:10 pm, xie zzl <[email protected]> wrote: > > > > I have ported ALSA to my board, and it can play music well. but i > > > cann't use soundrecoder tocapture,becouse of mmap failed. > > > > The PLAYBACK can be configed successful, no error about mmap. > > > I have no idear, can anyone help me ...thanks > > > > the ALSACAPTURElog is below: > > > > I/AudioHardwareALSA( 1762): Initialized ALSACAPTUREdevice default > > > D/AudioHardwareALSA( 1762): SetCAPTUREPCM format to S16_LE (Signed > > > 16 bit Little Endian) > > > D/AudioHardwareALSA( 1762): Using 1 channel forCAPTURE. > > > D/AudioHardwareALSA( 1762): SetCAPTUREsample rate to 8000 HZ > > > D/AudioHardwareALSA( 1762): Buffer size: 2048 > > > D/AudioHardwareALSA( 1762): Latency: 256000 > > > E/ALSALib ( 1762): external/alsa-lib/src/pcm/pcm_mmap.c:371: > > > (snd_pcm_mmap) mmap failed > > > E/AudioHardwareALSA( 1762): Unable to set hardware parameters: No such > > > device or address > > > W/AudioFlinger( 1762): AudioRecordThread: buffer overflow > > > W/AudioRecord( 1762): obtainBuffer timed out (is the CPU pegged?) > > > user=00000000, server=00000000 > > > W/AudioRecord( 1762): obtainBuffer timed out (is the CPU pegged?) > > > user=00000000, server=00000000- 隐藏被引用文字 - > > > - 显示引用的文字 -- 隐藏被引用文字 - > > - 显示引用的文字 - --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
