Skip to content

Commit 8b9dc54

Browse files
lucasssvazAlan Carvalho de Assis
authored andcommitted
drivers/audio: Add support for the ES8311 codec
Adds support for the ES8311 audio codec by Everest Semiconductor on NuttX. Both output and input are supported.
1 parent 58f59fe commit 8b9dc54

File tree

6 files changed

+4003
-0
lines changed

6 files changed

+4003
-0
lines changed

drivers/audio/Kconfig

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,63 @@ config CS4344_WORKER_STACKSIZE
206206

207207
endif # AUDIO_CS4344
208208

209+
config AUDIO_ES8311
210+
bool "ES8311 codec chip"
211+
default n
212+
depends on AUDIO
213+
---help---
214+
Select to enable support for the ES8311 Audio codec by Everest
215+
Semiconductor.
216+
217+
NOTE: This driver also depends on both I2C and I2S support although
218+
that dependency is not explicit here.
219+
220+
if AUDIO_ES8311
221+
222+
config ES8311_INPUT_INITVOLUME
223+
int "ES8311 initial input volume setting"
224+
default 1000
225+
226+
config ES8311_OUTPUT_INITVOLUME
227+
int "ES8311 initial output volume setting"
228+
default 400
229+
230+
choice
231+
prompt "MCLK source"
232+
default ES8311_SRC_MCLK
233+
---help---
234+
Select the source of the MCLK signal.
235+
236+
config ES8311_SRC_MCLK
237+
bool "From MCLK Pin"
238+
239+
config ES8311_SRC_BCLK
240+
bool "From BCLK Pin"
241+
242+
endchoice
243+
244+
config ES8311_INFLIGHT
245+
int "ES8311 maximum in-flight audio buffers"
246+
default 2
247+
248+
config ES8311_MSG_PRIO
249+
int "ES8311 message priority"
250+
default 1
251+
252+
config ES8311_BUFFER_SIZE
253+
int "ES8311 preferred buffer size"
254+
default 8192
255+
256+
config ES8311_NUM_BUFFERS
257+
int "ES8311 preferred number of buffers"
258+
default 4
259+
260+
config ES8311_WORKER_STACKSIZE
261+
int "ES8311 worker thread stack size"
262+
default 2048
263+
264+
endif # AUDIO_ES8388
265+
209266
config AUDIO_ES8388
210267
bool "ES8388 codec chip"
211268
default n

drivers/audio/Make.defs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ ifeq ($(CONFIG_AUDIO_CS4344),y)
4848
CSRCS += cs4344.c
4949
endif
5050

51+
ifeq ($(CONFIG_AUDIO_ES8311),y)
52+
CSRCS += es8311.c
53+
ifeq ($(CONFIG_ES8311_REGDUMP),y)
54+
CSRCS += es8311_debug.c
55+
endif
56+
endif
57+
5158
ifeq ($(CONFIG_AUDIO_ES8388),y)
5259
CSRCS += es8388.c
5360
ifeq ($(CONFIG_ES8388_REGDUMP),y)

0 commit comments

Comments
 (0)