Developer World
Spresense SDK Library v1.4.2-3df2e9d
cxd56_audio.h
Go to the documentation of this file.
1 /****************************************************************************
2  * bsp/include/arch/chip/cxd56_audio.h
3  *
4  * Copyright 2018 Sony Semiconductor Solutions Corporation
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in
14  * the documentation and/or other materials provided with the
15  * distribution.
16  * 3. Neither the name of Sony Semiconductor Solutions Corporation nor
17  * the names of its contributors may be used to endorse or promote
18  * products derived from this software without specific prior written
19  * permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *
34  ****************************************************************************/
40 #ifndef __BSP_INCLUDE_ARCH_CHIP_CXD56_AUDIO_H
41 #define __BSP_INCLUDE_ARCH_CHIP_CXD56_AUDIO_H
42 
43 /* API Documents creater with Doxgen */
44 
54 /****************************************************************************
55  * Included Files
56  ***************************************************************************/
57 
58 #include <stdio.h>
59 #include <stdint.h>
60 #include <stdbool.h>
61 
62 /****************************************************************************
63  * Pre-processor Definitions
64  ***************************************************************************/
65 
68 #define CXD56_AUDIO_MIC_CH_MAX 8
69 
72 #define CXD56_AUDIO_DNC_FW_SIZE 512
73 #define CXD56_AUDIO_DNC_CFG_SIZE 128
74 
77 #define CXD56_AUDIO_DEQ_BAND_NUM 6
78 
79 /****************************************************************************
80  * Public Types
81  ****************************************************************************/
82 
85 #define CXD56_AUDIO_ECODE uint16_t
86 
87 #define CXD56_AUDIO_ECODE_OK 0x0000
88 #define CXD56_AUDIO_ECODE_POW 0x1000
89 #define CXD56_AUDIO_ECODE_FIL 0x2000
90 #define CXD56_AUDIO_ECODE_MIC 0x3000
91 #define CXD56_AUDIO_ECODE_VOL 0x4000
92 #define CXD56_AUDIO_ECODE_DIG 0x5000
93 #define CXD56_AUDIO_ECODE_BEP 0x6000
94 #define CXD56_AUDIO_ECODE_INT 0x7000
95 #define CXD56_AUDIO_ECODE_DMA 0x8000
96 #define CXD56_AUDIO_ECODE_ANA 0x9000
97 #define CXD56_AUDIO_ECODE_REG 0xA000
98 #define CXD56_AUDIO_ECODE_CFG 0xB000
99 
100 /* Error code of power */
101 
102 #define CXD56_AUDIO_ECODE_POW_STATE (CXD56_AUDIO_ECODE_POW | 0x01)
103 
104 /* Error code of filter */
105 
106 #define CXD56_AUDIO_ECODE_FIL_DNC_BIN (CXD56_AUDIO_ECODE_FIL | 0x01)
107 
108 /* Error code of mic */
109 
110 #define CXD56_AUDIO_ECODE_MIC_NO_ANA (CXD56_AUDIO_ECODE_MIC | 0x01)
111 #define CXD56_AUDIO_ECODE_MIC_ARG_NULL (CXD56_AUDIO_ECODE_MIC | 0x02)
112 
113 /* Error code of volume */
114 
115 #define CXD56_AUDIO_ECODE_VOL_ID (CXD56_AUDIO_ECODE_VOL | 0x01)
116 #define CXD56_AUDIO_ECODE_VOL_MAX (CXD56_AUDIO_ECODE_VOL | 0x02)
117 #define CXD56_AUDIO_ECODE_VOL_MIN (CXD56_AUDIO_ECODE_VOL | 0x03)
118 
119 /* Error code of digital */
120 
121 /* Error code of beep */
122 
123 #define CXD56_AUDIO_ECODE_BEP_FREQ_MAX (CXD56_AUDIO_ECODE_BEP | 0x01)
124 #define CXD56_AUDIO_ECODE_BEP_FREQ_MIN (CXD56_AUDIO_ECODE_BEP | 0x02)
125 #define CXD56_AUDIO_ECODE_BEP_VOL_MAX (CXD56_AUDIO_ECODE_BEP | 0x03)
126 #define CXD56_AUDIO_ECODE_BEP_VOL_MIN (CXD56_AUDIO_ECODE_BEP | 0x04)
127 
128 /* Error code of interrupt */
129 
130 /* Error code of dma */
131 
132 #define CXD56_AUDIO_ECODE_DMA_ARG_NULL (CXD56_AUDIO_ECODE_DMA | 0x01)
133 #define CXD56_AUDIO_ECODE_DMA_PATH_INV (CXD56_AUDIO_ECODE_DMA | 0x02)
134 #define CXD56_AUDIO_ECODE_DMA_PATH_COMB (CXD56_AUDIO_ECODE_DMA | 0x03)
135 #define CXD56_AUDIO_ECODE_DMA_PATH_DUP (CXD56_AUDIO_ECODE_DMA | 0x04)
136 #define CXD56_AUDIO_ECODE_DMA_PATH_MAX (CXD56_AUDIO_ECODE_DMA | 0x05)
137 #define CXD56_AUDIO_ECODE_DMA_HANDLE_NULL (CXD56_AUDIO_ECODE_DMA | 0x06)
138 #define CXD56_AUDIO_ECODE_DMA_HANDLE_INV (CXD56_AUDIO_ECODE_DMA | 0x07)
139 #define CXD56_AUDIO_ECODE_DMA_CH_NO_ENABLE (CXD56_AUDIO_ECODE_DMA | 0x08)
140 #define CXD56_AUDIO_ECODE_DMA_CH1_4_INV (CXD56_AUDIO_ECODE_DMA | 0x09)
141 #define CXD56_AUDIO_ECODE_DMA_CH5_8_INV (CXD56_AUDIO_ECODE_DMA | 0x0a)
142 #define CXD56_AUDIO_ECODE_DMA_SMP_TIMEOUT (CXD56_AUDIO_ECODE_DMA | 0x0b)
143 #define CXD56_AUDIO_ECODE_DMA_BUSY (CXD56_AUDIO_ECODE_DMA | 0x0c)
144 
145 #define CXD56_AUDIO_ECODE_DMA_CMPLT (CXD56_AUDIO_ECODE_DMA | 0x11)
146 #define CXD56_AUDIO_ECODE_DMA_TRANS (CXD56_AUDIO_ECODE_DMA | 0x12)
147 #define CXD56_AUDIO_ECODE_DMA_CMB (CXD56_AUDIO_ECODE_DMA | 0x13)
148 
149 /* Error code of analog */
150 
151 #define CXD56_AUDIO_ECODE_ANA_DISABLE (CXD56_AUDIO_ECODE_ANA | 0x01)
152 #define CXD56_AUDIO_ECODE_ANA_PWON (CXD56_AUDIO_ECODE_ANA | 0x02)
153 #define CXD56_AUDIO_ECODE_ANA_PWOFF (CXD56_AUDIO_ECODE_ANA | 0x03)
154 #define CXD56_AUDIO_ECODE_ANA_CLK_EN (CXD56_AUDIO_ECODE_ANA | 0x04)
155 #define CXD56_AUDIO_ECODE_ANA_CHKID (CXD56_AUDIO_ECODE_ANA | 0x05)
156 #define CXD56_AUDIO_ECODE_ANA_SERIAL (CXD56_AUDIO_ECODE_ANA | 0x06)
157 #define CXD56_AUDIO_ECODE_ANA_PWON_MBIAS (CXD56_AUDIO_ECODE_ANA | 0x07)
158 #define CXD56_AUDIO_ECODE_ANA_PWON_INPUT (CXD56_AUDIO_ECODE_ANA | 0x08)
159 #define CXD56_AUDIO_ECODE_ANA_SET_SMASTER (CXD56_AUDIO_ECODE_ANA | 0x09)
160 #define CXD56_AUDIO_ECODE_ANA_PWON_OUTPUT (CXD56_AUDIO_ECODE_ANA | 0x0A)
161 #define CXD56_AUDIO_ECODE_ANA_PWOFF_INPUT (CXD56_AUDIO_ECODE_ANA | 0x0B)
162 #define CXD56_AUDIO_ECODE_ANA_PWOFF_OUTPUT (CXD56_AUDIO_ECODE_ANA | 0x0C)
163 #define CXD56_AUDIO_ECODE_ANA_ENABLE_OUTPUT (CXD56_AUDIO_ECODE_ANA | 0x0D)
164 #define CXD56_AUDIO_ECODE_ANA_DISABLE_OUTPUT (CXD56_AUDIO_ECODE_ANA | 0x0E)
165 #define CXD56_AUDIO_ECODE_ANA_SET_MICGAIN (CXD56_AUDIO_ECODE_ANA | 0x0F)
166 #define CXD56_AUDIO_ECODE_ANA_NOTIFY_MICBOOT (CXD56_AUDIO_ECODE_ANA | 0x10)
167 
168 /* Error code of register */
169 
170 #define CXD56_AUDIO_ECODE_REG_AC (CXD56_AUDIO_ECODE_REG | 0x100)
171 #define CXD56_AUDIO_ECODE_REG_BCA (CXD56_AUDIO_ECODE_REG | 0x200)
172 
173 #define CXD56_AUDIO_ECODE_REG_AC_REVID (CXD56_AUDIO_ECODE_REG_AC | 0x01)
174 #define CXD56_AUDIO_ECODE_REG_AC_DEVID (CXD56_AUDIO_ECODE_REG_AC | 0x02)
175 #define CXD56_AUDIO_ECODE_REG_AC_MICMODE (CXD56_AUDIO_ECODE_REG_AC | 0x03)
176 #define CXD56_AUDIO_ECODE_REG_AC_ALCTGT (CXD56_AUDIO_ECODE_REG_AC | 0x04)
177 #define CXD56_AUDIO_ECODE_REG_AC_ALCKNEE (CXD56_AUDIO_ECODE_REG_AC | 0x05)
178 #define CXD56_AUDIO_ECODE_REG_AC_SPCLIMT (CXD56_AUDIO_ECODE_REG_AC | 0x06)
179 #define CXD56_AUDIO_ECODE_REG_AC_CLKMODE (CXD56_AUDIO_ECODE_REG_AC | 0x07)
180 #define CXD56_AUDIO_ECODE_REG_AC_SEL_INV (CXD56_AUDIO_ECODE_REG_AC | 0x08)
181 #define CXD56_AUDIO_ECODE_REG_AC_CSTE_VOL (CXD56_AUDIO_ECODE_REG_AC | 0x09)
182 
183 /* Error code of config */
184 
185 #define CXD56_AUDIO_ECODE_CFG_CLK_MODE (CXD56_AUDIO_ECODE_CFG | 0x01)
186 
187 enum cxd56_audio_state_e
188 {
189  /* Power OFF state */
190 
191  CXD56_AUDIO_POWER_STATE_OFF = 0,
192 
193  /* Power ON state */
194 
195  CXD56_AUDIO_POWER_STATE_ON
196 };
197 typedef enum cxd56_audio_state_e cxd56_audio_state_t;
198 
200 {
204 
208 };
209 typedef enum cxd56_audio_i2s_src_byp_e cxd56_audio_i2s_src_byp_t;
210 
212 {
216 
220 
224 };
225 typedef enum cxd56_audio_volid_e cxd56_audio_volid_t;
226 
227 
230 {
234 
238 
239 };
240 typedef enum cxd56_audio_dnc_id_e cxd56_audio_dnc_id_t;
241 
245 {
249 
253 
257 };
258 typedef enum cxd56_audio_dma_path_e cxd56_audio_dma_path_t;
259 
263 {
267 
271 
275 
279 
283 
287 
291 
295 
299 };
300 typedef enum cxd56_audio_signal_e cxd56_audio_signal_t;
301 
304 {
308 
312 
316 };
317 typedef enum cxd56_audio_dma_e cxd56_audio_dma_t;
318 
321 {
322  CXD56_AUDIO_OUTDEV_OFF = 0,
323  CXD56_AUDIO_OUTDEV_SP,
324  CXD56_AUDIO_OUTDEV_I2S
325 };
326 typedef enum cxd56_audio_outdev_e cxd56_audio_outdev_t;
327 
328 enum cxd56_audio_clkmode_e
329 {
330  CXD56_AUDIO_CLKMODE_NORMAL = 0,
331  CXD56_AUDIO_CLKMODE_HIRES,
332 };
333 typedef enum cxd56_audio_clkmode_e cxd56_audio_clkmode_t;
334 
335 enum cxd56_audio_dmafmt_e
336 {
337  CXD56_AUDIO_DMA_FMT_LR = 0,
338  CXD56_AUDIO_DMA_FMT_RL,
339 };
340 typedef enum cxd56_audio_dmafmt_e cxd56_audio_dmafmt_t;
341 
342 enum cxd56_audio_samp_fmt_e
343 {
344  CXD56_AUDIO_SAMP_FMT_24 = 0,
345  CXD56_AUDIO_SAMP_FMT_16
346 };
347 typedef enum cxd56_audio_samp_fmt_e cxd56_audio_samp_fmt_t;
348 
349 enum cxd56_audio_dsr_rate_e
350 {
351  CXD56_AUDIO_DSR_1STEP = 0x0,
352  CXD56_AUDIO_DSR_2STEP,
353  CXD56_AUDIO_DSR_4STEP,
354  CXD56_AUDIO_DSR_6STEP,
355  CXD56_AUDIO_DSR_8STEP,
356  CXD56_AUDIO_DSR_11STEP,
357  CXD56_AUDIO_DSR_12STEP,
358  CXD56_AUDIO_DSR_16STEP,
359 };
360 typedef enum cxd56_audio_dsr_rate_e cxd56_audio_dsr_rate_t;
361 
362 enum cxd56_audio_dma_state_e
363 {
364  CXD56_AUDIO_DMA_STATE_REDY = 0x0,
365  CXD56_AUDIO_DMA_STATE_RUN,
366 };
367 typedef enum cxd56_audio_dma_state_e cxd56_audio_dma_state_t;
368 
369 enum cxd56_audio_micdev_e
370 {
371  CXD56_AUDIO_MIC_DEV_NONE = 0,
372  CXD56_AUDIO_MIC_DEV_ANALOG,
373  CXD56_AUDIO_MIC_DEV_DIGITAL,
374  CXD56_AUDIO_MIC_DEV_ANADIG
375 };
376 typedef enum cxd56_audio_micdev_e cxd56_audio_micdev_t;
377 
378 enum cxd56_audio_sp_drv_e
379 {
380  CXD56_AUDIO_SP_DRV_LINEOUT = 0,
381  CXD56_AUDIO_SP_DRV_1DRIVER,
382  CXD56_AUDIO_SP_DRV_2DRIVER,
383  CXD56_AUDIO_SP_DRV_4DRIVER
384 };
385 typedef enum cxd56_audio_sp_drv_e cxd56_audio_sp_drv_t;
386 
388 {
389  uint32_t data_rate;
390  cxd56_audio_i2s_src_byp_t bypass_mode;
391 };
392 typedef struct cxd56_audio_i2s_param_s cxd56_audio_i2s_param_t;
393 
395 {
396  int32_t gain[CXD56_AUDIO_MIC_CH_MAX];
397 };
398 typedef struct cxd56_audio_mic_gain_s cxd56_audio_mic_gain_t;
399 
401 {
402  uint32_t firm[CXD56_AUDIO_DNC_FW_SIZE];
403  uint32_t config[CXD56_AUDIO_DNC_CFG_SIZE];
404 };
405 typedef struct cxd56_audio_dnc_bin_s cxd56_audio_dnc_bin_t;
406 
408 {
412 
416 
420 
424 
428 
432 };
433 typedef struct cxd56_audio_sel_s cxd56_audio_sel_t;
434 
436 {
437  uint32_t b0;
438  uint32_t b1;
439  uint32_t b2;
440  uint32_t a0;
441  uint32_t a1;
442 };
443 typedef struct cxd56_audio_deq_coef_func_s cxd56_audio_deq_coef_func_t;
444 
446 {
447  cxd56_audio_deq_coef_func_t coef[CXD56_AUDIO_DEQ_BAND_NUM];
448 };
449 typedef struct cxd56_audio_deq_coef_s cxd56_audio_deq_coef_t;
450 
452 {
453  uint8_t start;
454  uint8_t err_setting;
455  uint8_t buf_state;
456 };
457 typedef struct cxd56_audio_dma_mstate_s cxd56_audio_dma_mstate_t;
458 
461 typedef void (* cxd56_audio_dma_cb_t)(cxd56_audio_dma_t handle, uint32_t code);
462 
463 /****************************************************************************
464  * Public Data
465  ****************************************************************************/
466 
467 /****************************************************************************
468  * Inline Functions
469  ****************************************************************************/
470 
471 #ifdef __cplusplus
472 #define EXTERN extern "C"
473 extern "C" {
474 #else
475 #define EXTERN extern
476 #endif
477 
478 /****************************************************************************
479  * Public Function Prototypes
480  ****************************************************************************/
481 
488 
495 
504 CXD56_AUDIO_ECODE cxd56_audio_en_cstereo(bool sign_inv, int16_t vol);
505 
512 
519 
526 
535 CXD56_AUDIO_ECODE cxd56_audio_en_dnc(cxd56_audio_dnc_id_t id,
536  FAR cxd56_audio_dnc_bin_t *bin);
537 
545 CXD56_AUDIO_ECODE cxd56_audio_dis_dnc(cxd56_audio_dnc_id_t id);
546 
554 CXD56_AUDIO_ECODE cxd56_audio_en_deq(FAR cxd56_audio_deq_coef_t *coef);
555 
556 
563 
570 
577 
584 
591 
600 
609 CXD56_AUDIO_ECODE cxd56_audio_set_vol(cxd56_audio_volid_t id, int16_t vol);
610 
618 CXD56_AUDIO_ECODE cxd56_audio_mute_vol(cxd56_audio_volid_t id);
619 
627 CXD56_AUDIO_ECODE cxd56_audio_unmute_vol(cxd56_audio_volid_t id);
628 
637 CXD56_AUDIO_ECODE cxd56_audio_mute_vol_fade(cxd56_audio_volid_t id,
638  bool wait);
639 
648 CXD56_AUDIO_ECODE cxd56_audio_unmute_vol_fade(cxd56_audio_volid_t id,
649  bool wait);
650 
659 
668 
675 
682 
690 CXD56_AUDIO_ECODE cxd56_audio_set_micgain(FAR cxd56_audio_mic_gain_t *gain);
691 
692 
701 CXD56_AUDIO_ECODE cxd56_audio_set_deq(bool en, FAR cxd56_audio_deq_coef_t *deq);
702 
711 CXD56_AUDIO_ECODE cxd56_audio_get_dmahandle(cxd56_audio_dma_path_t path,
712  FAR cxd56_audio_dma_t *handle);
713 
721 CXD56_AUDIO_ECODE cxd56_audio_free_dmahandle(FAR cxd56_audio_dma_t handle);
722 
731 CXD56_AUDIO_ECODE cxd56_audio_set_datapath(cxd56_audio_signal_t sig,
732  cxd56_audio_sel_t sel);
733 
743 CXD56_AUDIO_ECODE cxd56_audio_init_dma(cxd56_audio_dma_t handle,
744  cxd56_audio_samp_fmt_t fmt,
745  FAR uint8_t *ch_num);
746 
755 CXD56_AUDIO_ECODE cxd56_audio_set_dmacb(cxd56_audio_dma_t handle,
756  FAR cxd56_audio_dma_cb_t cb);
757 
764 
771 
779 CXD56_AUDIO_ECODE cxd56_audio_clear_dmaerrint(cxd56_audio_dma_t handle);
780 
788 CXD56_AUDIO_ECODE cxd56_audio_mask_dmaerrint(cxd56_audio_dma_t handle);
789 
797 CXD56_AUDIO_ECODE cxd56_audio_unmask_dmaerrint(cxd56_audio_dma_t handle);
798 
808 CXD56_AUDIO_ECODE cxd56_audio_start_dma(cxd56_audio_dma_t handle,
809  uint32_t addr,
810  uint32_t sample);
811 
820 CXD56_AUDIO_ECODE cxd56_audio_stop_dma(cxd56_audio_dma_t handle);
821 
829 CXD56_AUDIO_ECODE cxd56_audio_set_clkmode(cxd56_audio_clkmode_t mode);
830 
836 cxd56_audio_clkmode_t cxd56_audio_get_clkmode(void);
837 
843 cxd56_audio_dmafmt_t cxd56_audio_get_dmafmt(void);
844 
850 cxd56_audio_micdev_t cxd56_audio_get_micdev(void);
851 
859 CXD56_AUDIO_ECODE cxd56_audio_en_digsft(cxd56_audio_dsr_rate_t rate);
860 
867 
874 
881 
887 cxd56_audio_state_t cxd56_audio_get_status(void);
888 
896 CXD56_AUDIO_ECODE cxd56_audio_set_spdriver(cxd56_audio_sp_drv_t sp_driver);
897 
903 cxd56_audio_sp_drv_t cxd56_audio_get_spdriver(void);
904 
914 
921 uint32_t cxd56_audio_get_micmap(void);
922 
923 #ifdef __cplusplus
924 } /* end of extern "C" */
925 #endif /* __cplusplus */
926 
927 #endif /* __BSP_INCLUDE_ARCH_CHIP_CXD56_AUDIO_H */
928 
#define CXD56_AUDIO_DNC_FW_SIZE
Definition: cxd56_audio.h:72
CXD56_AUDIO_ECODE cxd56_audio_dis_cstereo(void)
Disable clear stereo.
CXD56_AUDIO_ECODE cxd56_audio_poweroff_dnc(void)
Power off DNC.
cxd56_audio_dma_e
Definition: cxd56_audio.h:303
bool au_dat_sel2
Definition: cxd56_audio.h:415
cxd56_audio_dma_path_e
Definition: cxd56_audio.h:244
Definition: cxd56_audio.h:407
CXD56_AUDIO_ECODE cxd56_audio_en_dmaint(void)
Enable dma interrupt.
CXD56_AUDIO_ECODE cxd56_audio_en_input(void)
Enable BaseBand driver input.
Definition: cxd56_audio.h:274
Definition: cxd56_audio.h:445
Definition: cxd56_audio.h:207
Definition: cxd56_audio.h:256
CXD56_AUDIO_ECODE cxd56_audio_mute_vol(cxd56_audio_volid_t id)
Mute volume.
CXD56_AUDIO_ECODE cxd56_audio_free_dmahandle(FAR cxd56_audio_dma_t handle)
Free dma handle.
Definition: cxd56_audio.h:315
Definition: cxd56_audio.h:203
bool cod_insel3
Definition: cxd56_audio.h:423
Definition: cxd56_audio.h:400
bool src1in_sel
Definition: cxd56_audio.h:427
cxd56_audio_micdev_t cxd56_audio_get_micdev(void)
Get mic device type.
bool src2in_sel
Definition: cxd56_audio.h:431
CXD56_AUDIO_ECODE cxd56_audio_play_beep(void)
Play beep.
CXD56_AUDIO_ECODE cxd56_audio_mask_dmaerrint(cxd56_audio_dma_t handle)
Mask dma error interrupt.
CXD56_AUDIO_ECODE cxd56_audio_unmask_dmaerrint(cxd56_audio_dma_t handle)
Unmask dma error interrupt.
Definition: cxd56_audio.h:387
cxd56_audio_clkmode_t cxd56_audio_get_clkmode(void)
Get audio clock mode.
bool cod_insel2
Definition: cxd56_audio.h:419
CXD56_AUDIO_ECODE cxd56_audio_dis_dmaint(void)
Disable dma interrupt.
Definition: cxd56_audio.h:307
Definition: cxd56_audio.h:266
CXD56_AUDIO_ECODE cxd56_audio_dis_deq(void)
Disable DEQ.
Definition: cxd56_audio.h:270
#define CXD56_AUDIO_MIC_CH_MAX
Definition: cxd56_audio.h:68
CXD56_AUDIO_ECODE cxd56_audio_unmute_vol_fade(cxd56_audio_volid_t id, bool wait)
unmute volume with fade-in
CXD56_AUDIO_ECODE cxd56_audio_set_vol(cxd56_audio_volid_t id, int16_t vol)
Set volume.
Definition: cxd56_audio.h:223
CXD56_AUDIO_ECODE cxd56_audio_stop_dma(cxd56_audio_dma_t handle)
Stop dma transfer.
CXD56_AUDIO_ECODE cxd56_audio_set_micgain(FAR cxd56_audio_mic_gain_t *gain)
Set MIC gain.
Definition: cxd56_audio.h:219
Definition: cxd56_audio.h:394
CXD56_AUDIO_ECODE cxd56_audio_set_micmap(uint32_t map)
Set Mic mapping.
CXD56_AUDIO_ECODE cxd56_audio_en_cstereo(bool sign_inv, int16_t vol)
Enable clear stereo.
CXD56_AUDIO_ECODE cxd56_audio_get_dmahandle(cxd56_audio_dma_path_t path, FAR cxd56_audio_dma_t *handle)
Get dma handle.
CXD56_AUDIO_ECODE cxd56_audio_set_datapath(cxd56_audio_signal_t sig, cxd56_audio_sel_t sel)
Set internal data path.
CXD56_AUDIO_ECODE cxd56_audio_unmute_vol(cxd56_audio_volid_t id)
Unmute volume.
CXD56_AUDIO_ECODE cxd56_audio_set_spdriver(cxd56_audio_sp_drv_t sp_driver)
Set audio speaker driver mode.
Definition: cxd56_audio.h:248
CXD56_AUDIO_ECODE cxd56_audio_dis_digsft(void)
Disable digital soft ramp rate control.
CXD56_AUDIO_ECODE cxd56_audio_en_deq(FAR cxd56_audio_deq_coef_t *coef)
Disable DEQ.
CXD56_AUDIO_ECODE cxd56_audio_poweron_dnc(void)
Power on DNC.
CXD56_AUDIO_ECODE cxd56_audio_set_clkmode(cxd56_audio_clkmode_t mode)
Set audio clock mode.
Definition: cxd56_audio.h:294
Definition: cxd56_audio.h:237
Definition: cxd56_audio.h:435
uint32_t cxd56_audio_get_micmap(void)
Get Mic mapping.
cxd56_audio_sp_drv_t cxd56_audio_get_spdriver(void)
Get audio speaker driver mode.
CXD56_AUDIO_ECODE cxd56_audio_set_dmacb(cxd56_audio_dma_t handle, FAR cxd56_audio_dma_cb_t cb)
Initialize dma transfer function.
Definition: cxd56_audio.h:233
cxd56_audio_dnc_id_e
Definition: cxd56_audio.h:229
CXD56_AUDIO_ECODE cxd56_audio_poweroff(void)
Power off BaseBand driver.
CXD56_AUDIO_ECODE cxd56_audio_dis_dnc(cxd56_audio_dnc_id_t id)
Disable DNC.
CXD56_AUDIO_ECODE cxd56_audio_init_dma(cxd56_audio_dma_t handle, cxd56_audio_samp_fmt_t fmt, FAR uint8_t *ch_num)
Initialize dma transfer function.
cxd56_audio_i2s_src_byp_e
Definition: cxd56_audio.h:199
CXD56_AUDIO_ECODE cxd56_audio_set_beep_freq(uint16_t freq)
Set beep frequency parameter.
Definition: cxd56_audio.h:311
cxd56_audio_dmafmt_t cxd56_audio_get_dmafmt(void)
Get data format type of dma.
CXD56_AUDIO_ECODE cxd56_audio_en_i2s_io(void)
Enable I2S I/O.
cxd56_audio_signal_e
Definition: cxd56_audio.h:262
CXD56_AUDIO_ECODE cxd56_audio_start_dma(cxd56_audio_dma_t handle, uint32_t addr, uint32_t sample)
Start dma transfer.
CXD56_AUDIO_ECODE cxd56_audio_en_output(void)
Enable BaseBand driver output.
CXD56_AUDIO_ECODE cxd56_audio_clear_dmaerrint(cxd56_audio_dma_t handle)
Clear dma error interrupt state.
Definition: cxd56_audio.h:252
cxd56_audio_state_t cxd56_audio_get_status(void)
Get audio driver status.
CXD56_AUDIO_ECODE cxd56_audio_en_digsft(cxd56_audio_dsr_rate_t rate)
Enable digital soft ramp rate control.
cxd56_audio_volid_e
Definition: cxd56_audio.h:211
Definition: cxd56_audio.h:278
CXD56_AUDIO_ECODE cxd56_audio_dis_output(void)
Disable BaseBand driver output.
CXD56_AUDIO_ECODE cxd56_audio_stop_beep(void)
Stop beep.
Definition: cxd56_audio.h:451
CXD56_AUDIO_ECODE cxd56_audio_set_deq(bool en, FAR cxd56_audio_deq_coef_t *deq)
Set DEQ table.
#define CXD56_AUDIO_ECODE
Definition: cxd56_audio.h:85
bool au_dat_sel1
Definition: cxd56_audio.h:411
Definition: cxd56_audio.h:290
Definition: cxd56_audio.h:282
CXD56_AUDIO_ECODE cxd56_audio_poweron(void)
Power on Audio driver.
#define CXD56_AUDIO_DEQ_BAND_NUM
Definition: cxd56_audio.h:77
CXD56_AUDIO_ECODE cxd56_audio_set_beep_vol(int16_t vol)
Set beep volume parameter.
cxd56_audio_outdev_e
Definition: cxd56_audio.h:320
CXD56_AUDIO_ECODE cxd56_audio_set_spout(bool sp_out_en)
Set speaker output status.
Definition: cxd56_audio.h:215
CXD56_AUDIO_ECODE cxd56_audio_dis_input(void)
Disable BaseBand driver input.
Definition: cxd56_audio.h:286
CXD56_AUDIO_ECODE cxd56_audio_mute_vol_fade(cxd56_audio_volid_t id, bool wait)
mute volume with fade-out
Definition: cxd56_audio.h:298
CXD56_AUDIO_ECODE cxd56_audio_en_dnc(cxd56_audio_dnc_id_t id, FAR cxd56_audio_dnc_bin_t *bin)
Enable DNC.
void(* cxd56_audio_dma_cb_t)(cxd56_audio_dma_t handle, uint32_t code)
Definition: cxd56_audio.h:461
CXD56_AUDIO_ECODE cxd56_audio_dis_i2s_io(void)
Disable I2S I/O.