[alsa-devel] Audio capture on embedded system (via USB port)

Michael Trimarchi michael at amarulasolutions.com
Tue Apr 2 23:56:04 CEST 2013


Il giorno 02/apr/2013 23:47, "Israel Alejandro Arriaga Trejo" <
israel.alejandro.arriaga.trejo at outlook.com> ha scritto:
> Hello,
> I am writing to kindly ask for assistance with ALSA on an embedded
platform, in particular to record audio via a USB headset. The embedded
platform I am currently using has analog inputs and outputs for audio (mic
and headphone). So far I have been able to play and capture audio using the
analog audio inputs/outputs with the commands aplay and arecord
respectively from ALSA without any problems. However this is not the case
when I am trying to use a USB headset via the USB port, at least while
trying to record audio (playing audio is not a problem, it works perfectly
fine for different rates and formats and the devices are recognized when I
type aplay –l or arecord -l).  However, when I try to capture audio, using
the ALSA command line arecord as in:
> $ arecord –d 10 –r 16000 –f S16_LE –t wav  –Dhw:1,0  test.wav

I have done recently the same but with highter frequency and resolution.
What kernel version you have?

My version is 3.8 Series on omap3 cpu + ehci fix for isoc transaction.


> even though the following message appears:
> $ Recording WAVE  ‘test.wav’ : Signed 16 bit Little Endian, Rate 16000
Hz, Mono
> the application seems “to freeze”.  In fact, the recording does not stop
in the indicated 10 seconds, instead it continues “working” for a long
period of time and creates the file test.wav which after is played it
contains fragments of what actually was recorded via the microphone
nonetheless, its content is unintelligible. In some cases the following
error also appears:
> $ arecord: pcm_read:1617: read error: Input/Output error
> As mentioned previously this behavior is only observed during capture
mode (while attempting to record using the microphone) since the playback
mode using the USB headphone works properly. After browsing for a while I
have found similar situations reported, however I have not been able to
find a solution to my problem.
> I would highly appreciate for any hint that could help me to solve this
> Best regards,
> Alejandro
> _______________________________________________
> 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