Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"./micarray_recorder_direct" returns "can't open any device". #69

Open
luc2yj opened this issue Apr 27, 2018 · 3 comments
Open

"./micarray_recorder_direct" returns "can't open any device". #69

luc2yj opened this issue Apr 27, 2018 · 3 comments

Comments

@luc2yj
Copy link

luc2yj commented Apr 27, 2018

"./micarray_recorder_direct" returns "can't open any device"

How can I solve this?

@kdpatino
Copy link
Contributor

Hello @luc2yj ,

It means that you are using the kernel modules but the regmap module has not been loaded.

could you run:

1- If you install the kernel modules with apt:

sudo apt remove --purge matrixio-kernel-modules
sudo apt update
sudo apt upgrade

sudo reboot

#After reboot
sudo apt update

2- If you compile the kernel modules:

sudo rm /boot/overlays/matrixio.dtbo
sudo rm /lib/modules/$(shell uname -r)/kernel/drivers/mfd/matrixio*.ko
sudo reboot

3- You need to install matrixio-creator-init

# Add repo and key
curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list

# Update packages and install
sudo apt update
sudo apt upgrade

sudo apt install matrixio-creator-init

sudo reboot

4- If you want use Microphone HAL examples, just a simple pull of the repo and compile again the examples and not install the kernel modules.

5- If you want to use ther kernel modules, you should record from alsa ultils. For example:

sudo apt update
sudo apt upgrade

sudo apt install matrixio-kernel-modules

sudo reboot

Record with:

$ sudo apt install sox
$ rec -r 96000 -c 8 96KHz.wav

Input File     : 'default' (alsa)
Channels       : 8
Sample Rate    : 96000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

In:0.00% 00:00:06.83 [00:00:00.00] Out:654k  [      |-     ]        Clip:0    ^C
Aborted.

Let me know how it work now.

Best Regards,

Kevin Patino

@luc2yj
Copy link
Author

luc2yj commented Apr 27, 2018

Thanks for your help @kdpatino .
After reinstalling the kernel module and modifying the .asound.rc I am now able to record at 96Khz. Have you succeeded to get 8 different wav files instead of one?

@kdpatino
Copy link
Contributor

Hello @luc2yj :
You could use: arecord -f S16_LE -r 96000 -c 8 -I -d 5 test but it generates raw files for each channel, then you need to format as wav file.

arecord -h
Usage: arecord [OPTION]... [FILE]...
......
-I, --separate-channels one file for each channel
-c, --channels=#        channels
-f, --format=FORMAT     sample format (case insensitive)
-d, --duration=#        interrupt after # seconds
....

Regards,

Kevin Patino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants