ASoC: codecs: add support for everest-semi es8311 codec
Subsystems (3)
v2 cover ASoC: codecs: add support for everest-semi es8311 codec
This patch set adds support for the Everest-semi ES8311 codec.
Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control.
Implemented and tested most of the codec features, with few limitations
listed in the driver commit message. The test setup was composed of a ESP32-LyraT-Mini board, which embeds the codec, connected via I2C and
I2S to a Raspberry Pi Zero W host board. Some tests were also performed
on a Pine64 A64 host board (e.g. to test the suspend/resume not
supported by the rpi). The codec driver was bound with the simple-card
driver running on kernel v6.9-rc7.
---
Changes in v2:
- dt-bindings: removed wrong es8311 schema file
- dt-bindings: added es8311 into existing es8316 schema file
- Link to v1: https://lore.kernel.org/all/[email protected]/
---
Matteo Martelli (2):
ASoC: es8311: dt-bindings: add everest es8311 codec
ASoC: codecs: es8311: add everest es8311 codec support
.../bindings/sound/everest,es8311.yaml | 52 + sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es8311.c | 970 ++++++++++++++++++ sound/soc/codecs/es8311.h | 162 +++ 5 files changed, 1190 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml create mode 100644 sound/soc/codecs/es8311.c create mode 100644 sound/soc/codecs/es8311.h
---
base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803
PATCH v2 1/2 ASoC: es8311: dt-bindings: add everest es8311 codec
Add DT bindings documentation for the Everest-semi ES8311 codec.
Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control.
--- .../devicetree/bindings/sound/everest,es8316.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/everest,es8316.yaml +5 -2
@@ -4,18 +4,21 @@ $id: http://devicetree.org/schemas/sound/everest,es8316.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Everest ES8316 audio CODEC +title: Everest ES8311 and ES8316 audio CODECs maintainers: - Daniel Drake <[email protected]> - Katsuhiro Suzuki <[email protected]> + - Matteo Martelli <[email protected]> allOf: - $ref: dai-common.yaml# properties: compatible: - const: everest,es8316 + enum: + - everest,es8311 + - everest,es8316 reg: maxItems: 1
Signature · 1 line
2.45.0
Re: [PATCH v2 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Quoted 6 lines · Matteo Martelli
Add DT bindings documentation for the Everest-semi ES8311 codec.
Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control.
Signed-off-by Matteo Martelli <[email protected]>
---
This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, you can skip it (please do not feel offended by me posting it here - no bad intentions intended). If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.
https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
Best regards,
Krzysztof
PATCH v2 2/2 ASoC: codecs: es8311: add everest es8311 codec support
In reply to Matteo MartelliAdd support for the Everest-semi ES8311 codec.
Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio interface and I2C control.
Supported features:
* Both master and slave mode. Master clock is optional in slave mode.
* Sample rates from 8KHz to 96KHz.
* Sample formats: S16_LE, S18_3LE, S20_3LE, S24_3LE, S24_LE and S32_LE.
* I2S formats: I2S, LEFT_J, DSP_A, DSP_B.
* BCLK and FSYNC clocks inversion.
* Component suspend/resume.
* ADC, PGA, DAC controls.
* ADC DSP controls: volume, fade (ramp rate), ALC, automute, HPF, EQ.
* DAC DSP controls: volume, fade (ramp rate), DRC, EQ.
* DAPM routes: capture path with input source selection (differential MIC/DMIC) and AIF channel source selection; playback path with DAC channel source selection.
Limitations:
* Support only for master clocks with a ratio of ADC (or DAC) clock to LRCLK equal to 256. This to keep the default ADC and DAC oversampling and ADC scale settings. Anyway all 8-96KHz sample rates are supported when the ratio of MCLK to sample rate is 32, 64, 128, 256, 384 or 512 (upper limit due to max MCLK freq of 49.2MHz).
* Coefficients for ADC HPF and ADC/DAC EQ not supported.
* Digital mic supported but not tested.
* S18_3LE, S20_3LE and S24_3LE formats supported but not tested.
--- sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es8311.c | 970 ++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/es8311.h | 162 +++++++ 4 files changed, 1138 insertions(+) create mode 100644 sound/soc/codecs/es8311.c create mode 100644 sound/soc/codecs/es8311.h
sound/soc/codecs/Kconfig +4 -0
@@ -1099,6 +1099,10 @@ config SND_SOC_ES83XX_DSM_COMMON depends on ACPI tristate +config SND_SOC_ES8311 + tristate "Everest Semi ES8311 CODEC" + depends on I2C + config SND_SOC_ES8316 tristate "Everest Semi ES8316 CODEC" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -119,6 +119,7 @@ snd-soc-dmic-objs := dmic.o snd-soc-es7134-objs := es7134.o snd-soc-es7241-objs := es7241.o snd-soc-es83xx-dsm-common-objs := es83xx-dsm-common.o +snd-soc-es8311-objs := es8311.o snd-soc-es8316-objs := es8316.o snd-soc-es8326-objs := es8326.o snd-soc-es8328-objs := es8328.o
@@ -514,6 +515,7 @@ obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o obj-$(CONFIG_SND_SOC_ES7134) += snd-soc-es7134.o obj-$(CONFIG_SND_SOC_ES7241) += snd-soc-es7241.o obj-$(CONFIG_SND_SOC_ES83XX_DSM_COMMON) += snd-soc-es83xx-dsm-common.o +obj-$(CONFIG_SND_SOC_ES8311) += snd-soc-es8311.o obj-$(CONFIG_SND_SOC_ES8316) += snd-soc-es8316.o obj-$(CONFIG_SND_SOC_ES8326) += snd-soc-es8326.o obj-$(CONFIG_SND_SOC_ES8328) += snd-soc-es8328.o
sound/soc/codecs/es8311.c new file +970 -0
970 lines not on this page · raw message
sound/soc/codecs/es8311.h new file +162 -0
162 lines not on this page · raw message
Signature · 1 line
2.45.0
Quoted 9 lines · Matteo Martelli
.../bindings/sound/everest,es8311.yaml | 52 + sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es8311.c | 970 ++++++++++++++++++ sound/soc/codecs/es8311.h | 162 +++ 5 files changed, 1190 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml create mode 100644 sound/soc/codecs/es8311.c create mode 100644 sound/soc/codecs/es8311.h
This is the wrong diffstat from previous patch v1, sorry for that.
Here's the correct diffstat:
.../bindings/sound/everest,es8316.yaml | 7 +- sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/es8311.c | 970 ++++++++++++++++++ sound/soc/codecs/es8311.h | 162 +++ 5 files changed, 1143 insertions(+), 2 deletions(-) create mode 100644 sound/soc/codecs/es8311.c create mode 100644 sound/soc/codecs/es8311.h
Best regards,
Matteo Martelli