Alsa plugin as a device for colibri imx6

Deer Sir,

I’am trying to write an alsa plugin on colibri imx6 so I edited /etc/asound.conf and here is my code:

pcm.card10 {
type plug
slave.pcm "hw:0,0"
}

Now I should see my virtual hardware with aplay -L as I can see it with same procedure in ubuntu X86 but nothing appears there; This is the output of aplay -L on imx6:

> default:CARD=imx6colibrisgtl
> imx6-colibri-sgtl5000, 
>     Default Audio Device sysdefault:CARD=imx6colibrisgtl
>     imx6-colibri-sgtl5000, 
>     Default Audio Device

Also I can play a wav file in terminal with this command on imx6 card10:

aplay -vvv sample.wav -D card10

My final purpose is to find my plugin id in pjsua and play some voice with it but I cant find card10 as a device with the code and respective output in this file:

myCode

Hi @amin ,

Can you please specify your BSP version?

Hi @Amin,

Please provide more information about your environment, as the BSP you are using.

Regarding your issue, I think that the problem may be the ALSA itself.

You can check your sound devices by using cat /proc/asound/cards.

See here my example on an Apalis iMX6:

root@apalis-imx6:~# cat /proc/asound/cards
 0 [imx6qapalissgtl]: imx6q-apalis-sg - imx6q-apalis-sgtl5000
                      imx6q-apalis-sgtl5000
 1 [imxhdmisoc     ]: imx-hdmi-soc - imx-hdmi-soc
                      imx-hdmi-soc
 2 [imxspdif       ]: imx-spdif - imx-spdif
                      imx-spdif

The same is informed through aplay -l:

root@apalis-imx6:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: imx6qapalissgtl [imx6q-apalis-sgtl5000], device 0: HiFi sgtl5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: imxhdmisoc [imx-hdmi-soc], device 0: i.MX HDMI Audio Tx i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0 [S/PDIF PCM snd-soc-dummy-dai-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And, then, you can use the card ID as a reference in your code, according to the ALSA API.

Best regards,
André Curvello

I’am using Toradex Bsp 2.8b7

I found the solution and you are right the problem was Alsa it self; As I mentioned above when I ran the command below on terminal I couldn’t see the plugs and other devices.

aplay -L

I found the answer here link

Ans simply added these two lines in /etc/asound.conf

defaults.namehint.showall on
defaults.namehint.extended on

Now aplay -L show my plug and I can use it in pjsip

Thanks for your replies @andrecurvello.tx @daniel_m.tx

Best Regards

Hi @amin

Perfect that you found the solution. Thanks for your feedback.