Connecting one talker stream to 2 listener streams

Technical questions regarding the XTC tools and programming with XMOS.
fchin
Member++
Posts: 16
Joined: Fri Jul 15, 2016 6:35 am

Connecting one talker stream to 2 listener streams

Post by fchin »

Hi,

I wanted to test whether I can connect one talker stream from one XMOS device to 2 listener streams on another XMOS device. I'm using two xCORE-200 MC audio boards. Both boards are running the AN00203_gige_avb_tdm_demo code.

Using the Riedel AVB manager, I first connected the talker stream from board A to listener stream #1 on board B, the audio was playing out successfully from the analog output jack on board B. But as soon as I connected the same talker stream to listener stream #2, the audio from listener stream #1 stopped. Riedel AVB manager showed that both listener streams are connected.

I'm wondering whether this is a bug or it's not a valid use case. Thanks.


User avatar
Thomas
Experienced Member
Posts: 66
Joined: Fri Feb 05, 2010 12:34 pm

Post by Thomas »

I would like to clarify terminology.
A stream is sent by a Talker and received by a Listener.
An AVB Endpoint running AN00203_gige_avb_tdm_demo has a Talker and a Listener.

So betweeen two Endpoints running AN00203_gige_avb_tdm_demo (let's call them EP0 and EP1), two streams can be connected:
EP0 Talker -> EP1 Listener
EP1 Talker -> EP0 Listener
So this is a bidirectional stream connection between EP0 and EP1.

Connecting and disconnecting these streams should work fine using the Riedel AVB Manager.
Another 1722.1 controller that can be used is avdecccmdline
User avatar
Thomas
Experienced Member
Posts: 66
Joined: Fri Feb 05, 2010 12:34 pm

Post by Thomas »

Commands for connecting streams between two Endpoints using an External 1722.1 Controller (Default)
Including the resulting message trace from the two Endpoints EP0 and EP1.

Note:
- avdecccmdline connect commands (denoted with $) are executed on the controller and apply to both endpoints
- If the 1722.1 controller runs on a Mac, AVB/EAV must be disabled (In Network Preferences->Hardware) or the native OSX 1722.1 controller will interfere.
- The clock source of one of the Endpoints has to be set to LOCAL_CLOCK. The other Endpoint will recover it’s audio clock from that (INPUT_STREAM_DERIVED)

EP0:
xrun --xscope --adapter-id uzB_a0hi bin/AN00202_gige_avb_i2s_demo.xe
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
PTP Port 0 Role: Master
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)
MAAP reserved Talker stream #0 address: 91:E0:F0:0:BD:A7
PTP Port 0 Role: Master
PTP Port 0 Role: Slave
PTP sync locked
Joined SRP domain (VID 2, port 0)
Joined SRP domain (VID 2, port 0)

// stops here. The following trace is after the external 1722.1 controller (avdecc) connects stream from EP1 to EP0
// avdecc commands are inline starting with $

$ select 0x002297fffe8003f4 0 0
$ set clock_source CLOCK_DOMAIN 0 1
Setting clock source: LOCAL_CLOCK

$ connect 0x002297fffe8003f4 0 0x002297fffe8003f0 0
CONNECTING Talker stream #0 (2297803F40000) -> Listener 0:22:97:FF:FE:80:3:F0
MSRP: Register stream request 229780:3F40000
Added stream:
ID: 2297803F40000
DA:91:E0:F0:0:BD:A7:
max size: 800
interval: 1
MVRP: Joined VID 2
Talker stream #0 ready
Increasing port 0 shaper bandwidth to 53888000 bps
Talker stream #0 on

// stops here. The following trace is after the external 1722.1 controller (avdecc) connects stream from EP0 to EP1
// avdecc commands are inline starting with $
$ connect 0x002297fffe8003f0 0 0x002297fffe8003f4 0

