Dual USB audio sources i2s

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
wizzo
Newbie
Posts: 1
Joined: Fri Sep 25, 2015 1:55 am

Dual USB audio sources i2s

Postby wizzo » Fri Sep 25, 2015 2:04 am

Hello all,


I have a project im trying to accomplish. I am new user and are learing about i2s, although Im a novice, I have lots of experience with audio design and serial communication protocols.

My question is, Im still unclear on the features that i2s has as a protocol. My goal is to have an audio interface with two USB inputs. These inputs will be connected to 2 different computers.


Those 2x USB-i2s adapter will feed a DAC/DSP with 4x4 inputs/outputs available for i2s.

The way i understand i2s is a bus protocol with 3 wires, 2 for clock and 2 for multiplex data....


In theory I can take the clock signals (master would be DAC/DSP) and sync both USB-i2s cards and then feed audio that I can output through my main stereo pair... simple right?


I realize there might be a few pieces im missing but my goal is simple i want a dual USB interface that can handle 2 digital audio signals that can be fed into a DSP/DAC input these would then be routed to an analog output for play back...


I appreciate anyones help guidance and time...
You do not have the required permissions to view the files attached to this post.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Postby Bianco » Fri Sep 25, 2015 10:37 am

I removed your second (duplicate) topic.
User avatar
tuck1s
Active Member
Posts: 32
Joined: Thu Sep 25, 2014 1:19 am

Postby tuck1s » Fri Sep 25, 2015 2:10 pm

Hi, I2S and USB are very different protocols. I2S is (as you say) a simple serial protocol with a bit clock, a word clock (sometimes called LRCLK because it's used to indicate Left / Right channel assignments in pure stereo situations) and a data line. Many DACs can accept I2S directly - diyaudio.com is a good source of information on the design choices available there.

USB is a multi-purpose protocol. I have not delved into it deeply, but the data formatting, framing etc are I believe very different. There are existing libraries for XMOS devices to support USB-to-I2S bridging - in fact there's a simple "reference headphone DAC" design that is definitely worth a look.

Xmos can support USB protocol natively but for high speed use, a separate PHY chip is often used.

What is very unusual about your request, is to have the system slaved to TWO USB ports. Why is that? USB is fast enough to carry multi-channel audio over a single port.
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Tue Sep 29, 2015 10:13 am

This is certainly feasible. I'm guessing that the goal of this is to allow two different audio sources on two different hosts to play through the same audio device?

This does make sense and the fact that the USB Audio ref design uses asynch mode (master clock local to audio device) means that this concept should work.

The main challenge here is instantiating 2x USB devices. I assume a single chip is desirable. Our XU224/232 devices have 2x USB PHYs included although you could potentially use an L16 with 2 x external ULPI PHYs.

However, the IP today assumes a single instance, so some work needs to be done to make those rentrant , i.e. allow two to be instantiated in the same system.

There has been some internal skunkworxy work to prove this is possible, but no product development yet.

Because it represents a fair chunk of work, there are two options. 1) Work with XMOS to help us prioritise the development of dual USB IP (will need commercial justification of course) or 2) have a go yourself.

1) is best approached via your regional sales/FAE contact and 2) can be done with some pointers here, but is certainly several weeks work..
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Postby dweeb4 » Thu Jan 14, 2016 1:34 am

I'm interested in this concept but for a somewhat different reason than the o/p - I want to read in high-speed USB signal using a USB transceiver over ULPI into an XMOS chip & I want to output this USB high-speed signal via ulpi to a different USB transceiver.

I see the XU224 datasheet states that the USB phy should not be enabled on both tiles. From what you say, I take it that this is a software limitation rather than hardware? Would that be correct? Are there any hardware limitations that prevent handling two high-speed (480Mbps) USB signals in XMOS chips? I've read that ulpi in XMOS is hardware assisted.

