question about ALSA devices not showing up in buildroot build
Hi all I am working on getting my ALSA machine driver and codecs working. I ported over my code which was based on 4.11, and I'm using 5.9.12 at the moment. At first sight everything seems to be working, but the hw: , plughw: etc devices are missing and when I list the PCMs with acrecord -L, I don't see any, even though arecord -l does show the card. I am using buildroot for my rootfs. So I am wondering if this is an issue with incorrectly defining the structs in my driver code, or if this is an issue with missing package in my buildroot config, or if this is due to a missing configuration file for ALSA in the rootfs. Previously I was using an off the shelf linaro rootfs when I was still on kernel version 4.11, and there the PCMs were showing up correctly and I could see the multiple devices such as hw:, plughw:, dmix: etc. Thanks! Bert
Hi Bert,
Dne 02. 02. 21 v 18:00 Bert Schiettecatte napsal(a):
Hi all I am working on getting my ALSA machine driver and codecs working. I ported over my code which was based on 4.11, and I'm using 5.9.12 at the moment. At first sight everything seems to be working, but the hw: , plughw: etc devices are missing and when I list the PCMs with acrecord -L, I don't see any, even though arecord -l does show the card. I am using buildroot for my rootfs. So I am wondering if this is an issue with incorrectly defining the structs in my driver code, or if this is an issue with missing package in my buildroot config, or if this is due to a missing configuration file for ALSA in the rootfs. Previously I was using an off the shelf linaro rootfs when I was still on kernel version 4.11, and there the PCMs were showing up correctly and I could see the multiple devices such as hw:, plughw:, dmix: etc.
Do you have the /usr/share/alsa configs?
Pavel.
Hi Pavel
Do you have the /usr/share/alsa configs?
[root@rockchip:/usr/share/alsa]# ls -las 1 drwxr-xr-x 6 root root 1024 Dec 21 2020 . 1 drwxr-xr-x 24 root root 1024 Jan 23 2021 .. 10 -rw-r--r-- 1 root root 9876 Dec 21 2020 alsa.conf 2 drwxr-xr-x 2 root root 2048 Dec 21 2020 cards 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 init 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 pcm 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 speaker-test [root@rockchip:/usr/share/alsa]#
Bert
Dne 02. 02. 21 v 19:32 Bert Schiettecatte napsal(a):
Hi Pavel
Do you have the /usr/share/alsa configs?
[root@rockchip:/usr/share/alsa]# ls -las 1 drwxr-xr-x 6 root root 1024 Dec 21 2020 . 1 drwxr-xr-x 24 root root 1024 Jan 23 2021 .. 10 -rw-r--r-- 1 root root 9876 Dec 21 2020 alsa.conf 2 drwxr-xr-x 2 root root 2048 Dec 21 2020 cards 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 init 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 pcm 1 drwxr-xr-x 2 root root 1024 Dec 21 2020 speaker-test [root@rockchip:/usr/share/alsa]#
Sometimes strace has been of help to me, to see which file is being tried to open:
strace aplay -L 2>&1 | grep 'open('
The PCM devices are defined in the pcm/ and cards/ configs, with help of /usr/share/alsa/cards/aliases.conf . Maybe for your new driver no config is being used, but I think even an unknown card should have the very basic PCM devices defined.
Pavel.
Hi Pavel
Sometimes strace has been of help to me, to see which file is being tried to open: strace aplay -L 2>&1 | grep 'open('
you can see the output before grepping here - https://pastebin.com/Nh3v6P4c
Thanks Bert
Dne 02. 02. 21 v 18:00 Bert Schiettecatte napsal(a):
Hi all I am working on getting my ALSA machine driver and codecs working. I ported over my code which was based on 4.11, and I'm using 5.9.12 at the moment. At first sight everything seems to be working, but the hw: , plughw: etc devices are missing and when I list the PCMs with acrecord -L, I don't see any, even though arecord -l does show the card. I am using buildroot for my rootfs. So I am wondering if this is an issue with incorrectly defining the structs in my driver code, or if this is an issue with missing package in my buildroot config, or if this is due to a missing configuration file for ALSA in the rootfs. Previously I was using an off the shelf linaro rootfs when I was still on kernel version 4.11, and there the PCMs were showing up correctly and I could see the multiple devices such as hw:, plughw:, dmix: etc. Thanks!
Add "defaults.namehint.extended true" line to your ~/.asoundrc or /etc/asound.conf file to list hw/plughw devices.
For the driver test - 'aplay -l' is more relevant.
Jaroslav
participants (3)
-
Bert Schiettecatte
-
Jaroslav Kysela
-
Pavel Hofman