UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor ccasanova
Visitor
346 Views
Registered: ‎03-13-2019

I2S transmitter and I2S receiver with petalinux

Jump to solution

Hello,

 

I am trying to use a Zynq 7010 with Petalinux.and an I2S transmitter or an I2S receiver or both implented at PL 

When I boot the Petalinux made with the device tree that has these two modules, any ALSA soundcard appears that it is wrote in the wiki.

Is it necesarry to modify the device tree with some change after the hardware definition in Vivado 2019?

I attach one image of the Vivado project with only an I2s transmitter and the device tree of PL part.I2s transmitter.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

/*
* CAUTION: This file is automatically generated by Xilinx.
* Version: XSCT 2019.1
* Today is: Mon Jul 29 15:34:45 2019
*/


/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
axi_fifo_mm_s: axi_fifo_mm_s@43c00000 {
/* This is a place holder node for a custom IP, user may need to update the entries */
clock-names = "s_axi_aclk";
clocks = <&clkc 15>;
compatible = "xlnx,axi-fifo-mm-s-4.2";
interrupt-names = "interrupt";
interrupt-parent = <&intc>;
interrupts = <0 29 4>;
reg = <0x43c00000 0x10000>;
xlnx,axi-str-rxd-protocol = "XIL_AXI_STREAM_ETH_DATA";
xlnx,axi-str-rxd-tdata-width = <0x20>;
xlnx,axi-str-txc-protocol = "XIL_AXI_STREAM_ETH_CTRL";
xlnx,axi-str-txc-tdata-width = <0x20>;
xlnx,axi-str-txd-protocol = "XIL_AXI_STREAM_ETH_DATA";
xlnx,axi-str-txd-tdata-width = <0x20>;
xlnx,axis-tdest-width = <0x4>;
xlnx,axis-tid-width = <0x4>;
xlnx,axis-tuser-width = <0x4>;
xlnx,data-interface-type = <0x0>;
xlnx,has-axis-tdest = <0x0>;
xlnx,has-axis-tid = <0x0>;
xlnx,has-axis-tkeep = <0x0>;
xlnx,has-axis-tstrb = <0x0>;
xlnx,has-axis-tuser = <0x0>;
xlnx,rx-fifo-depth = <0x200>;
xlnx,rx-fifo-pe-threshold = <0x5>;
xlnx,rx-fifo-pf-threshold = <0x1fb>;
xlnx,s-axi-id-width = <0x4>;
xlnx,s-axi4-data-width = <0x20>;
xlnx,select-xpm = <0x0>;
xlnx,tx-fifo-depth = <0x200>;
xlnx,tx-fifo-pe-threshold = <0x5>;
xlnx,tx-fifo-pf-threshold = <0x1fb>;
xlnx,use-rx-cut-through = <0x0>;
xlnx,use-rx-data = <0x0>;
xlnx,use-tx-ctrl = <0x1>;
xlnx,use-tx-cut-through = <0x0>;
xlnx,use-tx-data = <0x1>;
};
i2s_transmitter_0: i2s_transmitter@43c10000 {
aud_mclk = <12288135>;
clock-names = "s_axi_ctrl_aclk aud_mclk s_axis_aud_aclk";
clocks = <&clkc 15>, <&misc_clk_0>, <&clkc 15>;
compatible = "xlnx,i2s-transmitter-1.0", "xlnx,i2s-transmitter-1.0";
interrupt-names = "irq";
interrupt-parent = <&intc>;
interrupts = <0 30 4>;
reg = <0x43c10000 0x10000>;
xlnx,depth = <0x400>;
xlnx,dwidth = <0x10>;
xlnx,num-channels = <0x1>;
};
misc_clk_0: misc_clk_0 {
#clock-cells = <0>;
clock-frequency = <12288135>;
compatible = "fixed-clock";
};
};
};

 

0 Kudos
1 Solution

Accepted Solutions
Visitor ccasanova
Visitor
8 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi all,

The solution is: 

For I2S to  work on Linux platform, also we need an audio formatter IP along with I2S, not only I2s receiver and transmitter.

Thanks @florentw  for your support.

 

0 Kudos
17 Replies
Visitor ccasanova
Visitor
304 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution
Any answer?
0 Kudos
Moderator
Moderator
281 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

HI @ccasanova

It is hard to say without knowing what changes you have done in the HW.

You might need to go throuygh each properties and see if you changed which can change them.

It is hard to give you a better answer without more information

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
276 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @florentw,

I dont understand what exactly you need.

I dont have any change in the HW, I only need an external I2S output from ZYNQ 7010, that in the linux side it must be an ALSA device.

All the IP block have the default properties.

 

Have you got any VIVADO project that i can use it to generate a Petalinux, that an I2S transmitter it will detected as an ALSA device?

 

Thanks.

0 Kudos
Moderator
Moderator
273 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

I was confuse with your message "Is it necesarry to modify the device tree with some change after the hardware definition in Vivado 2019?".

For what I understood is that you had a working design and then you modified the HW so you were asking if you had to do any change in the DT after that.

 

No I do not have a design with audio. What did you get from petalinux? I see that the i2S transmitter is in the device tree generator so I would assume you can use the petalinux flow for this. The device tree shoulkd be automatically generated


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
267 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

@florentw,

 

Sorry for the understood.

