Issues with arecord command: Channels count non available
I found out what the problem was. The command defaults because I wasn't specifying a 2-channel (stereo) 192kHz audio input. Here's an example of a command that did work:
$ arecord -f S24_LE -c 2 -r 192000 -d 20 test.wav
The -c 2
is what fixed my commands.
Related videos on Youtube
Max Jacob
Updated on September 18, 2022Comments
-
Max Jacob over 1 year
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 headset). 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://linux.die.net/man/1/arecord):
$ 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?
-
CL. about 9 yearsWhat is the output of
aplay --dump-hw-params
andaplay -D hw:0 --dump-hw-params
? -
Max Jacob about 9 yearsI get this for either command: aplay: unrecognized option '--dump-hw-params' Try 'aplay --help' for more information
-
Max Jacob about 9 yearsDoesn't stereo specifically refer to multiple channels (as in, sound coming from multiple locations)? Why would that pertain to the sample-rate (192kHz)?
-