Sound Open Firmware
Loading...
Searching...
No Matches
smart_amp.h File Reference
Include dependency graph for smart_amp.h:

Go to the source code of this file.

Data Structures

struct  smart_amp_mod_data_base
 
struct  smart_amp_buf
 
struct  smart_amp_mod_stream
 
struct  smart_amp_func_map
 
struct  inner_model_ops
 

Macros

#define SMART_AMP_FF_MAX_CH_NUM   2
 
#define SMART_AMP_FF_OUT_MAX_CH_NUM   4
 
#define SMART_AMP_FB_MAX_CH_NUM   4
 
#define SMART_AMP_FRM_SZ   48 /* frames per 1ms */
 
#define SMART_AMP_FF_BUF_SZ   (SMART_AMP_FRM_SZ * SMART_AMP_FF_MAX_CH_NUM)
 
#define SMART_AMP_FB_BUF_SZ   (SMART_AMP_FRM_SZ * SMART_AMP_FB_MAX_CH_NUM)
 
#define SMART_AMP_FF_BUF_DB_SZ    (SMART_AMP_FF_BUF_SZ * SMART_AMP_FF_MAX_CH_NUM)
 
#define SMART_AMP_FB_BUF_DB_SZ    (SMART_AMP_FB_BUF_SZ * SMART_AMP_FB_MAX_CH_NUM)
 

Typedefs

typedef void(* smart_amp_src_func) (struct smart_amp_mod_stream *src_mod, uint32_t frames, const struct audio_stream *src, const int8_t *chan_map)
 
typedef void(* smart_amp_sink_func) (const struct smart_amp_mod_stream *sink_mod, uint32_t frames, const struct audio_stream *sink)
 

Enumerations

enum  smart_amp_mod_memblk { MOD_MEMBLK_PRIVATE = 0 , MOD_MEMBLK_FRAME , MOD_MEMBLK_PARAM , MOD_MEMBLK_MAX }
 

Functions

smart_amp_src_func smart_amp_get_src_func (uint16_t comp_fmt, uint16_t mod_fmt)
 Retrieve source processing callback matching component and module PCM formats.
 
smart_amp_sink_func smart_amp_get_sink_func (uint16_t comp_fmt, uint16_t mod_fmt)
 Retrieve sink processing callback matching component and module PCM formats.
 
struct smart_amp_mod_data_base * mod_data_create (const struct comp_dev *dev)
 Creates the self-declared model data struct.
 

Variables

const struct smart_amp_func_map src_sink_func_map []
 

Macro Definition Documentation

◆ SMART_AMP_FB_BUF_DB_SZ

#define SMART_AMP_FB_BUF_DB_SZ    (SMART_AMP_FB_BUF_SZ * SMART_AMP_FB_MAX_CH_NUM)

◆ SMART_AMP_FB_BUF_SZ

#define SMART_AMP_FB_BUF_SZ   (SMART_AMP_FRM_SZ * SMART_AMP_FB_MAX_CH_NUM)

◆ SMART_AMP_FB_MAX_CH_NUM

#define SMART_AMP_FB_MAX_CH_NUM   4

◆ SMART_AMP_FF_BUF_DB_SZ

#define SMART_AMP_FF_BUF_DB_SZ    (SMART_AMP_FF_BUF_SZ * SMART_AMP_FF_MAX_CH_NUM)

◆ SMART_AMP_FF_BUF_SZ

#define SMART_AMP_FF_BUF_SZ   (SMART_AMP_FRM_SZ * SMART_AMP_FF_MAX_CH_NUM)

◆ SMART_AMP_FF_MAX_CH_NUM

#define SMART_AMP_FF_MAX_CH_NUM   2

◆ SMART_AMP_FF_OUT_MAX_CH_NUM

#define SMART_AMP_FF_OUT_MAX_CH_NUM   4

◆ SMART_AMP_FRM_SZ

#define SMART_AMP_FRM_SZ   48 /* frames per 1ms */

Typedef Documentation

◆ smart_amp_sink_func

typedef void(* smart_amp_sink_func) (const struct smart_amp_mod_stream *sink_mod, uint32_t frames, const struct audio_stream *sink)

◆ smart_amp_src_func

typedef void(* smart_amp_src_func) (struct smart_amp_mod_stream *src_mod, uint32_t frames, const struct audio_stream *src, const int8_t *chan_map)

Enumeration Type Documentation

◆ smart_amp_mod_memblk

Enumerator
MOD_MEMBLK_PRIVATE 
MOD_MEMBLK_FRAME 
MOD_MEMBLK_PARAM 
MOD_MEMBLK_MAX 

Function Documentation

◆ mod_data_create()

struct smart_amp_mod_data_base * mod_data_create ( const struct comp_dev *  dev)

Creates the self-declared model data struct.

Refer to "struct smart_amp_mod_data_base" for details of declaration. Args: dev - the comp_dev object for logger tracing use only. Returns: The pointer of "smart_amp_mod_data_base" which is the leading member in the created model data struct.

◆ smart_amp_get_sink_func()

smart_amp_sink_func smart_amp_get_sink_func ( uint16_t  comp_fmt,
uint16_t  mod_fmt 
)

Retrieve sink processing callback matching component and module PCM formats.

Parameters
comp_fmtComponent stream frame format.
mod_fmtProcessing module internal frame format.
Returns
Sink processing function pointer, or NULL if no match found.

◆ smart_amp_get_src_func()

smart_amp_src_func smart_amp_get_src_func ( uint16_t  comp_fmt,
uint16_t  mod_fmt 
)

Retrieve source processing callback matching component and module PCM formats.

Parameters
comp_fmtComponent stream frame format.
mod_fmtProcessing module internal frame format.
Returns
Source processing function pointer, or NULL if no match found.

Variable Documentation

◆ src_sink_func_map

const struct smart_amp_func_map src_sink_func_map[]
extern