fsl_codec_adapter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017- 2019 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_CODEC_ADAPTER_H_
10 #define _FSL_CODEC_ADAPTER_H_
11 
12 #include "fsl_wm8960.h"
13 
18 /*******************************************************************************
19  * Definitions
20  ******************************************************************************/
22 #define HAL_CODEC_HANDLER_SIZE (WM8960_I2C_HANDLER_SIZE + 4)
23 
25 {
27 };
28 /*******************************************************************************
29  * API
30  ******************************************************************************/
31 
32 #if defined(__cplusplus)
33 extern "C" {
34 #endif
35 
42 status_t HAL_CODEC_Init(void *handle, void *config);
43 
50 status_t HAL_CODEC_Deinit(void *handle);
51 
61 status_t HAL_CODEC_SetFormat(void *handle, uint32_t mclk, uint32_t sampleRate, uint32_t bitWidth);
62 
71 status_t HAL_CODEC_SetVolume(void *handle, uint32_t playChannel, uint32_t volume);
72 
81 status_t HAL_CODEC_SetMute(void *handle, uint32_t playChannel, bool isMute);
82 
91 status_t HAL_CODEC_SetPower(void *handle, uint32_t module, bool powerOn);
92 
101 status_t HAL_CODEC_SetRecord(void *handle, uint32_t recordSource);
102 
114 status_t HAL_CODEC_SetRecordChannel(void *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel);
115 
124 status_t HAL_CODEC_SetPlay(void *handle, uint32_t playSource);
125 
139 status_t HAL_CODEC_ModuleControl(void *handle, uint32_t cmd, uint32_t data);
140 
141 #if defined(__cplusplus)
142 }
143 #endif
144 
146 #endif /* _FSL_CODEC_ADAPTER_H_ */
HAL_CODEC_SetPower
status_t HAL_CODEC_SetPower(void *handle, uint32_t module, bool powerOn)
set audio codec module power.
Definition: fsl_codec_adapter.c:192
HAL_CODEC_SetVolume
status_t HAL_CODEC_SetVolume(void *handle, uint32_t playChannel, uint32_t volume)
set audio codec module volume.
Definition: fsl_codec_adapter.c:134
HAL_CODEC_SetFormat
status_t HAL_CODEC_SetFormat(void *handle, uint32_t mclk, uint32_t sampleRate, uint32_t bitWidth)
set audio data format.
Definition: fsl_codec_adapter.c:118
kCODEC_WM8960
@ kCODEC_WM8960
Definition: fsl_codec_adapter.h:26
HAL_CODEC_Deinit
status_t HAL_CODEC_Deinit(void *handle)
Codec de-initilization.
Definition: fsl_codec_adapter.c:102
HAL_CODEC_ModuleControl
status_t HAL_CODEC_ModuleControl(void *handle, uint32_t cmd, uint32_t data)
codec module control.
Definition: fsl_codec_adapter.c:254
fsl_wm8960.h
HAL_CODEC_SetPlay
status_t HAL_CODEC_SetPlay(void *handle, uint32_t playSource)
codec set play source.
Definition: fsl_codec_adapter.c:237
_codec_type
_codec_type
codec type
Definition: fsl_codec_adapter.h:24
HAL_CODEC_SetMute
status_t HAL_CODEC_SetMute(void *handle, uint32_t playChannel, bool isMute)
set audio codec module mute.
Definition: fsl_codec_adapter.c:163
config
static sai_transceiver_t config
Definition: imxrt1050/imxrt1050-evkb/source/pv_audio_rec.c:75
HAL_CODEC_SetRecordChannel
status_t HAL_CODEC_SetRecordChannel(void *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel)
codec set record channel.
Definition: fsl_codec_adapter.c:211
cmd
string cmd
HAL_CODEC_SetRecord
status_t HAL_CODEC_SetRecord(void *handle, uint32_t recordSource)
codec set record source.
Definition: fsl_codec_adapter.c:224
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:189
HAL_CODEC_Init
status_t HAL_CODEC_Init(void *handle, void *config)
Codec initilization.
Definition: fsl_codec_adapter.c:81


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:56