Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

Notice: Pre-Release Documentation
This document is part of a prerelease and is currently a work in progress. Some content may be incomplete, subject to change, or marked as TBD. We are actively updating this documentation and will continue to provide the most accurate and up-to-date information as development progresses. Thank you for your understanding!

The R4.0 system uses an XML file to configure the Audio Weaver and the underlying BSP. This is converted to a binary file and loaded at system boot. An annotated version of the XML file is shown below and more details can be found after the XML file.

Code Block
<config platform="8755">

	<awe_process>

		<!--Unused.  Will be removed in the future-->

		 <enable type="BOOL">true</enable>

	</awe_process>

	<params>

		<log_level type="UINT32" max_level="2">

		<!-- Specifies the log levels for each core. -->

			<adsp type="UINT32">0</adsp>

			<gpdsp0 type="UINT32">0</gpdsp0>

			<gpdsp1 type="UINT32">0</gpdsp1>

			<arm type="UINT32">0</arm>

		</log_level>

		<thread_num>

			<!-- Number of child audio processing threads per core-->

			<adsp type="UINT8">4</adsp>

			<gpdsp0 type="UINT8">10</gpdsp0>

			<gpdsp1 type="UINT8">10</gpdsp1>

			<arm type="UINT8">4</arm>

		</thread_num>

		<adsp_thread_priority>

			<!-- thread_parent is the priority of the main audio processing interrupt.

			     This is the highest priority audio thread. -->

		    <thread_parent type="UINT8">50</thread_parent>

			<thread_child>

				<!-- Next separate priorities for each child thread.

				     The number of child threads is specified above.

				     The child threads should be in decreasing priority from the parent_thread. -->

				<thread_0 type="UINT8">51</thread_0>

				<thread_1 type="UINT8">52</thread_1>

				<thread_2 type="UINT8">53</thread_2>

				<thread_3 type="UINT8">54</thread_3>
            </thread_child>

		</adsp_thread_priority>

		<gpdsp0_thread_priority>

		    <thread_parent type="UINT8">50</thread_parent>

			<thread_child>

				<thread_0 type="UINT8">51</thread_0>

				<thread_1 type="UINT8">52</thread_1>

				<thread_2 type="UINT8">53</thread_2>

				<thread_3 type="UINT8">54</thread_3>

				<thread_4 type="UINT8">55</thread_4>

				<thread_5 type="UINT8">56</thread_5>

				<thread_6 type="UINT8">57</thread_6>

				<thread_7 type="UINT8">58</thread_7>

				<thread_8 type="UINT8">59</thread_8>

				<thread_9 type="UINT8">60</thread_9>

		    </thread_child>

		</gpdsp0_thread_priority>

		<gpdsp1_thread_priority>

		    <thread_parent type="UINT8">50</thread_parent>

			<thread_child>

				<thread_0 type="UINT8">51</thread_0>

				<thread_1 type="UINT8">52</thread_1>

				<thread_2 type="UINT8">53</thread_2>

				<thread_3 type="UINT8">54</thread_3>

				<thread_4 type="UINT8">55</thread_4>

				<thread_5 type="UINT8">56</thread_5>

				<thread_6 type="UINT8">57</thread_6>

				<thread_7 type="UINT8">58</thread_7>

				<thread_8 type="UINT8">59</thread_8>

				<thread_9 type="UINT8">60</thread_9>

		    </thread_child>

		</gpdsp1_thread_priority>

		<arm_thread_priority>

			<thread_parent type="UINT8">63</thread_parent>

			<thread_child>

				<thread_0 type="UINT8">62</thread_0>

				<thread_1 type="UINT8">61</thread_1>

				<thread_2 type="UINT8">60</thread_2>

				<thread_3 type="UINT8">59</thread_3>

			</thread_child>

		</arm_thread_priority>

		<!-- Number of audio processing cores -->

		<num_of_instances type="UINT32">4</num_of_instances>

		<adsp>

			<!-- Core ID (or instance ID) of the core. -->

		        <coreID type="UINT8">0</coreID>

			<!-- Sizes of the Audio Weaver heaps, in units of 32-bit words. -->

			<fastheapA type="UINT32">250000</fastheapA>

			<fastheapB type="UINT32">250000</fastheapB>

			<slowheap type="UINT32">250000</slowheap>

			<cpuclock type="UINT32" unit="KHz">1344000</cpuclock>

		</adsp>

		<gpdsp0>

		        <coreID type="UINT8">1</coreID>

			<fastheapA type="UINT32">250000</fastheapA>

			<fastheapB type="UINT32">250000</fastheapB>

			<slowheap type="UINT32">250000</slowheap>

			<cpuclock type="UINT32" unit="KHz">1708800</cpuclock>

		</gpdsp0>

 		<gpdsp1>

		        <coreID type="UINT8">2</coreID>

			<fastheapA type="UINT32">250000</fastheapA>

			<fastheapB type="UINT32">250000</fastheapB>

			<slowheap type="UINT32">250000</slowheap>

			<cpuclock type="UINT32" unit="KHz">1708800</cpuclock>

		</gpdsp1>

		<arm>

		        <coreID type="UINT8">3</coreID>

			<fastheapA type="UINT32">7000000</fastheapA>

			<fastheapB type="UINT32">70000</fastheapB>

			<slowheap type="UINT32">70000</slowheap>

			<cpuclock type="UINT32" unit="KHz">2100000</cpuclock>

		</arm>

		<!-- Size of the shared memory heap.  This is visible to all cores.

		     In units of 32-bit words -->

		<shared_heap_size type="UINT32" unit="UINT32">262000</shared_heap_size>

		<!-- These values specify the "targetInfo" which is read back by the Audio Weaver

		     Server when it connects to the target.  This will be removed in the future. -->

		<block_size type="UINT16">48</block_size>

		<sample_rate type="UINT16">48000</sample_rate>

		<in_channel type="UINT16">16</in_channel>

		<out_channel type="UINT16">16</out_channel>

	</params>

