IMX6 audio capture 24 bit mute


I am trying to record audio with a colibri imx6 and iris carrier board, and while everything works perfectly with 16bits, the recording is completely silent if i change the format to 24 bits. Here are the exact commands i am entering:

amixer set ‘Capture Mux’ ‘LINE_IN’

amixer set ‘Capture’ 0

arecord -q -r 48000 -f S24_LE -c 2 -t wav -d 10 “recording24bit.wav”

arecord -q -r 48000 -f S16_LE -c 2 -t wav -d 10 “recording16bit.wav”

No errors are shown using either 16bits or 24bits.

I had previously asked this question back in 2019, see: IMX6 audio capture 24 bit - Technical Support - Toradex Community

The difference now, is that there is no error message when using the 24bit command.

At the time, we were able to continue the project in mind with 16bits audio… So i didnt press the issue further. Now we need to have 24bits.

Thank you in advance.

I managed to figure out the problem.

For some reason arecord does not record to wav well when using the S24_LE format. And the problem doesnt seem to be universal. Simply changing the format to S24_3LE solves this issue and records audio perfectly. For a more detailed answer see this issue: 4.14: quiet, heavily distorted signal when capturing from HifiBerry Digi+I/O in S24_LE · Issue #2480 · raspberrypi/linux · GitHub

So use the following command:

arecord -q -r 48000 -f S24_3LE -c 2 -t wav -d 10 “recording24bit.wav”

Or if using an external device this should work as well:

arecord --device=plughw:1,0 -q -r 48000 -f S24_3LE -c 2 -t wav -d 10 “recording24bit.wav”

Now im having another related issue when trying to record with just 1 channel instead of 2 but i will post it in a different issue.

Ok great!

Thanks for sharing that!