cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ericzerbib
Adventurer
Adventurer
1,420 Views
Registered: ‎09-05-2018

XLNX_PL_SND_CARD: Linux module driver doesn't create audio device if audio_formatter is not fully connected to RX and TX FPGA block

Hello Support

We have our custom board running SDK 2019.1, and our FPGA space is near to be full, our application is a video encoder, and in this case we need to acquire Video and Audio into gstreamer and send the data over the network

In the beginning we based our design on the Video TRD audio 2019.1 which have full FPGA block HDMI in and HDMI out, as we changed somehow the design to add a second input we run outr of place in our FPGA and we we obliged to remove the HDMI out block and replace it with a second HDMI in

At this stage we saw that the sound driver (/linux-xlnx/sound/soc/xilinx/xlnx_pl_snd_card.c) is not initialize properly

certainly due to the following error

xlnx_snd_card xlnx_snd_card.0.auto: platform node not found

A fact is that the xlnx_pl_snd_card.c is making assumption that RX block and TX block are connected is problematic for us. My question is how could I overcome the problem and force the audio driver to build the audio device properly without the need of the TX block


Here the dmesg filtered on audio

root@EN10-901234:~# dmesg -t --color=always | egrep -i "snd|audio|sound|ASoC|EZ"
Advanced Linux Sound Architecture Driver Initialized.
usbcore: registered new interface driver snd-usb-audio
snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #1
snd-soc-dummy snd-soc-dummy: ASoC: dynamically register DAI snd-soc-dummy
snd-soc-dummy snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #0
xlnx_formatter_pcm a00a1000.audio_formatter: sound card device will use DAI link: v_hdmi_rx_ss
xlnx_formatter_pcm a00a1000.audio_formatter: ASoC: dai register a00a1000.audio_formatter #0
xlnx_formatter_pcm a00a1000.audio_formatter: pcm platform device registered
xlnx_formatter_pcm a00a2000.audio_formatter: sound card device will use DAI link: v_hdmi_rx_ss
xlnx_formatter_pcm a00a2000.audio_formatter: ASoC: dai register a00a2000.audio_formatter #0
xlnx_formatter_pcm a00a2000.audio_formatter: pcm platform device registered
xlnx_formatter_pcm a0090000.audio_formatter: sound card device will use DAI link: i2s_transmitter
xlnx_formatter_pcm a0090000.audio_formatter: sound card device will use DAI link: i2s_receiver
xlnx_formatter_pcm a0090000.audio_formatter: ASoC: dai register a0090000.audio_formatter #0
xlnx_formatter_pcm a0090000.audio_formatter: pcm platform device registered
xlnx_i2s a00b0000.i2s_receiver: ASoC: dai register a00b0000.i2s_receiver #1
xlnx_i2s a00b0000.i2s_receiver: ASoC: dynamically register DAI a00b0000.i2s_receiver
xlnx_i2s a00b0000.i2s_receiver: ASoC: Registered DAI 'a00b0000.i2s_receiver'
xlnx_i2s a00c0000.i2s_transmitter: ASoC: dai register a00c0000.i2s_transmitter #1
xlnx_i2s a00c0000.i2s_transmitter: ASoC: dynamically register DAI a00c0000.i2s_transmitter
xlnx_i2s a00c0000.i2s_transmitter: ASoC: Registered DAI 'a00c0000.i2s_transmitter'
xlnx_snd_card xlnx_snd_card.0.auto: platform node not found
xlnx_snd_card xlnx_snd_card.1.auto: platform node not found
xlnx_snd_card xlnx_snd_card.2.auto: xilinx-i2s_playback registered
xlnx_snd_card xlnx_snd_card.2.auto: xilinx-i2s_capture registered
xlnx_snd_card xlnx_snd_card.2.auto: EZ xlnx-i2s-snd-card-0 before register
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: binding xilinx-i2s_playback
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: binding xilinx-i2s_capture
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 0 late -2
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 1 late -2
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 0 late -1
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 1 late -1
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 0 late 0
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 1 late 0
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 0 late 1
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 1 late 1
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 0 late 2
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: registered pcm #0 (null) snd-soc-dummy-dai-0
xlnx_snd_card xlnx_snd_card.2.auto: snd-soc-dummy-dai <-> a00c0000.i2s_transmitter mapping ok
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: probe xlnx-i2s-snd-card-0 dai link 1 late 2
xlnx_snd_card xlnx_snd_card.2.auto: ASoC: registered pcm #1 (null) snd-soc-dummy-dai-1
xlnx_snd_card xlnx_snd_card.2.auto: snd-soc-dummy-dai <-> a00b0000.i2s_receiver mapping ok
xlnx_snd_card xlnx_snd_card.2.auto: xlnx-i2s-snd-card-0 registered
#0: xlnx-i2s-snd-card-0
xilinx-hdmi-rx a0020000.v_hdmi_rx_ss: ASoC: dai register a0020000.v_hdmi_rx_ss #1
xilinx-hdmi-rx a0020000.v_hdmi_rx_ss: ASoC: dynamically register DAI a0020000.v_hdmi_rx_ss
xilinx-hdmi-rx a0020000.v_hdmi_rx_ss: ASoC: Registered DAI 'a0020000.v_hdmi_rx_ss'
xilinx-hdmi-rx a0020000.v_hdmi_rx_ss: hdmi rx audio initialized
xilinx-hdmi-rx a0000000.v_hdmi_rx_ss: ASoC: dai register a0000000.v_hdmi_rx_ss #1
xilinx-hdmi-rx a0000000.v_hdmi_rx_ss: ASoC: dynamically register DAI a0000000.v_hdmi_rx_ss
xilinx-hdmi-rx a0000000.v_hdmi_rx_ss: ASoC: Registered DAI 'a0000000.v_hdmi_rx_ss'
xilinx-hdmi-rx a0000000.v_hdmi_rx_ss: hdmi rx audio initialized