</config></config>

<log_level>

Controls the amount of logging information generated by Audio Weaver. This is set per core and the following 3 values are supported.

0 - Log only critical errors.

1 - Also include non-fatal warnings

2 - Also include informational messages

When a higher value is selected, all messages from the lower log levels are also included. For example, if you set log_level = 2, then you will see critical errors and non-fatal warnings in additional informational messages.

<thread_num>

Number of audio processing threads that will be provided. This number appears on the Server window when you connect to the target.

Image Added

If you exceed this number, then you will get a build error in Designer. On the Hexagon, the audio processing threads are scheduled via the QuRT RTOS and do not necessarily map to hardware threads. It can also be useful to have the number of audio processing threads exceed the number of hardware threads because some audio processing threads may not be fully loaded.

On the Arm, audio processing threads are also mapped to software threads via the operating system.

<thread_parent>

Specifies the priority of the main audio interrupt. This is the highest priority interrupt on the core and should have the highest priority. On the Hexagon, the lower the number the higher the priority. We recommend setting this to 50. On the Arm, the higher the number the higher the priority. We recommend setting this to 63.

<thread_child>

Specifies the priorities of the audio processing threads. These are the threads that do the actual work. They should be in decreasing order of priority.

If your system is experiencing CPU overruns, there are 3 possible ways to correct this.

  1. Adjust the thread priorities. Something else is running in the system and pre-empting audio processing.

  2. Load balance your audio threads. Try to minimize the peak load of any thread.

  3. Reduce the amount of audio processing. You’ll need to redesign your signal flow, leverage multichannel signals, or in some cases, change your block size.

<num_of_instances>

Total number of audio processing cores available. This number is set based on the specific variant of the Snapdragon processor used. There are variants with 1, 2, or 3 cores. Including the Arm leads to 2, 3, or 4 cores.

<adsp>

This section has core specific information and there are similar sections for GPDSP0, GPDSP1, and the Arm.

<coreID> - unique integer identifier for the core. This maps to the “InstanceID” used in Audio Weaver.

<fastheapA>, <fastheapB>, <slowheap> - specifies the number of 32-bit words that should be allocated for each heap. Size this based on the complexity of your audio design. There is no harm in oversizing this.

<cpuclock> - initial core clock setting, in kHz. This value is used to set the clock speed of the Hexagon DSPs. It does not affect the Arm clock speed. In all cases, this information is used to convert the measured percent usage to MHz. If the MHz values in your profiles do not look correct, then these values could be off.

<shared_heap_size>

Specifies the size of the system wide shared heap, in words.

Target Info Settings

There are also settings in the XML file for <block_size>, <sample_rate>, <in_channel>, <out_channel>. These values are used to populate the targetInfo structure used by the Server but they are not actually used by the BSP to configure the system. They are only used for legal information provided by the Server to the Designer GUI.