Can you say what the thinking is behind having 2 ULPI interfaces in some XMOS chips but only being able to use one?
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Thu Jan 14, 2016 6:48 pm

The XU224 datasheet is perhaps a bit misleading here. The statement is true for two tiles on a node - one one set of USB HW exists per node. The XU224 actually has two nodes, one containing one tile and the other two. So yes it does have 2x USB PHYs and consequently hardware-wise, it meets the requirement.

There is some HW assistance inside - however in the XU… family it’s all hidden inside. All you see is D+ and D- come out.

The remaining issue is the driver that will support two instances of USB Device, due to globals in the library. It has been done experimentally and works (basic implementation by re-naming stuff), but is not officially supported yet. Do you have an XMOS commercial contact to discuss this with?
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Postby dweeb4 » Fri Jan 15, 2016 2:58 am

infiniteimprobability wrote:The XU224 datasheet is perhaps a bit misleading here. The statement is true for two tiles on a node - one one set of USB HW exists per node. The XU224 actually has two nodes, one containing one tile and the other two. So yes it does have 2x USB PHYs and consequently hardware-wise, it meets the requirement.

There is some HW assistance inside - however in the XU… family it’s all hidden inside. All you see is D+ and D- come out.

The remaining issue is the driver that will support two instances of USB Device, due to globals in the library. It has been done experimentally and works (basic implementation by re-naming stuff), but is not officially supported yet. Do you have an XMOS commercial contact to discuss this with?
Excellent - thanks for the answer.
No, I don't have an XMOS commercial contact to discuss with - how do I go about establishing this?
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Mon Jan 18, 2016 7:22 am

Hi - Commercial contacts can be found here:

https://www.xmos.com/contact/distributors
dweeb4
Active Member
Posts: 52
Joined: Mon Jan 19, 2015 12:47 pm

Postby dweeb4 » Tue Jan 19, 2016 2:45 am

Thanks!
asjwood
Newbie
Posts: 1
Joined: Tue Aug 11, 2020 3:27 pm

Postby asjwood » Wed Aug 19, 2020 4:22 pm

We're in the process of creating a new design based on the XU224. We'd like to enable both USB PHYs so we can support synchronous input and output at different sample rates (in the same family) for example 96k in and 48k out.

Initially after reading this thread, I was hopeful that I might be able to modify the USB audio reference code to accomplish this.

However, as far as I can tell, lib_xud has been compiled with the assumption that there is a single usb_tile and so having tileref usb_tile[2] in the .xn causes the following linker errors

Code: Select all

: Error: Type of symbol `usb_tile’ has mismatch with previous definition:
found: `tileref usb_tile[2]’ in file `’
previous: `tileref usb_tile’ in file `../libsrc/XUD_Manager.xc’
: Error: Type of symbol `usb_tile’ has mismatch with previous definition:
found: `tileref usb_tile[2]’ in file `’
previous: `tileref usb_tile’ in file `../libsrc/XUD_SetDevAddr.xc’
: Error: Type of symbol `usb_tile’ has mismatch with previous definition:
found: `tileref usb_tile[2]’ in file `’
previous: `tileref usb_tile’ in file `../libsrc/XUD_PowerSig.xc’
: Error: Type of symbol `usb_tile’ has mismatch with previous definition:
found: `tileref usb_tile[2]’ in file `’
previous: `tileref usb_tile’ in file `../libsrc/XUD_DeviceAttach.xc’
: Error: Type of symbol `usb_tile’ has mismatch with previous definition:
found: `tileref usb_tile[2]’ in file `’
previous: `tileref usb_tile’ in file `../libsrc/XUD_TestMode.xc’

I raised a support ticket with XMOS hoping they might be able to send me an alternative version of lib_xud (as this thread hints that this code does exist...) or at least tell me if the newer lib_usb doesn't have this limitation.

Can anyone here help?

Who is online

Users browsing this forum: No registered users and 3 guests