Author Topic: usb device not working with ehci controllers  (Read 17599 times)

danwaqar

  • Member
  • ***
  • Posts: 16
usb device not working with ehci controllers
« on: April 21, 2021, 01:30:59 am »
my custom usb device, the device uses standard usb3320 phy chip. device has hid and audio interfaces works fine on various hosts that has xhci controllers. but with older laptops and PCs with ehci controllers device fails to work. enumerates fine, the hid interface works but the audio streaming interface doesnt work. i dont know what the problem is. please guide

bpaddock

  • Frequent Contributor
  • ****
  • Posts: 66
Re: usb device not working with ehci controllers
« Reply #1 on: April 21, 2021, 08:02:52 am »
In the early days of AVRs with USB I ran into something similar.
These AVRs worked fine with Intel based chipset hubs and did not work at all with NEC chipset based hubs.
At the time I had a PC that had both on the motherboard.

Pure speculation, is this USB part based on those AVRs?


My solution was to not use those parts.
Probably not what you want to hear.

danwaqar

  • Member
  • ***
  • Posts: 16
Re: usb device not working with ehci controllers
« Reply #2 on: April 21, 2021, 10:55:08 am »
no this is based on Xilinx Zynq MP, which incorporates a FPGA and several ARM MP cores. To be specific a ARM R5 is involved along with Xilinx FPGA here.

bpaddock

  • Frequent Contributor
  • ****
  • Posts: 66
Re: usb device not working with ehci controllers
« Reply #3 on: April 21, 2021, 11:00:15 am »
Sorry I was unclear I meant that the usb3320  may be based on the broken AVR USB being that they are both from Microchip.
As I said that is pure speculation on my part.

danwaqar

  • Member
  • ***
  • Posts: 16
Re: usb device not working with ehci controllers
« Reply #4 on: April 23, 2021, 05:43:08 pm »
so i found the problem/possible solution but now it has created a new chicken and egg problem for me.
So this problem related to binterval value in the descriptors. as earlier mentioned the HID interface works fine. the problem is only with when connecting to different USB host controllers and streaming audio. IN/OUT endpoints  for microphone speaker streaming.

This is what is working   Speed (High)      binterval value (04)   for both speaker and microphone      works fine
                                    Speed (Full)       binterval value (01)   for both speaker and microphone      works fine

But on some host machines running linux and having ehci as USB controller on these hosts only following configuration is working
                                    Speed (High)      binterval value (04)   for microphone    and       binterval value (01)   for speaker     works fine

in the FW i am changing the binterval based on decision making with respect to current speed at which device is connected with host. for this special scenario with ehci controllers what should i do? anyway i can check which host i am connected to other than the speed? or what  is wrong in my setup?
« Last Edit: April 28, 2021, 12:20:48 pm by danwaqar »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: usb device not working with ehci controllers
« Reply #5 on: April 28, 2021, 10:43:13 am »
The device could provide an alternate setting, assuming the host drive has a way to select it.

This is Windows but Linux should have similar capability

https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/select-a-usb-alternate-setting

danwaqar

  • Member
  • ***
  • Posts: 16
Re: usb device not working with ehci controllers
« Reply #6 on: April 28, 2021, 12:17:25 pm »
Jan

Thanks for the reply. can you please elaborate this anamoly in binterval is normal or the host/device are behaving out of USB spec?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: usb device not working with ehci controllers
« Reply #7 on: April 30, 2021, 09:03:29 am »
Alternate settings provide a way to enumerate and communicate with a device when the maximum desired bandwidth isn't available. But that's not what you're seeing. I'm not aware of anything in the specifications that would prohibit it however

danwaqar

  • Member
  • ***
  • Posts: 16
Re: usb device not working with ehci controllers
« Reply #8 on: February 18, 2022, 11:15:36 am »
Restarting this thread again.

I am unable to figure out 1 piece of information that may be solution to my problem.

Does the host machine at any point during the enumeration process shares either of the following information to the end usb device?

1. INTERVAL (binterval value) which is polling rate for isochronous endpoints
2. usb contoller information. can the usb find out with the information coming from the host it is connected to xhci or ehci controller?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: usb device not working with ehci controllers
« Reply #9 on: February 23, 2022, 10:16:13 pm »
no to both, the device should be designed to function without knowing this information.

An exception is that the host will refuse to configure an interface if the host can't provide the requested interval.