Patent Publication Number: US-9405826-B1

Title: Systems and methods for digital signal processing

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This disclosure claims priority to and benefit from U.S. Provisional Patent Application No. 61/846,373, filed on Jul. 15, 2013, the entirety of which is incorporated herein by reference. 
    
    
     FIELD 
     The technology described in this patent document relates generally to signal processing and more particularly to digital signal processing. 
     BACKGROUND 
     Digital signal processing (DSP) is often implemented for audio signal processing of electronic devices (e.g., mobile phones). DSP usually involves mathematical manipulation of audio signals to modify or improve the signals in some way. For example, DSP related firmware uses different sets of application programming interfaces (APIs) to determine a signal processing task (e.g., playback, recording), and a calling sequence of different functions can be established to perform the task. 
     SUMMARY 
     In accordance with the teachings described herein, systems and methods are provided for audio processing. A system includes: a component manager and a pipeline manager. The component manager is configured to communicate with a host system and manage one or more components for processing an audio stream. A component is associated with one or more audio processing functions. The pipeline manager is configured to manage one or more connections among the components. The connections indicate a processing flow involving the components. 
     In one embodiment, a method is provided for audio processing. Communications with a host system are carried out. One or more components are generated for audio processing based at least in part on the communication with the host system. A component is associated with one or more audio processing functions. One or more connections are established among the components. The connections indicate a processing flow involving the components. The audio stream is processed using the components and the connections. 
     In another embodiment, a system for audio processing includes: one or more processors for digital signal processing and a computer-readable storage medium. The processors are configured to: communicate with a host system; manage one or more components for processing an audio stream, a component being associated with one or more audio processing functions; and manage one or more connections among the components, the connections indicating a processing flow involving the components. The computer-readable storage medium is configured to store data related to the components and data related to the connections. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  depicts an example diagram showing a framework for signal processing. 
         FIG. 2  depicts another example diagram showing a framework for signal processing. 
         FIG. 3  depicts another example diagram showing a framework for signal processing. 
         FIG. 4  depicts an example flow chart for signal processing. 
     
    
    
     DETAILED DESCRIPTION 
     Using APIs and calling sequences for DSP tasks has some disadvantages. For example, for each new task, APIs often need to be modified and selected to provide a new interface to a host central processing unit (CPU), which may cause inefficiency of signal processing. In addition, in conventional DSP processing systems, data commands and control commands are often both treated as private commands, and the host CPU often needs to know details of the DSP implementation to provide correct command sequences for different DSP tasks. 
       FIG. 1  depicts an example diagram showing a framework for signal processing. As shown in  FIG. 1 , a DSP processing system  102  communicates with a host system  104  for signal processing through one or more media system components  110 . The components  110  are associated with certain signal processing functions. The communication between the host system  104  and the DSP processing system  102  is not carried out through APIs, and the DSP implementation details can be shielded from the host system  104 . 
     Particularly, a component manager  106  communicates with the host system  104  and creates (e.g., dynamically) the media system components  110 . Each media system component includes one or more audio processing functions. The component manager  106  links the media system components  110  by establishing connections between the components  110 , and the connections indicate a processing flow involving the components  110 . The component manager  106  can also release (e.g., dynamically) one or more components based on actual needs for signal processing. For a particular DSP task, the host system  104  does not need to know the DSP implementation details for generating a command sequence. Instead, a processing flow is set up for the task through the connections between the components  110 . A pipeline manager  108  maintains the connections between the components  110  and changes (e.g., dynamically) the connections based on the communication with the host system  104 . 
     In some embodiments, a DSP task includes playback of an audio signal. The component manager  106  creates the components  110  that include a collection component, a decode component, and a playback component. In addition, the component manager generates connections among these created components and a processing flow is determined accordingly to carry out the playback of the audio signal. For example, the collection component is connected to the decode component that is connected to the playback component. The collection component collects an audio signal first, and the decode component decodes the collected audio signal. Then, the playback component performs playback of the decoded audio signal. 
     Once the components are created, they can be reused for processing different audio streams, and the connections among the components may be changed accordingly. As an example, the host system  104  includes one or more central processing units (CPUs), and the DSP processing system  102  includes one or more DSP processors. 
       FIG. 2  depicts another example diagram showing a framework for signal processing. As shown in  FIG. 2 , the host system  104  handles the components  110  through communication with the command manager  106 . Specifically, the host system  104  can cause the command manager  106  to create the components  110 , query the component manager  106  to find components supported by the DSP processing system  102 , establish connections among the components  110 , and/or release one or more of the components  110  based on actual needs. In addition, the host system  104  can manage the connections among the components  110  through the pipeline manager  108 , and can cause the pipeline manager  108  to change (e.g., dynamically) the connections among the components  110  without stopping the processing of an audio stream. The DSP firmware (e.g., including the component manager  106  and the pipeline manager  108 ) implements a message queue mechanism for managing the components  110 . 
     A kernel driver  202  within the host system  104  provides an interface for transferring commands and/or data between the components  110  and user applications running on the host system  104 . The host system  104  and the DSP processing system  102  exchange control commands and data. For example, an inter-processor communication interface  206  and a shared memory  204  are used for physical connections between the host system  104  and the DSP processing system  102 . 
     For the exchange of control commands, a data structure in the shared memory  204  is determined. When the host system  104  needs to send a control command to the DSP processing system  102 , the host system  104  prepares the control command according to the determined data structure and stores the control command in the shared memory  204 . Then, the host system  104  sends an interrupt to the DSP processing system  102  through the inter-processor communication interface  206 . When the DSP processing system  102  begins operations in response to the interrupt, the DSP processing system  102  reads the data structure stored in the shared memory  204  and analyzes the data structure within an interrupt processing routine to obtain the control command sent from the host system  104 . Similarly, when the DSP processing system  102  needs to send a control command to the host system  104 , the DSP processing system  102  prepares the control command according to the data structure and stores the control command in the shared memory  204 . Then, the host system  104  reads the data structure stored in the shared memory  204  and analyzes the data structure to obtain the control command sent from the DSP processing system  102 . 
     For the exchange of data, the host system  104  prepares a set of descriptors associated with a buffer that stores data to be exchanged. The host system  104  sends the descriptors to the DSP processing system  102  through a control command transferring process as described above. The DSP processing system  102  analyzes one or more control commands received from the host system  104  and extracts the descriptors from the received control commands. Then, the DSP processing system  102  acquires the data to be exchanged from the buffer using the extracted descriptors. 
       FIG. 3  depicts another example diagram showing a framework for signal processing. As shown in  FIG. 3 , a DSP system service layer  306  and a DSP hardware abstract layer  308  included in a low-level software component  302  provide basic features of the framework  100 . Specifically, the DSP system service layer  306  provides advanced functions, such as system timing services and message queue services. The DSP hardware abstract layer  308  encapsulates one or more DSP hardware registers, and processes one or more hardware interrupts. A DSP hardware layer  304  communicates with the low-level software component  302  to perform hardware operations for signal processing. The framework  100  may be implemented in various electronic devices, e.g., portable devices, mobile phones, etc. 
       FIG. 4  depicts an example flow chart for signal processing. As shown in  FIG. 4 , at  402 , communications with a host system are carried out, e.g., for a DSP processing system. At  404 , one or more components are generated for audio processing based at least in part on the communication with the host system. Each component is associated with one or more audio processing functions. At  406 , one or more connections are established among the components. The connections indicate a processing flow involving the components. At  408 , the audio stream is processed using the components and the connections. 
     This written description uses examples to disclose the invention, include the best mode, and also to enable a person skilled in the art to make and use the invention. The patentable scope of the invention may include other examples that occur to those skilled in the art. Other implementations may also be used, however, such as firmware or appropriately designed hardware configured to carry out the methods and systems described herein. For example, the systems and methods described herein may be implemented in an independent processing engine, as a co-processor, or as a hardware accelerator. In yet another example, the systems and methods described herein may be provided on many different types of computer-readable media including computer storage mechanisms (e.g., CD-ROM, diskette, RAM, flash memory, computer&#39;s hard drive, etc.) that contain instructions (e.g., software) for use in execution by one or more processors to perform the methods&#39; operations and implement the systems described herein.