AVB Daisy Chain Settings

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
wtj104
Junior Member
Posts: 4
Joined: Thu Aug 28, 2014 1:04 pm

AVB Daisy Chain Settings

Post by wtj104 »

I have a few AVB-DC dev kits. If I connect them running the default demo software, I can view and control connections between endpoints with the avcdecc command line software. I can also use a connected MacBook to use each AVB endpoint as an audio input or output device.

I wanted to modify the demo to do 2 x stereo ins and 2 x stereo outs from each endpoint (instead of the default 1 x 4ch in, 1 x4ch out).

In avb_conf.h, I edited:

Code: Select all

line 39: #define AVB_NUM_SOURCES 2
line 61: #define AVB_NUM_SINKS 2
With this configuration, avcdecccmdline shows the 2 sinks and 2 sources, and I can make connections between them, but it can't pass audio in from one endpoint to the out of another. The Mac Audio MIDI setup tool still shows the endpoint but lists it as "4in/4out" and when set up as an input, there is no audio activity shown on the sound settings VU meter.

I'm not fully understanding the flow of code for how the audio CODEC ports get mapped to channels/streams/talkers and I've obviously missed something else that needs to be modified. Any help would be appreciated!


User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Hi wtj104,

Can you post the output from running the firmware with XScope enabled when you make a connection using avdecccmdline?

You can run multiple binaries from the terminal using

Code: Select all

xrun --id 0 --xscope binary_name.xe
xrun --id 1 --xscope binary_name.xe
etc
wtj104
Junior Member
Posts: 4
Joined: Thu Aug 28, 2014 1:04 pm

Post by wtj104 »

Andy wrote:Hi wtj104,

Can you post the output from running the firmware with XScope enabled when you make a connection using avdecccmdline?
Hmm... that raises a new problem. When I use xrun with the --xscope switch it just hangs:

Code: Select all

xrun --id 0 --xscope --verbose app_daisy_chain.xe
0x00010000 in _start ()
Loading setup image to XCore 0
Loading section .text, size 0x308 lma 0x10000
Loading section .cp.rodata, size 0x24 lma 0x10308
Loading section .dp.data, size 0x24 lma 0x1032c
Start address 0x10000, load size 848
Transfer rate: 165 KB/sec, 282 bytes/write.
Enable xscope on core 0 at address 0x10348
Loading setup image to XCore 1
Loading section .text, size 0x2cc lma 0x10000
Loading section .cp.rodata, size 0x24 lma 0x102cc
Loading section .dp.data, size 0x20 lma 0x102f0
Start address 0x10000, load size 784
Transfer rate: 153 KB/sec, 261 bytes/write.
Enable xscope on core 1 at address 0x10308
First stage multi-node boot started
First stage multi-node boot completed
Loading application image to XCore 0
Loading section .text, size 0x8e92 lma 0x10000
Loading section .init, size 0x98 lma 0x18e92
Loading section .fini, size 0x3a lma 0x18f2a
Loading section .text._i.avb_interface._chan._get_source_info, size 0x54 lma 0x18f64
Loading section .text._i.avb_interface._chan._set_media_clock_info, size 0x54 lma 0x18fb8
Loading section .text._i.avb_interface._chan._set_sink_info, size 0x58 lma 0x1900c
Loading section .text._i.avb_interface._chan._set_source_info, size 0x58 lma 0x19064
Loading section .text._i.avb_interface._chan.initialise, size 0x24 lma 0x190bc
Loading section .text.xscope_user_init, size 0x4 lma 0x190e0
Loading section .text._i.avb_interface._chan._get_sink_info, size 0x54 lma 0x190e4
Loading section .text._i.avb_interface._chan._get_media_clock_info, size 0x38 lma 0x19138
Loading section .text._cleanup_impl, size 0x4 lma 0x19170
Loading section .text.__call_exitprocs_impl, size 0x4 lma 0x19174
Loading section .rodata, size 0x4 lma 0x19178
Loading section .eh_frame, size 0x88 lma 0x1917c
Loading section .cp.rodata, size 0x8 lma 0x19204
Loading section .cp.const4, size 0x8 lma 0x1920c
Loading section .cp.rodata.cst4, size 0x198 lma 0x19214
Loading section .ctors, size 0x64 lma 0x193ac
Loading section .dtors, size 0x5c lma 0x19410
Loading section .dp.data, size 0xb00 lma 0x1946c
Loading section .dp.rodata, size 0x625 lma 0x19f6c
Start address 0x10000, load size 42385
Transfer rate: 158 KB/sec, 1926 bytes/write.
Enable xscope on core 0 at address 0x19f64
Loading application image to XCore 1
Loading section .text, size 0x6582 lma 0x10000
Loading section .init, size 0x98 lma 0x16582
Loading section .fini, size 0x3a lma 0x1661a
Loading section .text._i.media_clock_if._chan.get_clock_info, size 0x38 lma 0x16654
Loading section .text._i.media_clock_if._chan.register_clock, size 0x28 lma 0x1668c
Loading section .text._i.media_clock_if._chan.set_buf_fifo, size 0x2c lma 0x166b4
Loading section .text._i.media_clock_if._chan.set_clock_info, size 0x54 lma 0x166e0
Loading section .text.xscope_user_init, size 0x4 lma 0x16734
Loading section .text._cleanup_impl, size 0x4 lma 0x16738
Loading section .text.__call_exitprocs_impl, size 0x4 lma 0x1673c
Loading section .rodata, size 0x4 lma 0x16740
Loading section .eh_frame, size 0x68 lma 0x16744
Loading section .cp.rodata, size 0x8 lma 0x167ac
Loading section .cp.const4, size 0x8 lma 0x167b4
Loading section .cp.rodata.cst4, size 0xe4 lma 0x167bc
Loading section .ctors, size 0x68 lma 0x168a0
Loading section .dtors, size 0x60 lma 0x16908
Loading section .dp.data, size 0x150 lma 0x16968
Loading section .dp.rodata, size 0x829 lma 0x16ab8
Start address 0x10000, load size 29409
Transfer rate: 157 KB/sec, 1547 bytes/write.
Enable xscope on core 1 at address 0x16ab0
Last edited by wtj104 on Tue Sep 02, 2014 8:58 pm, edited 1 time in total.
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Is the switch labelled 'XMOS LINK' on the PCIe <-> XSYS board (XA-SK-XTAG2) set to the ON position?
wtj104
Junior Member
Posts: 4
Joined: Thu Aug 28, 2014 1:04 pm

Post by wtj104 »

The switch is in the "off" position.

[edit]
Got it- the switch needs to be in the "on" position to enable XScope, and "off" position to send those I/Os to the Star connector on the SliceKit, correct?

Anyway... things seem to magically work now as I had expected. I can make connections between two kits with the avdecccmdline utility.

One additional question:
Can you make connections from one source on an endpoint to multiple sinks on another endpoint(s)?

for example:
connect 0 0 1 0 -- this works, but then
connect 0 0 1 1 -- this makes the new connection and seems to disconnect the previous one?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

wtj104 wrote: Can you make connections from one source on an endpoint to multiple sinks on another endpoint(s)?
Unfortunately this isn't currently supported in the reference design. It's all open source though - so please feel free to add/modify as needed.