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: 
Highlighted
Observer ptg
Observer
539 Views
Registered: ‎05-07-2018

USB Audio Class is broken on DWC3, ZynqMP

Jump to solution

I'm connecting USB Mic to ZynqMP but can't get clear sound.
It sounds like noisy, high speed around x1.5 and totally broken.

I suspect that isochronous transmission is going wrong so then I added usbmon in Linux kernel and got USB frames which contains exactly same broken sound samples. They're broken in lower level. I also tried playing sound (opposite to mic) on USB DAC but it's also broken. The sound is really slow and broken. I think the cause is related to clock or timing generation of isoc transmission.

There are some quirks and workarounds in device tree but I don't know what to do with them. The property values are like example tree on the internet.

                usb0@ff9d0000 {
                        #address-cells = <0x2>;
                        #size-cells = <0x2>;
                        status = "okay";
                        compatible = "xlnx,zynqmp-dwc3";
                        reg = <0x0 0xff9d0000 0x0 0x100>;
                        clock-names = "bus_clk", "ref_clk";
                        power-domains = <0x32>;
                        ranges;
                        nvmem-cells = <0x21>;
                        nvmem-cell-names = "soc_revision";
                        clocks = <0x3 0x20 0x3 0x22>;
                        xlnx,usb-reset = <0x2faf080>;
                        pinctrl-names = "default";
                        pinctrl-0 = <0x33>;

                        dwc3@fe200000 {
                                compatible = "snps,dwc3";
                                status = "okay";
                                reg = <0x0 0xfe200000 0x0 0x40000>;
                                interrupt-parent = <0x4>;
                                interrupts = <0x0 0x41 0x4 0x0 0x45 0x4 0x0 0x4b 0x4>;
                                #stream-id-cells = <0x1>;
                                iommus = <0x9 0x860>;
                                snps,quirk-frame-length-adjustment = <0x20>;
                                snps,refclk_fladj;
                                snps,enable_guctl1_resume_quirk;
                                snps,enable_guctl1_ipd_quirk;
                                snps,xhci-stream-quirk;
                                maximum-speed = "high-speed";
                                snps,dis_u2_susphy_quirk;
                                snps,dis_u3_susphy_quirk;
                                dr_mode = "host";
                        };
                };

Do I have to modify them or apply some patches to make the ADC/DAC work? Is there anyone who successfully connected USB Mic ?

Thanks,

Takumi

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Observer ptg
Observer
440 Views
Registered: ‎05-07-2018

Re: USB Audio Class is broken on DWC3, ZynqMP

Jump to solution

@aravindb I'm trying to connect a mic to ZynqMP, not a USB gadget thing. ZynqMP is the host. Vivado which I'm using is 2018.2.

I've found a solution to this problem finally.

The related AR is AR# 70625 2017.3-2018.1 Zynq UltraScale+ MPSoC: How to get a USB 2.0 standard interface working in PetaLinux .

This says that we have to remove `ref_clk` values from `clock-names` and `clocks`  and add some quirks.
Vivado 2018.2 doesn't remove ref_clk while it adds quirks correctly.

The USB mic and others which transfers in isochronous mode are working well after I remove ref_clk value from usb0@ff9d0000 and usb1@ff9e0000.
We must remove ref_clk from all usb node to make it work.

Has this issue already be patched in 2018.3? Anyway if someone suffer this on 2018.2 I hope this helps.

2 Replies
Moderator
Moderator
461 Views
Registered: ‎02-07-2018

Re: USB Audio Class is broken on DWC3, ZynqMP

Jump to solution

HI @ptg 

USB audio class is  verified in 2018.2, Please use below device tree chnages. It should work.

What is the software version you are using. My recomondation please use latest 2018.3 SW to avoid any issues as this is stable release.

vim project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

/include/ "system-conf.dtsi"
/ {
};

/* USB-2.0 Peripheral mode */
&dwc3_0 {
status = "okay";
dr_mode = "peripheral";
/delete-property/ dma-coherent;
/delete-property/ snps,usb3_lpm_capable;
maximum-speed = "high-speed";
};

 

Let me know the update once you have verified.

 

Thanks & ergards

Aravind

0 Kudos
Observer ptg
Observer
441 Views
Registered: ‎05-07-2018

Re: USB Audio Class is broken on DWC3, ZynqMP

Jump to solution

@aravindb I'm trying to connect a mic to ZynqMP, not a USB gadget thing. ZynqMP is the host. Vivado which I'm using is 2018.2.

I've found a solution to this problem finally.

The related AR is AR# 70625 2017.3-2018.1 Zynq UltraScale+ MPSoC: How to get a USB 2.0 standard interface working in PetaLinux .

This says that we have to remove `ref_clk` values from `clock-names` and `clocks`  and add some quirks.
Vivado 2018.2 doesn't remove ref_clk while it adds quirks correctly.

The USB mic and others which transfers in isochronous mode are working well after I remove ref_clk value from usb0@ff9d0000 and usb1@ff9e0000.
We must remove ref_clk from all usb node to make it work.

Has this issue already be patched in 2018.3? Anyway if someone suffer this on 2018.2 I hope this helps.