Recording with 16kHz sampling rate

Moderator: flatmax

Post Reply
Mortis19
Posts: 1
Joined: Wed Nov 28, 2018 7:27 pm

Recording with 16kHz sampling rate

Post by Mortis19 » Wed Nov 28, 2018 7:32 pm

Hello all,

I've recently purchased the audioinjector stereo soundcard for my Raspberry Pi Model 3 B+. I set up everything and I'm trying to record with jackd and a 16kHz sampling rate but it doesn't seem to be working. Specifically I get these ALSA errors when I try to start the jackd server:
ALSA: cannot set hardware parameters for capture
ALSA: cannot configure capture channel
Cannot initialize driver
JackServer: :Open failed with -1
Failed to open server

However, the jack server starts successfully with 48kHz sampling rate for example, isn't the 16kHz sampling rate supported by the audioinjector sound card? I've also updated everything and with my previous cirrus audio card I was able to record at 16kHz sampling rate.

trekh
Posts: 1
Joined: Fri Jan 11, 2019 12:49 pm

Re: Recording with 16kHz sampling rate

Post by trekh » Fri Jan 11, 2019 1:00 pm

Hi,

I'm also having issues recording at rates of 16khz and 8khz. 32khz and above work. I'm using the ALSA arecord which produces 16khz but it's downsampled from 32khz.

Did you have any luck getting 16khz to work?

Thanks.

wh7qq
Posts: 20
Joined: Tue Jun 27, 2017 4:07 pm

Re: Recording with 16kHz sampling rate

Post by wh7qq » Mon Jan 14, 2019 7:09 am

The sampling rate is set by the "arecord" command. See https://linux.die.net/man/1/arecord. I don't use "Jack" so no comment on that interaction.

flatmax
Posts: 608
Joined: Sat Jul 23, 2016 11:39 pm

Re: Recording with 16kHz sampling rate

Post by flatmax » Mon Jan 14, 2019 1:18 pm

The simplest way to make 16kHz work is to use plughw:0 like so :
arecord -v -D plughw:0 -r 16000 -c 2 -f S32_LE test.wav

Another way to do this is to revert the firmware ....

This kernel patch to the i2s driver regressed low sample rate functionality :
https://github.com/raspberrypi/linux/co ... d4cf211cd7

That patch was from the 7th of May 2017. Which means you can get this functionality back by installing an earlier firmware such as this one :
https://github.com/Hexxeh/rpi-firmware/ ... c1b5c5532f

To do this run the following command :
sudo rpi-update e153ffdab6292509c38521896175dac1b5c5532f

You can reboot and see the version :
pi@raspberrypi:~ $ cat /proc/version
Linux version 4.9.25-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #995 SMP Thu May 4 15:52:25 BST 2017

I notice that trying to record at 16kHz reverts to 8kHz for some reason.
Checkout the next kickstarter campaign - the Ultra 2 : https://kck.st/2xwM3DL
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests