This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: Problems with channels on arecord command

Part Number: AM62P

Hi 

I've ran this command : 
"arecord -v -D hw:0,3 -f S16_LE -r 44100 /storage/test.wav"
when i played the audio from the test.wav file it was reproduced perfectly.

But when i ran:
arecord -v -D hw:0,3 -f S16_LE -c 2 -r 44100 /storage/test_plug.wav
when i played the audio from the test.wav file, it's speed was 2x faster than expected. 

what's the relation with channels definition (-c 2) and the audio speed?




  • Hi Sergio,
    Here is what I think maybe happening:
    The first command recorded with the hardware's default channel count (likely 1 channel / mono). The second explicitly requested 2 channels. If the hardware is capturing in mono but arecord writes a 2-channel .wav header, the player interprets the byte stream as stereo, effectively halving the number of samples per unit time, which sounds 2x faster. The fix is to either ensure -c matches the actual hardware channel count, or use plughw instead of hw so ALSA handles the channel conversion automatically.