Here a picture of the Vivado project zoom on Audio

Screenshot from 2019-11-25 13-00-15.png

 

0 Kudos
7 Replies
ericzerbib
Adventurer
Adventurer
1,324 Views
Registered: ‎09-05-2018

Hello support ? is there any input on this question?
0 Kudos
clivewmwalker
Adventurer
Adventurer
1,029 Views
Registered: ‎03-21-2013

Hi ericzerbib.

Did you manage to get to the bottom of this? I have the same message. Also "No Soundcards found" (probably as a result).

By the way - in this case I have ONLY 1xHDMI TX. No RX.

Thanks for anything 

Clive

 

 

 

0 Kudos
ericzerbib
Adventurer
Adventurer
992 Views
Registered: ‎09-05-2018

yes
by patching the kernel essentially create a dummy interface RX which initialize the audio components to be able to have driver create
0 Kudos
clivewmwalker
Adventurer
Adventurer
978 Views
Registered: ‎03-21-2013

Thanks! That's reassuring information. 

I had already made the assumption that something was wrong, and started to take steps towards modifying the driver code in the kernel.

Not being a renowned SW engineer, it is going to take some time to identify the issue. Would it be asking too much for you to share the changes you made? I am assuming the problem lies in the /sound/soc/xilinx/xlnx_pl_snd_card.c file?

 

0 Kudos
badegoke_f1
Adventurer
Adventurer
584 Views
Registered: ‎06-18-2019

Hi @ericzerbib ,

I came across your post while searching for a solution to my problem which seems similar to yours. 

I have an I2S Receiver IP connected to an Audio Formatter IP. I have basically done my block design similar to the Audio TRD although not using HDMI as in the TRD. I do NOT use I2S Transmitter block in my design. I use Vivado 2020.1. I have modified the device tree as shown:

 

 

#include "common.dtsi"
#include "apm.dtsi"




&audio_ss_0_audio_formatter_0 {
	xlnx,rx = <&audio_ss_0_i2s_receiver_0>;
};


&audio_ss_0_i2s_receiver_0 {
	xlnx,snd-pcm = <&audio_ss_0_audio_formatter_0>;
};

 

 

However I get : xlnx_snd_card xlnx_snd_card.0.auto: platform node not found 

on boot. When I use arecord -L there is no capture device. Please is there anything I need to do in the device tree? How did you get yours working?

Many thanks

Bade

0 Kudos
ericzerbib
Adventurer
Adventurer
555 Views
Registered: ‎09-05-2018

Hi

My solution is not just modify the device tree, it include a change into the xilinx driver creating a dummy interface TX

 

badegoke_f1
Adventurer
Adventurer
517 Views
Registered: ‎06-18-2019

Many thanks for replying. Please can you outline the steps I need to go through to do this in detail? I am fairly new to Petalinux. 

thanks

0 Kudos