All of lore.kernel.org
 help / color / mirror / Atom feed
* question about ALSA devices not showing up in buildroot build
@ 2021-02-02 17:00 Bert Schiettecatte
  2021-02-02 17:20 ` Pavel Hofman
  2021-02-03 11:51 ` Jaroslav Kysela
  0 siblings, 2 replies; 6+ messages in thread
From: Bert Schiettecatte @ 2021-02-02 17:00 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: question about ALSA devices not showing up in buildroot build
  2021-02-02 17:00 question about ALSA devices not showing up in buildroot build Bert Schiettecatte
@ 2021-02-02 17:20 ` Pavel Hofman
  2021-02-02 18:32   ` Bert Schiettecatte
  2021-02-03 11:51 ` Jaroslav Kysela
  1 sibling, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2021-02-02 17:20 UTC (permalink / raw)
  To: Bert Schiettecatte, alsa-devel

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: question about ALSA devices not showing up in buildroot build
  2021-02-02 17:20 ` Pavel Hofman
@ 2021-02-02 18:32   ` Bert Schiettecatte
  2021-02-02 18:57     ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: Bert Schiettecatte @ 2021-02-02 18:32 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: question about ALSA devices not showing up in buildroot build
  2021-02-02 18:32   ` Bert Schiettecatte
@ 2021-02-02 18:57     ` Pavel Hofman
  2021-02-02 22:41       ` Bert Schiettecatte
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2021-02-02 18:57 UTC (permalink / raw)
  To: Bert Schiettecatte; +Cc: alsa-devel

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: question about ALSA devices not showing up in buildroot build
  2021-02-02 18:57     ` Pavel Hofman
@ 2021-02-02 22:41       ` Bert Schiettecatte
  0 siblings, 0 replies; 6+ messages in thread
From: Bert Schiettecatte @ 2021-02-02 22:41 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: question about ALSA devices not showing up in buildroot build
  2021-02-02 17:00 question about ALSA devices not showing up in buildroot build Bert Schiettecatte
  2021-02-02 17:20 ` Pavel Hofman
@ 2021-02-03 11:51 ` Jaroslav Kysela
  1 sibling, 0 replies; 6+ messages in thread
From: Jaroslav Kysela @ 2021-02-03 11:51 UTC (permalink / raw)
  To: Bert Schiettecatte, alsa-devel

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

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-03 11:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 17:00 question about ALSA devices not showing up in buildroot build Bert Schiettecatte
2021-02-02 17:20 ` Pavel Hofman
2021-02-02 18:32   ` Bert Schiettecatte
2021-02-02 18:57     ` Pavel Hofman
2021-02-02 22:41       ` Bert Schiettecatte
2021-02-03 11:51 ` Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.