how to choose which avb audio samples go to tdm

If you have a simple question and just want an answer.
Post Reply
cccuser
Junior Member
Posts: 7
Joined: Wed Aug 11, 2021 7:28 pm

how to choose which avb audio samples go to tdm

Post by cccuser »

i have modified modified the avb_conf.h to create 1 listener and 1 talker. i have set this design to use 32 channels/stream. this design like the XC 216 devboard has 8 analog outputs.

i want to be able to select which of the 32 channels' samples go to the 8 analog output channels

1. how do i know which samples end up on output analog channels?
2. can i just wait til the send event in and move the samples between the frame->samples member
im stuck on how to track how these channels end up in dout.


fabra
Active Member
Posts: 35
Joined: Sat May 09, 2020 4:20 pm
Contact:

Post by fabra »

Hi!

Yes, it's a bit tricky to follow the audio route. Please take a look at avb.h:

/** Set the map of an AVB sink.
*
* Sets the map i.e. the mapping from the 1722 stream to output FIFOs.
*
* This setting will take affect immediately.
*
* \param i interface to AVB manager
* \param sink_num the number of the sink
* \param map array containing the media output FIFOs that the
* stream will be split into
* \param len the length of the map; should equal to the number
* of channels in the stream
*/
static inline int set_sink_map(
client interface avb_interface i,
unsigned sink_num,
int map[len],
unsigned len)

You can use set_sink_map/set_source_map to modify the routing.

Best,
Fabian
Post Reply