Most audio codecs are handled by dedicated hardware in order to reduce power consumption on mobile devices; however some are still implemented in software, so they must be heavily optimized to allow realtime playback at as low a processor frequency as possible to minimize battery drain on this potentially long running application. The key to achieving this is to reduce the number of instructions executed per core per second.
Prism Technology was used to identify where in the software to target optimizations. Engineers used the captured data to identify independent sections of the code which where modified to run in parallel across the two available cores. This resulted in the execution cycles of the codec being distributed almost evenly with one core having to do a small amount of additional work per sample.
Each thread was further analyzed with Prism Technology and engineering know how to identify opportunities to make use of SIMD instructions on the target processor. This approach led to a 30% decrease in the total number of instruction executed by each core.
The application of Prism technology and engineering insight resulted in a per core instructions per second reduction of almost 50% compared to the original single core version.
CriticalBlue utilized our Prism Technology to capture a dynamic trace of the execution of the software codec as it ran on the smartphone target. This allowed our engineers to identify the hotspots and investigate various optimization approaches with the goal of allowing a reduction in the clock frequency of the dual core application processor.
Since a dual core architecture was being targeted, a potential strategy was to attempt to spread the execution across both cores knowing that a large enough performance increase would overcome the power cost of waking up the second core.