I have made a new design only for testing I2S transmitter. I have generated bitstream and the hardware definition in VIVADO 2019. Then I use both  for generating a petalinux distribution, modyfing the options in the kernel like is wrote in XILINK wiki.

The device tree i've attached is the one that petalinux generated. But Linux doesnt "see" the I2S trasnmitter like an ALSA device. I cant use it from linux.

Note: The same Vivado project used in a baremeetal project works well.

0 Kudos
Moderator
Moderator
256 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

Can you share you boot log? It might give us some tips about why linux cannot see the driver. Probalbly, the driver is not loaded properly due to some erros


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
252 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

@florentw I've attached the boot log.

0 Kudos
Moderator
Moderator
221 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

It seems that the driver is loaded. Do you see the IP under /dev?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
217 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

HI @florentw .

 

Under /dev i see this:

root@800:~# cd /dev
root@800:/dev# ls
block               loop4               mtd1ro              ram10               stderr              tty20               tty36               tty51               ttyPS0
char                loop5               mtd2                ram11               stdin               tty21               tty37               tty52               udev_network_queue
console             loop6               mtd2ro              ram12               stdout              tty22               tty38               tty53               urandom
cpu_dma_latency     loop7               mtd3                ram13               tty                 tty23               tty39               tty54               vcs
disk                mem                 mtd3ro              ram14               tty0                tty24               tty4                tty55               vcs1
fd                  memory_bandwidth    mtdblock0           ram15               tty1                tty25               tty40               tty56               vcsa
full                mmcblk0             mtdblock1           ram2                tty10               tty26               tty41               tty57               vcsa1
gpiochip0           mmcblk0p1           mtdblock2           ram3                tty11               tty27               tty42               tty58               vcsu
iio:device0         mmcblk1             mtdblock3           ram4                tty12               tty28               tty43               tty59               vcsu1
initctl             mmcblk1boot0        network_latency     ram5                tty13               tty29               tty44               tty6                vga_arbiter
kmsg                mmcblk1boot1        network_throughput  ram6                tty14               tty3                tty45               tty60               watchdog
log                 mmcblk1p1           null                ram7                tty15               tty30               tty46               tty61               watchdog0
loop-control        mmcblk1rpmb         port                ram8                tty16               tty31               tty47               tty62               zero
loop0               mtab                ptmx                ram9                tty17               tty32               tty48               tty63
loop1               mtd0                pts                 random              tty18               tty33               tty49               tty7
loop2               mtd0ro              ram0                shm                 tty19               tty34               tty5                tty8
loop3               mtd1                ram1                snd                 tty2                tty35               tty50               tty9
root@800:/dev#

 

And under /proc/device-tree i see:

root@800:/dev# cd /proc
root@800:/proc# cd device-tree
root@800:/proc/device-tree# ls
#address-cells  aliases         amba_pl         compatible      fixedregulator  memory          phy0
#size-cells     amba            chosen          cpus            fpga-full       name            pmu@f8891000
root@800:/proc/device-tree# cd amba_pl/
root@800:/proc/device-tree/amba_pl# ls
#address-cells            compatible                i2s_transmitter@43c10000  ranges
#size-cells               i2s_receiver@43c00000     name
root@800:/proc/device-tree/amba_pl#

 

0 Kudos
Moderator
Moderator
217 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

Ok so it seems to confirm that the device is here.

what did you do to test it. did you run the following command?

aplay -D hw:0,0 -f S32_LE -r 48000 -c 2 ./test.wav

Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
209 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi, @florentw 

 

I've tryed and the result is there is no soundcard in Linux.

root@800:~# aplay -D hw:0,0 -f S32_LE -r 48000 -c 2 ./test.wav
ALSA lib ../../../alsa-lib-1.1.6/src/pcm/pcm_hw.c:1820:(_snd_pcm_hw_open) Invalid value for card
aplay: main:828: audio open error: No such file or directory
root@800:~# aplay -l
aplay: device_list:272: no soundcards found...
root@800:~

 

 

 

0 Kudos
Moderator
Moderator
199 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

You tried

aplay -l

But can you try

aplay -L

I am not sure if there will be a difference but I am running out of idea of what to try...


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
178 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @florentw,

The result is:

root@800:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
root@800:~#

Maybe I've to add in the device tree a new sound card using the IP? I dont have more ideas. The steps in the wiki don't work.

0 Kudos
Visitor ccasanova
Visitor
99 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

@florentw

Any new idea about this topic? 

0 Kudos
Moderator
Moderator
62 Views
Registered: ‎11-09-2015

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi @ccasanova 

From what I can see from the drivers support page, only ZynqMPSoC is supported. Maybe the driver is not supporting Zynq-7000...

 

I2S.JPG

 

I do not have a design on Zynq-7000 I can check with


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor ccasanova
Visitor
42 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hello @florentw ,

 

Do you have contact with the two authors (xilinx employers) of the Linux driver?

Maybe is easy to modify, could you ask them? I have analysed the code of the driver and i dont see where is the limitation for not to work in a ZYNQ 7000 device.

 

Thanks.

0 Kudos
Visitor ccasanova
Visitor
9 Views
Registered: ‎03-13-2019

Re: I2S transmitter and I2S receiver with petalinux

Jump to solution

Hi all,

The solution is: 

For I2S to  work on Linux platform, also we need an audio formatter IP along with I2S, not only I2s receiver and transmitter.

Thanks @florentw  for your support.

 

0 Kudos