Developer World
Spresense SDK Library v3.3.0-375c679
cxd56_audio.h
1/****************************************************************************
2 * boards/arm/cxd56xx/spresense/include/cxd56_audio.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
20
21#ifndef __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUDIO_H
22#define __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUDIO_H
23
24/****************************************************************************
25 * Included Files
26 ****************************************************************************/
27
28#include <nuttx/config.h>
29
30#include <stdbool.h>
31
32/****************************************************************************
33 * Public Types
34 ****************************************************************************/
35
36#ifndef __ASSEMBLY__
37
38/****************************************************************************
39 * Public Data
40 ****************************************************************************/
41
42#undef EXTERN
43#if defined(__cplusplus)
44#define EXTERN extern "C"
45extern "C"
46{
47#else
48#define EXTERN extern
49#endif
50
51/****************************************************************************
52 * Name: board_audio_power_control
53 *
54 * Description:
55 * Power on/off the audio on the board.
56 *
57 ****************************************************************************/
58
59bool board_audio_power_control(bool en);
60
61/****************************************************************************
62 * Name: board_aca_power_control
63 *
64 * Description:
65 * Power on/off the Aca device on the board.
66 *
67 ****************************************************************************/
68
69int board_aca_power_control(int target, bool en);
70
71/****************************************************************************
72 * Name: board_aca_power_monitor
73 *
74 * Description:
75 * Get status of Power on/off the Aca device on the board.
76 *
77 ****************************************************************************/
78
79bool board_aca_power_monitor(int target);
80
81/****************************************************************************
82 * Name: board_external_amp_mute_control
83 *
84 * Description:
85 * External Amp. Mute on/off.
86 * true: Mute on
87 * false: Mute off
88 *
89 ****************************************************************************/
90
91int board_external_amp_mute_control(bool en);
92
93/****************************************************************************
94 * Name: board_external_amp_mute_monitor
95 *
96 * Description:
97 * Get External Amp. Mute status.
98 * true: Mute on
99 * false: Mute off
100 *
101 ****************************************************************************/
102
103bool board_external_amp_mute_monitor(void);
104
105/****************************************************************************
106 * Name: board_audio_i2s_enable
107 *
108 * Description:
109 * Enable I2S on the board.
110 * Used by the audio driver. Do not use by users.
111 *
112 ****************************************************************************/
113
114void board_audio_i2s_enable(void);
115
116/****************************************************************************
117 * Name: board_audio_i2s_disable
118 *
119 * Description:
120 * Disable I2S on the board.
121 * Used by the audio driver. Do not use by users.
122 *
123 ****************************************************************************/
124
125void board_audio_i2s_disable(void);
126
127/****************************************************************************
128 * Name: board_audio_initialize
129 *
130 * Description:
131 * Initialize audio I/O on the board.
132 * Used by the audio driver. Do not use by users.
133 *
134 ****************************************************************************/
135
136void board_audio_initialize(void);
137
138/****************************************************************************
139 * Name: board_audio_finalize
140 *
141 * Description:
142 * Finalize audio I/O on the board.
143 * Used by the audio driver. Do not use by users.
144 *
145 ****************************************************************************/
146
147void board_audio_finalize(void);
148
149/****************************************************************************
150 * Name: board_audio_initialize_driver
151 *
152 * Description:
153 * Initializes a CXD56 audio device driver node with the given number.
154 * Used by the audio driver. Should not be used by users.
155 *
156 ****************************************************************************/
157
158int board_audio_initialize_driver(void);
159
160#undef EXTERN
161#if defined(__cplusplus)
162}
163#endif
164
165#endif /* __ASSEMBLY__ */
166#endif /* __BOARDS_ARM_CXD56XX_SPRESENSE_INCLUDE_CXD56_AUDIO_H */