Page 16 - EngineerIT September 2021
P. 16

AUDIO PROCESSING


        Planning for success in real-time




        acoustic processing




        By David Katz, Infotainment systems architecture director



            ow latency, real-time acoustic processing is a key factor   priority SoC tasks are serviced. These spikes may occur, for
            in many embedded processing applications, among them   example, due to SoC-centric activities such as media rendering,
       Lvoice pre-processing, speech recognition and active noise   browsing or app execution on the system. Whenever the spikes
        cancellation (ANC). As real-time performance requirements   surpass 100% CPU loading, the SoC is no longer operating in
        steadily increase within these application domains, developers   real time, and this will result in audio dropouts.
        need to adopt a strategic mindset to properly accommodate   Audio DSPs, on the other hand, are architected for low
        these needs.                                           latency throughout the signal processing path, from sampled
           Given the substantial performance offered by many larger   audio input to composite (for example, audio + anti-noise) speaker
        systems on chips, it may be tempting to simply load these devices   output. L1 instruction and data SRAM, the single-cycle memory
        with any additional tasks that arise, but it’s important to understand   closest to the processor core, is ample enough to support many
        that latency and determinism are critical elements that can easily   processing algorithms without offloading intermediate data to
        lead to major real-time system problems if not considered carefully.   off-chip memory. Additionally, on-chip L2 memory (further from
        This article will explore issues designers should consider when   the core but still much faster access than off-chip DRAM) helps
        choosing between an SoC and dedicated audio DSP in order to   provide a buffer for intermediate data operations when L1 SRAM
        avoid unpleasant surprises in their real-time acoustic systems.  storage is exceeded. Finally, audio DSPs commonly run a real-
           Low latency acoustic systems cover a wide range of   time operating system (RTOS) that ensures incoming data can be
        applications. For instance, in the automotive space alone,   processed and sent out to its target destination before new input
        low latency is critical for personal audio zones, road noise   data arrives, thus ensuring that data buffers don’t overflow during
        cancellation and in-car communication systems, to name a few.  real-time operation.
           With the emerging trend of vehicle electrification, RNC   The actual latency in system boot — often measured by time-
        becomes even more important because there’s no combustion   to-audio availability — can also be an important metric, especially
        engine generating noticeable noise. Therefore, the sounds   in automotive systems where audible warnings must be broadcast
        associated with the car-to-road interface become much more   within a certain window from start-up. In the SoC world, where
        noticeable and offensive. Reducing this noise not only creates   it’s typical to have a lengthy boot sequence that involves bringing
        a more comfortable riding experience, but it also reduces   up the operating system for the entire device, it can be difficult or
        driver fatigue. There are numerous challenges associated with   impossible to meet this start-up requirement. On the other hand,
        implementing a low latency acoustic system on an SoC as   a stand-alone audio DSP running its own RTOs, unaffected by
        opposed to on a dedicated audio DSP. These include issues   other extraneous system priorities, can be optimised for fast boot
        of latency, scalability, upgradeability, algorithm considerations,   that comfortably satisfies the time-to-audio requirement.
        hardware acceleration and customer support. Let’s examine each
        of these in turn.
        Latency
        The issue of latency in real-time acoustic processing systems is
        an important one. If the processor cannot keep up with the real-
        time data movement and computational demands of the system,
        unacceptable audio drops can result.
           Typically, SoCs have small on-chip SRAMs and, accordingly,
        must rely on cache for most local memory accesses. This
        introduces non-deterministic availability of code and data, and
        it also increases processing latency. For a real-time application
        such as ANC, this alone can be a deal breaker. However, there’s
        also the fact that SoCs run non-real-time operating systems
        that manage heavy multi-tasking loads. This amplifies the non-
        deterministic operating characteristic of the system, making it very
        difficult to support relatively complex acoustic processing in a
        multi-tasking environment.
           Figure 1 shows a concrete example of an SoC running a real-  Figure 1: Instantaneous CPU loads for a representative SoC
        time audio processing load, where CPU loading spikes as higher   running high audio memory processing in addition to other tasks. 1



                                                 EngineerIT | September 2021 | 14
   11   12   13   14   15   16   17   18   19   20   21