fsl_wm8904.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, Freescale Semiconductor, Inc.
3  * Copyright 2016-2019 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_WM8904_H_
10 #define _FSL_WM8904_H_
11 
12 #include "fsl_common.h"
13 #include "fsl_codec_i2c.h"
19 /*******************************************************************************
20  * Definitions
21  ******************************************************************************/
25 #define FSL_WM8904_DRIVER_VERSION (MAKE_VERSION(2, 4, 1))
26 
29 #ifndef WM8904_I2C_HANDLER_SIZE
30 #define WM8904_I2C_HANDLER_SIZE (CODEC_I2C_MASTER_HANDLER_SIZE)
31 #endif
32 
33 #ifndef WM8904_DEBUG_REGISTER
34 #define WM8904_DEBUG_REGISTER 0
35 #endif
36 
38 #define WM8904_RESET (0x00)
39 #define WM8904_ANALOG_ADC_0 (0x0A)
40 #define WM8904_POWER_MGMT_0 (0x0C)
41 #define WM8904_POWER_MGMT_2 (0x0E)
42 #define WM8904_POWER_MGMT_3 (0x0F)
43 #define WM8904_POWER_MGMT_6 (0x12)
44 #define WM8904_CLK_RATES_0 (0x14)
45 #define WM8904_CLK_RATES_1 (0x15)
46 #define WM8904_CLK_RATES_2 (0x16)
47 #define WM8904_AUDIO_IF_0 (0x18)
48 #define WM8904_AUDIO_IF_1 (0x19)
49 #define WM8904_AUDIO_IF_2 (0x1A)
50 #define WM8904_AUDIO_IF_3 (0x1B)
51 #define WM8904_DAC_DIG_1 (0x21)
52 #define WM8904_DAC_DIG_0 (0x27)
53 #define WM8904_ANALOG_LEFT_IN_0 (0x2C)
54 #define WM8904_ANALOG_RIGHT_IN_0 (0x2D)
55 #define WM8904_ANALOG_LEFT_IN_1 (0x2E)
56 #define WM8904_ANALOG_RIGHT_IN_1 (0x2F)
57 #define WM8904_ANALOG_OUT1_LEFT (0x39)
58 #define WM8904_ANALOG_OUT1_RIGHT (0x3A)
59 #define WM8904_ANALOG_OUT12_ZC (0x3D)
60 #define WM8904_DC_SERVO_0 (0x43)
61 #define WM8904_ANALOG_HP_0 (0x5A)
62 #define WM8904_CHRG_PUMP_0 (0x62)
63 #define WM8904_CLS_W_0 (0x68)
64 #define WM8904_WRT_SEQUENCER_0 (0x6C)
65 #define WM8904_WRT_SEQUENCER_3 (0x6F)
66 #define WM8904_WRT_SEQUENCER_4 (0x70)
67 #define WM8904_DAC_DIGITAL_VOLUME_LEFT (0x1E)
68 #define WM8904_DAC_DIGITAL_VOLUME_RIGHT (0x1F)
69 #define WM8904_ADC_DIGITAL_VOLUME_LEFT (0x24)
70 #define WM8904_ADC_DIGITAL_VOLUME_RIGHT (0x25)
71 #define WM8904_ANALOG_OUT2_LEFT (0x3B)
72 #define WM8904_ANALOG_OUT2_RIGHT (0x3C)
73 #define WM8904_GPIO_CONTROL_4 (0x7C)
74 /* FLL control register */
75 #define WM8904_FLL_CONTROL_1 (0x74)
76 #define WM8904_FLL_CONTROL_2 (0x75)
77 #define WM8904_FLL_CONTROL_3 (0x76)
78 #define WM8904_FLL_CONTROL_4 (0x77)
79 #define WM8904_FLL_CONTROL_5 (0x78)
80 /* GPIO control register */
81 #define WM8904_GPIO_CONTROL_1 (0x79)
82 #define WM8904_GPIO_CONTROL_2 (0x7A)
83 #define WM8904_GPIO_CONTROL_3 (0x7B)
84 #define WM8904_GPIO_CONTROL_4 (0x7C)
85 /* fll nco */
86 #define WM8904_FLL_NCO_TEST_0 (0xF7U)
87 #define WM8904_FLL_NCO_TEST_1 (0xF8U)
88 
90 #define WM8904_I2C_ADDRESS (0x1A)
91 
93 #define WM8904_I2C_BITRATE (400000U)
94 
97 {
100 };
101 
104 {
107 };
108 
110 typedef enum _wm8904_module
111 {
118 
121 {
126 };
127 
129 typedef enum _wm8904_timeslot
130 {
134 
136 typedef enum _wm8904_protocol
137 {
142  kWM8904_ProtocolPCMB = 0x3 | (1 << 4),
144 
146 typedef enum _wm8904_fs_ratio
147 {
159 
162 {
170 
172 typedef enum _wm8904_bit_width
173 {
179 
182 {
187 };
188 
191 {
204 };
205 
208 {
211 };
212 
215 {
219 
222 {
225 
227 typedef struct _wm8904_fll_config
228 {
230  uint32_t refClock_HZ;
231  uint32_t outputClock_HZ;
233 
235 typedef struct _wm8904_audio_format
236 {
241 
243 typedef struct _wm8904_config
244 {
245  bool master;
250  uint32_t mclk_HZ;
252  uint16_t recordSource;
253  uint16_t recordChannelLeft;
255  uint16_t playSource;
257  uint8_t slaveAddress;
260 
263 typedef struct _wm8904_handle
264 {
268 
269 /*******************************************************************************
270  * API
271  ******************************************************************************/
272 #if defined(__cplusplus)
273 extern "C" {
274 #endif
275 
284 status_t WM8904_WriteRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t value);
285 
294 status_t WM8904_ReadRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t *value);
295 
305 status_t WM8904_ModifyRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t mask, uint16_t value);
306 
313 status_t WM8904_Init(wm8904_handle_t *handle, wm8904_config_t *wm8904_config);
314 
325 
340 
349 status_t WM8904_SetMasterSlave(wm8904_handle_t *handle, bool master);
350 
361 status_t WM8904_SeMasterClock(wm8904_handle_t *handle, uint32_t sysclk, uint32_t sampleRate, uint32_t bitWidth);
362 
373 
383 
395 status_t WM8904_SetAudioFormat(wm8904_handle_t *handle, uint32_t sysclk, uint32_t sampleRate, uint32_t bitWidth);
396 
407 status_t WM8904_CheckAudioFormat(wm8904_handle_t *handle, wm8904_audio_format_t *format, uint32_t mclkFreq);
408 
422 status_t WM8904_SetVolume(wm8904_handle_t *handle, uint16_t volumeLeft, uint16_t volumeRight);
423 
433 status_t WM8904_SetMute(wm8904_handle_t *handle, bool muteLeft, bool muteRight);
434 
443 status_t WM8904_SelectLRCPolarity(wm8904_handle_t *handle, uint32_t polarity);
444 
454 
464 
465 #if WM8904_DEBUG_REGISTER
466 
473 status_t WM8904_PrintRegisters(wm8904_handle_t *handle);
474 #endif
475 
485 status_t WM8904_SetModulePower(wm8904_handle_t *handle, wm8904_module_t module, bool isEnabled);
486 
500 status_t WM8904_SetChannelVolume(wm8904_handle_t *handle, uint32_t channel, uint32_t volume);
501 
511 status_t WM8904_SetRecord(wm8904_handle_t *handle, uint32_t recordSource);
512 
524 status_t WM8904_SetRecordChannel(wm8904_handle_t *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel);
525 
535 status_t WM8904_SetPlay(wm8904_handle_t *handle, uint32_t playSource);
536 
546 status_t WM8904_SetChannelMute(wm8904_handle_t *handle, uint32_t channel, bool isMute);
547 
548 #if defined(__cplusplus)
549 }
550 #endif
551 
554 #endif /* _FSL_WM8904_H_ */
WM8904_CheckAudioFormat
status_t WM8904_CheckAudioFormat(wm8904_handle_t *handle, wm8904_audio_format_t *format, uint32_t mclkFreq)
check and update the audio data format. This api is used check the fsRatio setting based on the mclk ...
Definition: fsl_wm8904.c:769
fsl_common.h
_wm8904_config::playSource
uint16_t playSource
Definition: fsl_wm8904.h:255
_wm8904_lrc_polarity
_wm8904_lrc_polarity
WM8904 lrc polarity.
Definition: fsl_wm8904.h:103
kWM8904_RecordSourceDigitalMic
@ kWM8904_RecordSourceDigitalMic
Definition: fsl_wm8904.h:186
WM8904_SetChannelVolume
status_t WM8904_SetChannelVolume(wm8904_handle_t *handle, uint32_t channel, uint32_t volume)
Sets the channel output volume.
Definition: fsl_wm8904.c:1059
kWM8904_FsRatio512X
@ kWM8904_FsRatio512X
Definition: fsl_wm8904.h:153
kWM8904_FsRatio64X
@ kWM8904_FsRatio64X
Definition: fsl_wm8904.h:148
kWM8904_BitWidth20
@ kWM8904_BitWidth20
Definition: fsl_wm8904.h:175
kWM8904_ModuleLineout
@ kWM8904_ModuleLineout
Definition: fsl_wm8904.h:116
kWM8904_FsRatio1536X
@ kWM8904_FsRatio1536X
Definition: fsl_wm8904.h:157
kWM8904_SampleRate16kHz
@ kWM8904_SampleRate16kHz
Definition: fsl_wm8904.h:165
_wm8904_sys_clk_source
_wm8904_sys_clk_source
wm8904 system clock source
Definition: fsl_wm8904.h:214
_wm8904_fll_config::refClock_HZ
uint32_t refClock_HZ
Definition: fsl_wm8904.h:230
_wm8904_config::i2cConfig
codec_i2c_config_t i2cConfig
Definition: fsl_wm8904.h:258
_wm8904_record_channel
_wm8904_record_channel
wm8904 record channel
Definition: fsl_wm8904.h:190
wm8904_bit_width_t
enum _wm8904_bit_width wm8904_bit_width_t
Bit width.
_wm8904_fll_config::outputClock_HZ
uint32_t outputClock_HZ
Definition: fsl_wm8904.h:231
kWM8904_ModuleHeadphone
@ kWM8904_ModuleHeadphone
Definition: fsl_wm8904.h:115
kWM8904_RecordChannelLeft3
@ kWM8904_RecordChannelLeft3
Definition: fsl_wm8904.h:194
kWM8904_FsRatio384X
@ kWM8904_FsRatio384X
Definition: fsl_wm8904.h:152
kStatus_WM8904_Success
@ kStatus_WM8904_Success
Definition: fsl_wm8904.h:98
kWM8904_HeadphoneRight
@ kWM8904_HeadphoneRight
Definition: fsl_wm8904.h:123
kWM8904_SampleRate12kHz
@ kWM8904_SampleRate12kHz
Definition: fsl_wm8904.h:164
kWM8904_FsRatio1024X
@ kWM8904_FsRatio1024X
Definition: fsl_wm8904.h:155
kWM8904_HeadphoneLeft
@ kWM8904_HeadphoneLeft
Definition: fsl_wm8904.h:122
kWM8904_PlaySourcePGA
@ kWM8904_PlaySourcePGA
Definition: fsl_wm8904.h:209
_wm8904_timeslot
_wm8904_timeslot
WM8904 time slot.
Definition: fsl_wm8904.h:129
kWM8904_SampleRate8kHz
@ kWM8904_SampleRate8kHz
Definition: fsl_wm8904.h:163
fsl_codec_i2c.h
kWM8904_FsRatio1408X
@ kWM8904_FsRatio1408X
Definition: fsl_wm8904.h:156
kWM8904_FsRatio192X
@ kWM8904_FsRatio192X
Definition: fsl_wm8904.h:150
kWM8904_TimeSlot1
@ kWM8904_TimeSlot1
Definition: fsl_wm8904.h:132
_wm8904_config
Configuration structure of WM8904.
Definition: fsl_wm8904.h:243
wm8904_audio_format_t
struct _wm8904_audio_format wm8904_audio_format_t
Audio format configuration.
kWM8904_ProtocolLeftJustified
@ kWM8904_ProtocolLeftJustified
Definition: fsl_wm8904.h:139
WM8904_SetModulePower
status_t WM8904_SetModulePower(wm8904_handle_t *handle, wm8904_module_t module, bool isEnabled)
Definition: fsl_wm8904.c:1145
_wm8904_audio_format::bitWidth
wm8904_bit_width_t bitWidth
Definition: fsl_wm8904.h:239
kWM8904_ModuleADC
@ kWM8904_ModuleADC
Definition: fsl_wm8904.h:112
_wm8904_fs_ratio
_wm8904_fs_ratio
The SYSCLK / fs ratio.
Definition: fsl_wm8904.h:146
kWM8904_LineoutLeft
@ kWM8904_LineoutLeft
Definition: fsl_wm8904.h:124
WM8904_SeMasterClock
status_t WM8904_SeMasterClock(wm8904_handle_t *handle, uint32_t sysclk, uint32_t sampleRate, uint32_t bitWidth)
Sets WM8904 master clock configuration.
Definition: fsl_wm8904.c:485
_wm8904_config::recordChannelLeft
uint16_t recordChannelLeft
Definition: fsl_wm8904.h:253
_codec_i2c_config
CODEC I2C configurations structure.
Definition: fsl_codec_i2c.h:39
_wm8904_config::protocol
wm8904_protocol_t protocol
Definition: fsl_wm8904.h:248
_wm8904_audio_format::fsRatio
wm8904_fs_ratio_t fsRatio
Definition: fsl_wm8904.h:237
kWM8904_ProtocolPCMA
@ kWM8904_ProtocolPCMA
Definition: fsl_wm8904.h:141
wm8904_protocol_t
enum _wm8904_protocol wm8904_protocol_t
The audio data transfer protocol.
wm8904_sys_clk_source_t
enum _wm8904_sys_clk_source wm8904_sys_clk_source_t
wm8904 system clock source
kWM8904_LRCPolarityNormal
@ kWM8904_LRCPolarityNormal
Definition: fsl_wm8904.h:105
kWM8904_ModuleDAC
@ kWM8904_ModuleDAC
Definition: fsl_wm8904.h:113
WM8904_Deinit
status_t WM8904_Deinit(wm8904_handle_t *handle)
Deinitializes the WM8904 codec.
Definition: fsl_wm8904.c:432
_wm8904_config::master
bool master
Definition: fsl_wm8904.h:245
_wm8904_record_source
_wm8904_record_source
wm8904 record source
Definition: fsl_wm8904.h:181
kWM8904_RecordChannelDifferentialPositive1
@ kWM8904_RecordChannelDifferentialPositive1
Definition: fsl_wm8904.h:198
kWM8904_FLLClkSourceMCLK
@ kWM8904_FLLClkSourceMCLK
Definition: fsl_wm8904.h:223
kWM8904_ModulePGA
@ kWM8904_ModulePGA
Definition: fsl_wm8904.h:114
kWM8904_RecordSourceDifferentialMic
@ kWM8904_RecordSourceDifferentialMic
Definition: fsl_wm8904.h:185
WM8904_SetPlay
status_t WM8904_SetPlay(wm8904_handle_t *handle, uint32_t playSource)
SET the WM8904 play source.
Definition: fsl_wm8904.c:1339
kWM8904_ProtocolRightJustified
@ kWM8904_ProtocolRightJustified
Definition: fsl_wm8904.h:140
kWM8904_SysClkSourceFLL
@ kWM8904_SysClkSourceFLL
Definition: fsl_wm8904.h:217
_wm8904_audio_format
Audio format configuration.
Definition: fsl_wm8904.h:235
WM8904_WriteRegister
status_t WM8904_WriteRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t value)
WM8904 write register.
Definition: fsl_wm8904.c:129
kWM8904_RecordChannelDifferentialNegative3
@ kWM8904_RecordChannelDifferentialNegative3
Definition: fsl_wm8904.h:203
kWM8904_LRCPolarityInverted
@ kWM8904_LRCPolarityInverted
Definition: fsl_wm8904.h:106
_wm8904_fll_config::source
wm8904_fll_clk_source_t source
Definition: fsl_wm8904.h:229
_wm8904_fll_clk_source
_wm8904_fll_clk_source
wm8904 fll clock source
Definition: fsl_wm8904.h:221
kStatus_WM8904_Fail
@ kStatus_WM8904_Fail
Definition: fsl_wm8904.h:99
kWM8904_RecordChannelDifferentialPositive3
@ kWM8904_RecordChannelDifferentialPositive3
Definition: fsl_wm8904.h:200
kWM8904_RecordChannelLeft2
@ kWM8904_RecordChannelLeft2
Definition: fsl_wm8904.h:193
wm8904_fs_ratio_t
enum _wm8904_fs_ratio wm8904_fs_ratio_t
The SYSCLK / fs ratio.
kWM8904_RecordChannelRight3
@ kWM8904_RecordChannelRight3
Definition: fsl_wm8904.h:197
kWM8904_ProtocolPCMB
@ kWM8904_ProtocolPCMB
Definition: fsl_wm8904.h:142
WM8904_ModifyRegister
status_t WM8904_ModifyRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t mask, uint16_t value)
WM8904 modify register.
Definition: fsl_wm8904.c:171
WM8904_I2C_HANDLER_SIZE
#define WM8904_I2C_HANDLER_SIZE
wm8904 handle size
Definition: fsl_wm8904.h:30
WM8904_Init
status_t WM8904_Init(wm8904_handle_t *handle, wm8904_config_t *wm8904_config)
Initializes WM8904.
Definition: fsl_wm8904.c:194
WM8904_SetRecordChannel
status_t WM8904_SetRecordChannel(wm8904_handle_t *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel)
SET the WM8904 record source.
Definition: fsl_wm8904.c:1250
kWM8904_RecordChannelLeft1
@ kWM8904_RecordChannelLeft1
Definition: fsl_wm8904.h:192
kWM8904_BitWidth16
@ kWM8904_BitWidth16
Definition: fsl_wm8904.h:174
kWM8904_LineoutRight
@ kWM8904_LineoutRight
Definition: fsl_wm8904.h:125
wm8904_fll_clk_source_t
enum _wm8904_fll_clk_source wm8904_fll_clk_source_t
wm8904 fll clock source
WM8904_SetProtocol
status_t WM8904_SetProtocol(wm8904_handle_t *handle, wm8904_protocol_t protocol)
Sets the audio data transfer protocol.
Definition: fsl_wm8904.c:715
wm8904_sample_rate_t
enum _wm8904_sample_rate wm8904_sample_rate_t
Sample rate.
kWM8904_RecordSourceLineInput
@ kWM8904_RecordSourceLineInput
Definition: fsl_wm8904.h:184
_wm8904_config::recordChannelRight
uint16_t recordChannelRight
Definition: fsl_wm8904.h:254
WM8904_SetMute
status_t WM8904_SetMute(wm8904_handle_t *handle, bool muteLeft, bool muteRight)
Sets the headphone output mute.
Definition: fsl_wm8904.c:994
_wm8904_handle
wm8904 codec handler
Definition: fsl_wm8904.h:263
kWM8904_FsRatio768X
@ kWM8904_FsRatio768X
Definition: fsl_wm8904.h:154
_wm8904_config::slaveAddress
uint8_t slaveAddress
Definition: fsl_wm8904.h:257
WM8904_ReadRegister
status_t WM8904_ReadRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t *value)
WM8904 write register.
Definition: fsl_wm8904.c:147
wm8904_handle_t
struct _wm8904_handle wm8904_handle_t
wm8904 codec handler
_wm8904_config::fll
wm8904_fll_config_t * fll
Definition: fsl_wm8904.h:247
kWM8904_TimeSlot0
@ kWM8904_TimeSlot0
Definition: fsl_wm8904.h:131
kWM8904_SampleRate24kHz
@ kWM8904_SampleRate24kHz
Definition: fsl_wm8904.h:166
kWM8904_BitWidth24
@ kWM8904_BitWidth24
Definition: fsl_wm8904.h:176
WM8904_EnableADCTDMMode
status_t WM8904_EnableADCTDMMode(wm8904_handle_t *handle, wm8904_timeslot_t timeSlot)
Enable WM8904 ADC time slot.
Definition: fsl_wm8904.c:754
kWM8904_RecordChannelDifferentialNegative1
@ kWM8904_RecordChannelDifferentialNegative1
Definition: fsl_wm8904.h:201
_wm8904_sample_rate
_wm8904_sample_rate
Sample rate.
Definition: fsl_wm8904.h:161
_wm8904_config::format
wm8904_audio_format_t format
Definition: fsl_wm8904.h:249
wm8904_module_t
enum _wm8904_module wm8904_module_t
wm8904 module value
kWM8904_RecordChannelRight1
@ kWM8904_RecordChannelRight1
Definition: fsl_wm8904.h:195
kWM8904_FsRatio256X
@ kWM8904_FsRatio256X
Definition: fsl_wm8904.h:151
wm8904_timeslot_t
enum _wm8904_timeslot wm8904_timeslot_t
WM8904 time slot.
kWM8904_SampleRate32kHz
@ kWM8904_SampleRate32kHz
Definition: fsl_wm8904.h:167
_wm8904_audio_format::sampleRate
wm8904_sample_rate_t sampleRate
Definition: fsl_wm8904.h:238
_wm8904_handle::i2cHandle
uint8_t i2cHandle[WM8904_I2C_HANDLER_SIZE]
Definition: fsl_wm8904.h:266
kWM8904_RecordChannelDifferentialPositive2
@ kWM8904_RecordChannelDifferentialPositive2
Definition: fsl_wm8904.h:199
_wm8904_config::sysClkSource
wm8904_sys_clk_source_t sysClkSource
Definition: fsl_wm8904.h:246
_wm8904_play_source
_wm8904_play_source
wm8904 play source
Definition: fsl_wm8904.h:207
kWM8904_RecordChannelDifferentialNegative2
@ kWM8904_RecordChannelDifferentialNegative2
Definition: fsl_wm8904.h:202
_wm8904_status
_wm8904_status
WM8904 status return codes.
Definition: fsl_wm8904.h:96
kWM8904_ProtocolI2S
@ kWM8904_ProtocolI2S
Definition: fsl_wm8904.h:138
kWM8904_FsRatio128X
@ kWM8904_FsRatio128X
Definition: fsl_wm8904.h:149
_wm8904_fll_config
wm8904 fll configuration
Definition: fsl_wm8904.h:227
_wm8904_handle::config
wm8904_config_t * config
Definition: fsl_wm8904.h:265
WM8904_GetDefaultConfig
void WM8904_GetDefaultConfig(wm8904_config_t *config)
Fills the configuration structure with default values.
Definition: fsl_wm8904.c:456
wm8904_config_t
struct _wm8904_config wm8904_config_t
Configuration structure of WM8904.
kWM8904_SysClkSourceMCLK
@ kWM8904_SysClkSourceMCLK
Definition: fsl_wm8904.h:216
_wm8904_protocol
_wm8904_protocol
The audio data transfer protocol.
Definition: fsl_wm8904.h:136
_wm8904_config::mclk_HZ
uint32_t mclk_HZ
Definition: fsl_wm8904.h:250
WM8904_SelectLRCPolarity
status_t WM8904_SelectLRCPolarity(wm8904_handle_t *handle, uint32_t polarity)
Select LRC polarity.
Definition: fsl_wm8904.c:728
WM8904_SetRecord
status_t WM8904_SetRecord(wm8904_handle_t *handle, uint32_t recordSource)
SET the WM8904 record source.
Definition: fsl_wm8904.c:1195
config
static sai_transceiver_t config
Definition: imxrt1050/imxrt1050-evkb/source/pv_audio_rec.c:75
kWM8904_BitWidth32
@ kWM8904_BitWidth32
Definition: fsl_wm8904.h:177
WM8904_SetVolume
status_t WM8904_SetVolume(wm8904_handle_t *handle, uint16_t volumeLeft, uint16_t volumeRight)
Sets the module output volume.
Definition: fsl_wm8904.c:966
WM8904_SetAudioFormat
status_t WM8904_SetAudioFormat(wm8904_handle_t *handle, uint32_t sysclk, uint32_t sampleRate, uint32_t bitWidth)
Sets the audio data format.
Definition: fsl_wm8904.c:860
_wm8904_play_channel
_wm8904_play_channel
wm8904 play channel
Definition: fsl_wm8904.h:120
WM8904_EnableDACTDMMode
status_t WM8904_EnableDACTDMMode(wm8904_handle_t *handle, wm8904_timeslot_t timeSlot)
Enable WM8904 DAC time slot.
Definition: fsl_wm8904.c:741
kWM8904_SampleRate48kHz
@ kWM8904_SampleRate48kHz
Definition: fsl_wm8904.h:168
kWM8904_PlaySourceDAC
@ kWM8904_PlaySourceDAC
Definition: fsl_wm8904.h:210
WM8904_SetFLLConfig
status_t WM8904_SetFLLConfig(wm8904_handle_t *handle, wm8904_fll_config_t *config)
WM8904 set PLL configuration This function will enable the GPIO1 FLL clock output function,...
Definition: fsl_wm8904.c:591
WM8904_SetMasterSlave
status_t WM8904_SetMasterSlave(wm8904_handle_t *handle, bool master)
Sets WM8904 as master or slave.
Definition: fsl_wm8904.c:474
wm8904_fll_config_t
struct _wm8904_fll_config wm8904_fll_config_t
wm8904 fll configuration
_wm8904_bit_width
_wm8904_bit_width
Bit width.
Definition: fsl_wm8904.h:172
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:189
kWM8904_RecordChannelRight2
@ kWM8904_RecordChannelRight2
Definition: fsl_wm8904.h:196
_wm8904_config::recordSource
uint16_t recordSource
Definition: fsl_wm8904.h:252
kWM8904_RecordSourceDifferentialLine
@ kWM8904_RecordSourceDifferentialLine
Definition: fsl_wm8904.h:183
_wm8904_module
_wm8904_module
wm8904 module value
Definition: fsl_wm8904.h:110
WM8904_SetChannelMute
status_t WM8904_SetChannelMute(wm8904_handle_t *handle, uint32_t channel, bool isMute)
Sets the channel mute.
Definition: fsl_wm8904.c:1101


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