This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PurePath "2+1 audio channels" system



Dear, TI Community.
I would like to ask 3 questions

1. As I suppose CC853x can transmit 3 audio channels without compression. Does it mean that I can transmit any type of data without any changes using CC853x?

2.  Let's suppose there is 1 USB Master and 1 Slave. Three channels audio data come from PC through USB  and Master sends them to Slave. On the Slave I would like to separate recieved data in  two directions: 2 of 3 channels have to be sended to stereo codec (e.g. AIC3204) and third channel have to be sended to a uC (MCU). MCU have to recieve and process 3d-channels data. This data can contain control command for MCU and some other information(data). For example MCU can switch on/off leds connected to his pins. Is it possible to create such "2+1 system" (using CC85xx)?

3.(Independent of 2 previous questions) Let's suppose there are 2 PPW networks. Both networks consist of 1 Master and 1 Slave. But 1st Master transmits two audio channels and 2nd Master transmits three audio channel (all channels without compression). I would like to transmit 5-channel WAV through USB to two this Slaves. I suppose that both Masters have to be synchronized for no delay (advance) between different channels during playback. Is it possible to synchronize two CC85xx Masters on hardware level or I have to try to do it with PC soft?

Sincerely, Igor

  • Hi Igor,

    I hope this answers your questions:

    1. It is possible to transmit any type of data using the CC85xx. It is, however, not recommended since there are some features of the transmission that are specially design for audio. There are e.g. a built in error correction that creates replacements for lost audio slices. If you use the CC85xx to transmit other types of data than audio you may receive “replaced” data which will not be the same as the transmitted data.

    2. Generally there is nothing wrong with sending the I2S data to more than one device. In your case on the slave side WCLK, BCLK, MCLK and ADx pins will be driven by the CC85xx, and it should be no problem having both a codec and another device “listening” to this.
    For a non-USB setup with a host-controlled master and a host-controlled slave, there is a possibility to have a data side-channel, besides the two audio channels, with a throughput of 100 kbps to use e.g. for MCU control commands

    3. Non-USB masters can be synchronized through “timeslot alignment”. This is a wire-based synchronization which makes the different masters to perform e.g. RX and TX simultaneously. There is, however, no feature that allows you to do this synchronization if you use USB masters.

    Best Regards

    Johan

  • HI Johan,


    Thank you for your answers and useful keywords.
    Could you help me to understand how and what I should configure (in Configurator) for sending I2S data to 2 devices? Could you give me keywords or links about that?
    Can I find somewhere desriptor for 3-channel USB audio system? Looks lIke there is no example for 3 channel in PPW Configurator folder.


    Sincerely, Igor

  • Hi,

    to send data to two different devices you can select which Audio IO you use to output the received channels. In the picture below are two channels outputted on the AD1 IO and the third channel is outputted in the AD0 IO, this configuration is done in the "Audio Streaming" panel. If you connect two different devices to one of the ADx pins each, you can select which channels to stream to which device.

     

    There is no ready-made 3-channel USB descriptor , so you have to create your own descriptor file , *.ppwudd.
    If you compare the included descriptors "standard_output.ppwudd" with the "quadraphonic_output.ppwuud" you can see the differences between a 2 channel and 4 channel USB soundcard descriptor. Use one of these to modify the differences to create a 3-channel descriptor. I think changes below should be a good start:

    <input_count>2</input_count>                                                             => 3
    <input_location_list>Left front,Right front</input_location_list>    => +1
    <control_spec>03 00 00</control_spec>                                           => 03 00 00 00
    <channel_count>2</channel_count>                                                  => 3
    <max_packet_size>200</max_packet_size>                                    => Increase to ~300 

    Best Regards,
    Johan

  • HI Johan,

    I compared 4 existing examples using a VBA macros. I have found 23 deference points (strings) in these 4 files. I tried to understand what does this parameters mean but I have much questions.  Could you help me to understand may be just some of them.

    This is a list of differences with some notices and ideas. (Number in the beginning of string is a number of row in descriptor files.)

     

    15        <name>         HT1 Headphone         </name>                   

    15        <name>         Quadraphonic output </name>                   

    15        <name>         Standard output          </name>                   

    15        <name>         Standard output 24-bit           </name>       

    PPWConfigurator->Device Configuration Panel->Configuration Type->USB descriptor.

    But also this string is the name of descriptor file .ppwudd.

    String in list.

    Just any string.

    I will use <name>      Triplephonic output </name>

     

     

    16        <desc>           Basic Audio Class Headphone Topology 1 (HT1)    </desc>                     

    16        <desc>           USB quadraphonic soundcard          </desc>                     

    16        <desc>           Standard descriptor for 16-bit USB soundcard         </desc>                     

    16        <desc>           Standard descriptor for 24-bit USB soundcard         </desc>

    Looks like this string is used in application role files .ppward. Isn’t?

    I will use <desc>        USB Triplephonic soundcard         </desc>

     

                           

     

    18        <application_role_list>         Stereo headphone USB soundcard    </application_role_list>                   

    18        <application_role_list>         4ch speaker USB soundcard  </application_role_list>                   

    18        <application_role_list>         Stereo speaker USB soundcard,Stereo headphone USB soundcard            </application_role_list>                   

    18        <application_role_list>         Stereo speaker USB soundcard,Stereo headphone USB soundcard            </application_role_list>                   

    PPWConfigurator->Device Configuration Panel->Configuration Type->Application Role List.

    String in list.

    Just any string.

    Notice. Actually , looks like, that it means in witch application role this descriptor can be used. But what it means that I can use different descriptors for one application? What is the difference between using "HT1 Headphone" descriptor for "Standard output" descriptor for "Stereo headphone USB sound card" application.

    I will use <application_role_list>    3ch speaker USB soundcard           </application_role_list>       

     

    19        <sample_rate_list>    48000  </sample_rate_list>              

    19        <sample_rate_list>    32000,44100,48000   </sample_rate_list>              

    19        <sample_rate_list>    32000,44100,48000   </sample_rate_list>              

    19        <sample_rate_list>    32000,44100,48000   </sample_rate_list>  

    I will use <sample_rate_list>           32000,44100,48000   </sample_rate_list>              

     

    20        <sample_resolution> 16        </sample_resolution>                      

    20        <sample_resolution> 16        </sample_resolution>                      

    20        <sample_resolution> 16        </sample_resolution>                      

    20        <sample_resolution> 24        </sample_resolution>                       

    I will use<sample_resolution>         16        </sample_resolution>          

     

    21        <m2s_channel_list>  Left front,Right front   </m2s_channel_list>            

    21        <m2s_channel_list>  Left front,Right front,Left surround,Right surround  </m2s_channel_list>            

    21        <m2s_channel_list>  Left front,Right front   </m2s_channel_list>            

    21        <m2s_channel_list>  Left front,Right front   </m2s_channel_list>            

    CC85xx Family User’s Guide FW1.4.1  -> Table 9 - Logical channels. Something from this table.

    Under this Table 9 there is advice:

    For base stations and speakers/headphones supporting two independent stereo streams, use

    front/primary left/right for the first stereo stream and rear/secondary left/right for the second stereo

    stream.

    Why? And what I should use for 3d independent stream?

    I will use<m2s_channel_list>           Left front, Right surround, Front center  </m2s_channel_list>

     

     

    25        <interface pos="0" interface_number="0" alternate_setting="0" interface_class="audio" interface_sub_class="audio_control" interface_protocol="4">                            

    25        <interface pos="0" interface_number="0" alternate_setting="0" interface_class="audio" interface_sub_class="audio_control" interface_protocol="0">                            

    25        <interface pos="0" interface_number="0" alternate_setting="0" interface_class="audio" interface_sub_class="audio_control" interface_protocol="0">                            

    25        <interface pos="0" interface_number="0" alternate_setting="0" interface_class="audio" interface_sub_class="audio_control" interface_protocol="0">                                        

    That is very strange value of interface protocol. I am not sure but interface protocol must be "0". At least in the “Universal Serial Bus Device Class Definition for Audio Devices” (www.usb.org) there is : “… However, at this moment, the Interface Protocol is not used and must be set to 0x00”. May be today that is not true.  

    I will use <interface pos="0" interface_number="0" alternate_setting="0" interface_class="audio" interface_sub_class="audio_control" interface_protocol="0">

     

     

    28        <terminal_id>            1          </terminal_id>                     

    28        <terminal_id>            12        </terminal_id>                     

    28        <terminal_id>            12        </terminal_id>                     

    28        <terminal_id>            12        </terminal_id>                     

    I suppose that Terminal ID can be any number (<256). Is it? Specific value for any ID is depended of typology (something like that described in “CC85xx Family User’s Guide FW1.4.1” -> 2.5.2 USB Audio Device). In all out examples we have similar typology:

    ac_input_terminal(ID1 or ID12)-> ac_feature_unit(ID2 or ID1)-> ac_output_terminal(ID3 or ID14)

    I will use <terminal_id>       12        </terminal_id>

     

    30        <input_count>           2          </input_count>                     

    30        <input_count>           4          </input_count>                     

    30        <input_count>           2          </input_count>                     

    30        <input_count>           2          </input_count>

    I will use         <input_count>          3          </input_count>

     

    31        <input_location_list> Left front,Right front   </input_location_list>                      

    31        <input_location_list> Left front,Right front,Left surround,Right surround  </input_location_list>                      

    31        <input_location_list> Left front,Right front   </input_location_list>                      

    31        <input_location_list> Left front,Right front   </input_location_list>                      

    What is difference between <m2s_channel_list> and <input_location_list>?

    I will use<input_location_list>                     Left front, Right surround, Front center  </input_location_list>

     

    34        <terminal_id>            3          </terminal_id>                     

    34        <terminal_id>            14        </terminal_id>                     

    34        <terminal_id>            14        </terminal_id>                     

    34        <terminal_id>            14        </terminal_id>                     

    I will use <terminal_id>       14        </terminal_id>

     

    35        <terminal_type>        0302    </terminal_type>                  

    35        <terminal_type>        0301    </terminal_type>                  

    35        <terminal_type>        0301    </terminal_type>                  

    35        <terminal_type>        0301    </terminal_type>      

    Terminal Type is described in “Universal Serial Bus Device Class Definition for Terminal Types” (www.usb.org).

    Speaker           0x0301            A generic speaker or set of speakers that does not fit under any of the other classifications.

    Headphones    0x0302            A head-mounted audio output device.        

    I will use <terminal_type>   0301    </terminal_type>     

     

    36        <source_id>   2          </source_id>            

    36        <source_id>   1          </source_id>            

    36        <source_id>   1          </source_id>            

    36        <source_id>   1          </source_id>             

    Source ID field of a Unit or Terminal descriptor indicates to which other Unit or Terminal this Unit or Terminal is connected.

    I will use <source_id>          1          </source_id>

     

    39        <unit_id>       2          </unit_id>                 

    39        <unit_id>       1          </unit_id>                 

    39        <unit_id>       1          </unit_id>                 

    39        <unit_id>       1          </unit_id>                 

    I will use<unit_id>    1          </unit_id>     

     

    40        <source_id>   1          </source_id>            

    40        <source_id>   12        </source_id>            

    40        <source_id>   12        </source_id>            

    40        <source_id>   12        </source_id>             

    I will use I will use <source_id>      12        </source_id>

     

    42        <control_spec>          01 02 02          </control_spec>                   

    42        <control_spec>          03 00 00 00 00           </control_spec>                   

    42        <control_spec>          03 00 00          </control_spec>                   

    42        <control_spec>          03 00 00          </control_spec>

    I have no ideas what does it mean…                       

    I will use<control_spec>      03 00 00 00     </control_spec>

     

    50        <terminal_link>         1          </terminal_link>                   

    50        <terminal_link>         12        </terminal_link>                   

    50        <terminal_link>         12        </terminal_link>                   

    50        <terminal_link>         12        </terminal_link>

    The Terminal Link field contains the unique Terminal ID of the Input or Output Terminal to which this interface is connected.                 

    I will use <terminal_link>    12        </terminal_link>

     

    51        <delay>          0          </delay>                   

    51        <delay>          -1         </delay>                   

    51        <delay>          -1         </delay>                   

    51        <delay>          -1         </delay>                   

    “The Delay field holds a value that is a measure for the delay that is introduced in the audio data stream due to internal processing of the signal within the audio function. The Host software can take this value into account when phase relations between audio streams, processed by different audio functions, are important.” (www.usb.org).

    More about it there is in “Universal Serial Bus Device Class Definition for Audio Devices”-> 3.4  Inter Channel Synchronization (www.usb.org).

    I will use <delay>      -1         </delay>

     

    54        <channel_count>       2          </channel_count>                

    54        <channel_count>       4          </channel_count>                

    54        <channel_count>       2          </channel_count>                

    54        <channel_count>       2          </channel_count>                

    I will use <channel_count>  3          </channel_count>

     

    58        <attribute_list>          isochronous,synchronous       </attribute_list>                    

    58        <attribute_list>          isochronous,adaptive  </attribute_list>                    

    58        <attribute_list>          isochronous,adaptive  </attribute_list>                    

    58        <attribute_list>          isochronous,adaptive  </attribute_list>        

    What is difference between   asynchronous,synchronous and adaptive? Why HT1 Headphone is so unique?

    I will use <attribute_list>     isochronous,adaptive           </attribute_list>

     

    59        <max_packet_size>   192      </max_packet_size>             

    59        <max_packet_size>   384      </max_packet_size>             

    59        <max_packet_size>   200      </max_packet_size>             

    59        <max_packet_size>   288      </max_packet_size> 

    A bit strange moment. As I suppose, max_packet_size = NumOfChannel* sample_resolution*6

    Stereo, 16bit:2*16*6=192

    Quadra, 16bit:4*16*6=384

    Stereo, 24bit:2*24*6=288

    But for Standard descriptor for 16-bit USB soundcard max_packet_size=200. Why not 192?

    I will use<max_packet_size>           288      </max_packet_size>

     

    63        <lock_delay> 0          </lock_delay>                       

    63        <lock_delay> 10        </lock_delay>                       

    63        <lock_delay> 10        </lock_delay>                       

    63        <lock_delay> 10        </lock_delay>           

    “Universal Serial Bus Device Class Definition for Audio Devices”->4.6.1.2 Class-Specific AS Isochronous Audio Data Endpoint Descriptor (www.usb.org).

    I will use<lock_delay>          10        </lock_delay>

     

    64        <ctrl_sample_freq>   0          </ctrl_sample_freq>             

    64        <ctrl_sample_freq>   1          </ctrl_sample_freq>             

    64        <ctrl_sample_freq>   1          </ctrl_sample_freq>             

    64        <ctrl_sample_freq>   1          </ctrl_sample_freq>

    I have no ideas what does it mean…           

    I will use<ctrl_sample_freq>           1          </ctrl_sample_freq>

               

     

    Therefore if we would like to create 3ch USB soundcard descriptor we can fix USB quadraphonic soundcard descriptor at 9 points:

    <name>Quadraphonic output</name>                                 TO       <name>Triplephonic output</name>

    <desc>USB quadraphonic soundcard</desc>                     TO       <desc>USB Triplephonic soundcard</desc>

    <application_role_list>4ch speaker

     USB soundcard</application_role_list>                              TO       <application_role_list>3ch speaker USB soundcard</application_role_list>

    <m2s_channel_list>Left front,Right front,

     Left surround,Right surround</m2s_channel_list>             TO       <m2s_channel_list>Left front, Right surround, Front center</m2s_channel_list>

    <input_count>4</input_count>                                            TO       <input_count>3</input_count>

    <input_location_list>Left front,Right front

     ,Left surround,Right surround</input_location_list>         TO       <input_location_list>Left front, Right surround, Front center</input_location_list>

    <control_spec>03 00 00 00 00</control_spec>                    TO       <control_spec>03 00 00 00</control_spec>

    <channel_count>4</channel_count>                                    TO       <channel_count>3</channel_count>

    <max_packet_size>384</max_packet_size>                        TO       <max_packet_size>288</max_packet_size>

     

    6253.Triplephonic output_ppwudd.txt

    I attached my result *.ppwudd 3ch USB descriptor file. (Sorry, but i dont know how to attach ppwudd file. There is mistake that only special types of files can be attached. You have to change this file name from "Triplephonic output_ppwudd.txt" to "Triplephonic output.ppwudd")

    But for use it it is needed to create new Application Role file *.ppward.

    I have done the same procedure with existing examples of Application Role files as with descriptors files. There is I have one question too. What does “alias” mean?

    For example: <alias>  Master/USB quadraphonic soundcard          </alias>

    0412.m_3ch_speaker_usb_soundcard_.ppward.txt

    I attached my result * .ppward 3ch USB Application Role.

    Actually now my project works, but I have some troubles… I don’t know do these problems are due to mistakes in 2 my files or not. I try to understand it now.

    Sincerely, Igor

  • Dear, TI Community.

    Could anyone comment on my previous post?

    Sincerely, Igor.

  • Hi Igor,

    Sorry for late reply.
    I have looked at your files now and I have found one thing that must be changed.

    Change:

    <input_location_list>Left front,Right surround,Front center</input_location_list>

    to

    <input_location_list>Left front,Right surround,Center front</input_location_list>

    <m2s_channel_list> is the channel name specified in ppw configurator.            (Front center)
    <input_location_list> is the channel name specified in the USB specification.   (Center front)

    Further:

    <terminal_id> can be any number <256. These IDs are used to connect the input_terminal with the feature_unit and the feature_unit with the outpu_terminal. This is done by using <source_id>.

    <control_spec> defines which audio controls that are available according, see bmaControls in Universal Serial Bus Device Class Definition for Audio Devices.

    <ctrl_sample_freq> defines if the sample rate can be changed or not.

    Best Regards,
    Johan

  • HI Johan,

    Thank you very much for your answer! “Front Center” was the reason of my problems!
    (Could you tell me should I Verify each Answer in the post or only last answer for all messages in the post?)
    Could you tell me are these parameters important or not? (I used it like in examples but suppose that they may be important):
    1. <max_packet_size>   288      </max_packet_size>  (288 is ok or better 300? or more?)
    2. <alias>Master/USB triplephonic soundcard</alias>(in Application Role file *.ppward.  What does “alias” mean?)

    Sincerely, Igor

  • Hi Igor,

    good to hear! I have some more answers for you:

    <max_packet_size> indicates the max amount of data (in bytes) in each packet (one packet each ms i.e. 1000 packets/s) and it is calculated as:

    max_sample_frequency * bit_depth  * number_of_channels / 8 / 1000

    there is no need to take a lot of extra overhead. So for 3 channels 48 kHz 16 bit, you can use 288.

    <alias> is nothing that you need to think about. It has been used to be able to keep old names of application roles during the development. So alias is just a second name that you don't have to use. If you look at the *.ppward files you can see that some applications roles don't have an alias and some even have two different aliases.

    I think you only need to Verify the last answer and this thread will be marked as Verified.

    Best regards,
    Johan 

     

  • HI Johan,
    Thank you for your advices and answers.
    I would like to ask more some questions again.
    Is it possible to configure this "USB 3+1ch system" for:
    1. independent volume control for each channel?
    2. disabling volume controll for  1or2or3 channels in PC OS ?
    Sincerely, Igor

  • Hi,

    in the descriptor it is possible to change the control of the different channels using 
    <control_spec>03 00 00 00</control_spec>.

    The four values in <control_spec>03 00 00 00</control_spec>. is associated with master control (control of all channels) and the individual control of each channel (each 00 represents one channel).

    These value sets the bmaControls of the audio device. Shortly, these values represent:

    00 - No control
    01 - Mute control
    02 - Volume control
    03 - Volume and mute control

    Try this!

    Best regards,
    Johan

  • HI Johan,

    Thank you! Now it works as i would like.
    I have more some questions for this thread but I would like to ask a bit later. Can I continue to post question after "verify answer"?

    Sincerely, Igor

  • Hi,

    good to hear!
    It is possible to post more questions after the answer is "verified".

    Best regards,
    Johan 

  • Dear, TI Community.

    I have asked already about 3channels output Slave, but  still I have questions.

    We have our Slave board with AIC3204 connected to AD1, and MCU (8051) connected to AD0. But there are no examples for 3channels output, therefore we used standart example "Stereo output satellite" with "Custom design". Using AD1 or AD0 we tested our bord - we can send 2 stereo channel to AIC3204 or we can send 3d channel to our MCU - all work correct.

    I created new example of Application Role for our Slave board:
    ......
    <application_role>
        <name>Slave/3ch output satellite</name>
        <alias>Slave/3ch stereo output</alias>
        <alias>Slave/3ch speaker</alias>
        <pwc_rev>1.4.2</pwc_rev>
        <desc></desc>
        <aif_input_count>0</aif_input_count>
        <aif_output_count>3</aif_output_count>
        <use_dyn_ach_sel>0</use_dyn_ach_sel>
        <hardware_platform_list>PurePath Wireless EB,CC85XX Headset,Custom design</hardware_platform_list>
        <operation_list>Autonomous,Host control</operation_list>
        <streaming_format_encoders></streaming_format_encoders>
        <streaming_format_decoders>PCM16,PCMLF,SLAC,PCME24</streaming_format_decoders>
    </application_role>

    But this Application Role can't work with AIC3204(codec) - "Audio Interface"  is "red" in PPW Configurator and I cant choose AIC3204(codec) in list of External Audio Device->Select device(list). AIC3204 is "red".

    I suppose that I should fix aic3204.ppwadd file.... but it is a big file... and I dont know what should I change. Could you tell me what should I do to create Configuration in PPW configurator fo 3channels Slave with AIC3204(codec) on AD1 and MCU on AD0?

    Sincerely, Igor

  • Hi,

    I think your problem may be the number of channels specified for the AIC3204. As standard this audio device is specified to be used with a application role that uses at most  2 input and 2 output channels. This is specified in the audio device file (*.ppwadd) as:

    <input_count>2</input_count>
    <output_count>2</output_count>

    If you have an application role that uses more channels than specified, the audio device will be "red" as you have seen.
    Modify these values in a new AIC3204 audio device file, then you should be able to select this device in PPW Configurator even with a application role that uses 3 channels.

    Best regards,
    Johan

  • HI Johan,

    Thank you! Now it works as I would like.

    Sincerely, Igor