[alsa-devel] capturing data from the microphone

Marc Garnier marc.garnier at heig-vd.ch
Wed Jan 6 08:58:10 CET 2010


Ok, let me go into details. I work on a custom device platform based on 
an Atmel at91sam9261. I wrote an alsa driver composed of 2 files 
(sound/soc/atmel/myplateform_q2686.c and sound/soc/codecs/q2686.c) and I 
also add this line into arch/arm/mach-at91/board-myplateform.c :

at91_add_device_ssc(AT91SAM9261_ID_SSC0, ATMEL_SSC_TX | ATMEL_SSC_RX);

When I boot my device I can see that :
Q2686 SoC Audio Codec 0.2
asoc: Q2686 <-> atmel-ssc0 mapping ok
ALSA device list:
  #0: MYPLATFORM (Q2686)

And everything ok with playback :
# aplay -c 1 tone.wav

But when I want to record a pcm stream I have this error:
# arecord -v -c 1 -t wav -f S16_LE -r 8000 -d 10 input.wav
arecord: pcm_read:1629: read error: Input/output error

Any more idea?

Raymond Yau wrote:
> which device are you using ?  ( pulseaudio , dmix or default device defined
> in /usr/share/alsa/cards/*.conf )
>
> post output of
>
> arecord -v -c 1 -t wav -f S16_LE -r 8000 -d 10 input.wav
>   
> 2010/1/5 Marc Garnier <marc.garnier at heig-vd.ch>
>
>   
>> Hi,
>>
>> I have the same kind of problem. I try to capture PCM stream thanks to
>> areacord :
>> # arecord -c 1 -t wav -f S16_LE -r 8000 -d 10 input.wav
>>
>> 30 seconds later I have the folowing message :
>> # arecord: pcm_read:1629: read error: Input/output error
>>
>> I can observe the PCM stream on an oscilloscope but no interrupt are
>> catched by the system  (AIC ss0 counter remains at zero ) :
>> # cat /proc/interrupts
>>           CPU0
>>  1:     275059         AIC  at91_tick, rtc0, ttyS0
>>  7:        179         AIC  ttyS2
>>  9:         11         AIC  mmc0
>>  13:          0         AIC  atmel_spi.1
>>  14:          0         AIC  ssc0
>>  82:          1        GPIO  alerte
>> 107:       9464        GPIO  eth0
>>
>> Any idea?
>>
>>
>>
>>     
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>   


More information about the Alsa-devel mailing list