mercredi 25 mars 2015

Issues with arecord command


I'm having some mixed results with the arecord command in the terminal. The hardware I'm using consists of the Cirrus Audio Card for the Raspberry Pi. I'm trying to record a 24-bit 192kHz sound (from the onboard MIC) into a WAV file, and then play it back (through the headeset). First I make sure to enable the MIC and headset:



$ ./Record_from_DMIC.sh
$ ./Playback_to_Headset.sh


Then I tried multiple commands, and got mixed results.



$ arecord -f S24_LE -r 192 -d 20 test.wav
Recording WAVE 'test.wav' : Signed 24 bit Little Endian, Rate 192000 Hz, Mono
$ arecord: set_params:1087: Channels count non available
# So I set the number of channels to 1 (even though it is that, by default)
$ arecord -c 1 -f S24_LE -r 192 -d 20 test.wav
Recording WAVE 'test.wav' : Signed 24 bit Little Endian, Rate 192000 Hz, Mono
arecord: set_params:1087: Channels count non available


Still get the same error. I got rid of the rate (192kHz), and let it default:



$ arecord -d 10 -c 1 -f S24_LE -t wav test.wav
Recording WAVE 'test.wav' : Signed 24 bit Little Endian, Rate 8000 Hz, Mono
$ arecord: set_params:1087: Channels count non available


Still getting the same error. So I just used an example run of the command I found online (http://ift.tt/1Gpaw9M):



$ arecord -d 10 -f cd -t wav test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


This worked. But clearly used different values than from what I wanted. I also had trouble playing at 192kHz:



$ aplay -c 1 -r 192000 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo


I try to play at 192kHz, but it goes down to 44.1kHz. Does anyone have any idea as to why I'm getting all these weird errors and results?



Aucun commentaire:

Enregistrer un commentaire