RA Flexible Software Package Documentation  Release v5.2.0

 
ADPCM Decoder Interface

Detailed Description

Interface for ADPCM decoder.

Summary

The ADPCM decoder interface provides functionality to decode the 4bit ADPCM data to 16bit PCM output.

Data Structures

struct  adpcm_decoder_cfg_t
 
struct  adpcm_decoder_api_t
 
struct  adpcm_decoder_instance_t
 

Typedefs

typedef void adpcm_decoder_ctrl_t
 

Data Structure Documentation

◆ adpcm_decoder_cfg_t

struct adpcm_decoder_cfg_t

Audio Decoder general configuration

◆ adpcm_decoder_api_t

struct adpcm_decoder_api_t

Audio Decoder interface API.

Data Fields

fsp_err_t(* open )(adpcm_decoder_ctrl_t *const p_ctrl, adpcm_decoder_cfg_t const *const p_cfg)
 
fsp_err_t(* decode )(adpcm_decoder_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint32_t src_len_bytes)
 
fsp_err_t(* reset )(adpcm_decoder_ctrl_t *const p_ctrl)
 
fsp_err_t(* close )(adpcm_decoder_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* adpcm_decoder_api_t::open) (adpcm_decoder_ctrl_t *const p_ctrl, adpcm_decoder_cfg_t const *const p_cfg)

Initialize Audio Decoder device.

Note
To reconfigure after calling this function, call adpcm_decoder_api_t::close first.
Parameters
[in]p_ctrlPointer to control handle structure
[in]p_cfgPointer to configuration structure

◆ decode

fsp_err_t(* adpcm_decoder_api_t::decode) (adpcm_decoder_ctrl_t *const p_ctrl, void const *p_src, void *p_dest, uint32_t src_len_bytes)

Decodes the compressed data and stores it in output buffer.

Parameters
[in]p_ctrlPointer to control handle structure
[in]p_srcPointer to a source data buffer from which data will be picked up for decode operation. The argument must not be NULL.
[out]p_destPointer to the location to store the decoded data.
[in]p_destNumber of bytes to be decoded.

◆ reset

fsp_err_t(* adpcm_decoder_api_t::reset) (adpcm_decoder_ctrl_t *const p_ctrl)

Resets the ADPCM driver.

Parameters
[in]p_ctrlPointer to control handle structure

◆ close

fsp_err_t(* adpcm_decoder_api_t::close) (adpcm_decoder_ctrl_t *const p_ctrl)

Close the specified Audio decoder modules.

Parameters
[in]p_ctrlPointer to control handle structure

◆ adpcm_decoder_instance_t

struct adpcm_decoder_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
adpcm_decoder_ctrl_t * p_ctrl Pointer to the control structure for this instance.
adpcm_decoder_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
adpcm_decoder_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ adpcm_decoder_ctrl_t

typedef void adpcm_decoder_ctrl_t

Audio Decoder control block. Allocate an instance specific control block to pass into the Audio Decoder API calls.