CONNECTING Listener sink #0 -> Talker stream 2297803F00000, DA: 91:E0:F0:0:71:0
Listener sink #0 chan map:
0 -> 0
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> 5
6 -> 6
7 -> 7
MSRP: Register attach request 229780:3F00000
Added stream:
ID: 2297803F00000
MVRP: Joined VID 2
Added stream:
ID: 2297803F00000
DA:91:E0:F0:0:71:0:
max size: 800
interval: 1
Media output 0 locked: 123 samples shorter
Media output 1 locked: 123 samples shorter
Media output 2 locked: 123 samples shorter
Media output 3 locked: 123 samples shorter
Media output 4 locked: 123 samples shorter
Media output 5 locked: 123 samples shorter
Media output 6 locked: 123 samples shorter
Media output 7 locked: 123 samples shorter

EP1:
xrun --xscope --adapter-id fIfPVZ2R bin/AN00202_gige_avb_i2s_demo.xe
PTP Port 0 Role: Master
Setting clock source: INPUT_STREAM_DERIVED
PTP Port 0 Role: Master
Joined SRP domain (VID 2, port 0)
PTP Port 0 Role: Master
MAAP reserved Talker stream #0 address: 91:E0:F0:0:71:0
PTP Port 0 Role: Slave
PTP sync locked

// stops here. The following trace is after the external 1722.1 controller (avdecc) connects stream from EP1 to EP0
// avdecc commands are inline starting with $

$ connect 0x002297fffe8003f4 0 0x002297fffe8003f0 0
CONNECTING Listener sink #0 -> Talker stream 2297803F40000, DA: 91:E0:F0:0:BD:A7
Listener sink #0 chan map:
0 -> 0
1 -> 1
2 -> 2
3 -> 3
4 -> 4
5 -> 5
6 -> 6
7 -> 7
MSRP: Register attach request 229780:3F40000
Added stream:
ID: 2297803F40000
MVRP: Joined VID 2
Added stream:
ID: 2297803F40000
DA:91:E0:F0:0:BD:A7:
max size: 800
interval: 1
Media output 0 locked: 122 samples shorter
Media output 1 locked: 122 samples shorter
Media output 2 locked: 122 samples shorter
Media output 3 locked: 122 samples shorter
Media output 4 locked: 122 samples shorter
Media output 5 locked: 122 samples shorter
Media output 6 locked: 122 samples shorter
Media output 7 locked: 122 samples shorter

// stops here. The following trace is after the external 1722.1 controller (avdecc) connects stream from EP0 to EP1
// avdecc commands are inline starting with $
$ connect 0x002297fffe8003f0 0 0x002297fffe8003f4 0

CONNECTING Talker stream #0 (2297803F00000) -> Listener 0:22:97:FF:FE:80:3:F4
MSRP: Register stream request 229780:3F00000
Added stream:
ID: 2297803F00000
DA:91:E0:F0:0:71:0:
max size: 800
interval: 1
MVRP: Joined VID 2
Talker stream #0 ready
Increasing port 0 shaper bandwidth to 53888000 bps
Talker stream #0 on
fchin
Member++
Posts: 16
Joined: Fri Jul 15, 2016 6:35 am

Post by fchin »

Hi Thomas,

Thanks for the example for making bidirectional stream connection between EP0 and EP1. However this is not what I wanted to achieve.

My experiment is to find out what would happen if connecting 1 talker stream of EP0 to 2 listener streams of EP1. What I did was:
- Audio was fed to LINE IN channel 1 of EP0.
- Speaker was connected to LINE OUT channel 1 of EP1.
- Connected talker stream index 0 of EP0 to listener stream index 0 of EP1. Audio was playing out from the speaker.
- Connected talker stream index 0 of EP0 to listener stream index 1 of EP1. The audio stopped playing.

I understand this might not be a valid use case because it is redundant for EP1 to receive the same stream twice using two listener streams. But since AVDECC controller allows me to do that, I believe the end point devices should still work as commanded.

What's your thought? Thanks.