Skip to contentSkip to conversation

ASoC: codecs: Add support for Fortemedia FM34NE DSP

PATCH In review Svyatoslav Ryhel 3 participants 5 messages Nov 4 – Nov 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover ASoC: codecs: Add support for Fortemedia FM34NE DSP

The Fortemedia FM34NE is digital sound processing chip used for active noise suppression mainly on ASUS Transformers.

---
Changes in v2:
- remove ports from schema
- schema moved to dsp
- add return value check in fm34ne_dsp_set_config()
- dropped unused headers

Changes in v3:
- fix port reference
- request reset gpio asserted
- incorporate fm34ne_dsp_reset() into fm34ne_dsp_enable_hw()
- add reset asserting to fm34ne_dsp_disable_hw()
- moved bypass gpio deassertion before return in fm34ne_dsp_set_config()

Changes in v4:
- dropped guarded mutex lock in favour of traditional lock since function has to use goto regardless.
---

Svyatoslav Ryhel (2):
ASoC: dt-bindings: Document FM34NE DSP
ASoC: codecs: Add support for Fortemedia FM34NE DSP

 .../bindings/dsp/asus,tf201-dsp.yaml          |   74 ++
 sound/soc/codecs/Kconfig                      |   12 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/fm34ne-dsp.c                 |  388 +++++++
 sound/soc/codecs/fm34ne-dsp.h                 | 1030 +++++++++++++++++
 5 files changed, 1506 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dsp/asus,tf201-dsp.yaml
 create mode 100644 sound/soc/codecs/fm34ne-dsp.c
 create mode 100644 sound/soc/codecs/fm34ne-dsp.h
Signature · 1 line
2.53.0
#1 lore raw

PATCH v4 1/2 ASoC: dt-bindings: Document FM34NE DSP

Document the FM34NE DSP based voice processor used in the ASUS Transformer devices.

---
 .../bindings/dsp/asus,tf201-dsp.yaml          | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dsp/asus,tf201-dsp.yaml
Documentation/devicetree/bindings/dsp/asus,tf201-dsp.yaml new file +74 -0
new file mode 100644
index 0000000000000..8b39089c99a9d
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dsp/asus,tf201-dsp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Fortemedia FM34NE based voice processor
+
+description:
+  Fortemedia FM34NE is a hardware voice processor (DSP — Digital Signal
+  Processor) designed by Fortemedia. It specializes in real-time audio
+  processing, focusing on noise suppression and echo cancellation.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - asus,sl101-dsp
+      - asus,tf101-dsp
+      - asus,tf201-dsp
+      - asus,tf300t-dsp
+      - asus,tf700t-dsp
+      - pegatron,chagall-dsp
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Master clock to the DSP
+
+  reset-gpios:
+    maxItems: 1
+
+  bypass-gpios:
+    maxItems: 1
+    description: Signal that switches DSP into programming mode.
+
+  vdd-supply: true
+
+  port:
+    $ref: /schemas/sound/audio-graph-port.yaml#
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - bypass-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dsp@60 {
+            compatible = "asus,tf201-dsp";
+            reg = <0x60>;
+
+            clocks = <&fm34ne_clk>;
+
+            bypass-gpios = <&gpio 222 GPIO_ACTIVE_HIGH>;
+            reset-gpios = <&gpio 115 GPIO_ACTIVE_LOW>;
+
+            vdd-supply = <&vdd_1v8_dsp>;
+        };
+    };
+...
Signature · 1 line
2.53.0
maintainer Reviewed-by on v4 1/2
#2 lore raw

Re: [PATCH v4 1/2] ASoC: dt-bindings: Document FM34NE DSP

Quoted 9 lines · Svyatoslav Ryhel

Document the FM34NE DSP based voice processor used in the ASUS Transformer devices.

---
 .../bindings/dsp/asus,tf201-dsp.yaml          | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dsp/asus,tf201-dsp.yaml
#3 lore raw

PATCH v4 2/2 ASoC: codecs: Add support for Fortemedia FM34NE DSP

In reply to Svyatoslav Ryhel

The Fortemedia FM34NE is a digital sound processing chip used for active noise suppression mainly on ASUS Transformers.

---
 sound/soc/codecs/Kconfig      |   12 +
 sound/soc/codecs/Makefile     |    2 +
 sound/soc/codecs/fm34ne-dsp.c |  388 +++++++++++++
 sound/soc/codecs/fm34ne-dsp.h | 1030 +++++++++++++++++++++++++++++++++
 4 files changed, 1432 insertions(+)
 create mode 100644 sound/soc/codecs/fm34ne-dsp.c
 create mode 100644 sound/soc/codecs/fm34ne-dsp.h
sound/soc/codecs/Kconfig +12 -0
index ba59dabeeccde..c40e84f499671 100644
@@ -127,6 +127,7 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_ES9356
 	imply SND_SOC_ES7134
 	imply SND_SOC_ES7241
+	imply SND_SOC_FM34NE_DSP
 	imply SND_SOC_FRAMER
 	imply SND_SOC_FS210X
 	imply SND_SOC_GTM601
@@ -1338,6 +1339,17 @@ config SND_SOC_ES9356
 	select REGMAP_SOUNDWIRE
 	select REGMAP_SOUNDWIRE_MBQ
 
+config SND_SOC_FM34NE_DSP
+	tristate "DSP FM34NE driver"
+	depends on I2C && GPIOLIB
+	help
+	  Say Y here if you want to add support for Fortemedia FM34NE DSP
+	  mainly used in ASUS T20/T30 Transformers for input noise
+	  processing.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called snd-soc-fm34ne-dsp.
+
 config SND_SOC_FRAMER
 	tristate "Framer codec"
 	depends on GENERIC_FRAMER
sound/soc/codecs/Makefile +2 -0
index 3826f9e4fce8a..2ddf08eae181e 100644
@@ -142,6 +142,7 @@ snd-soc-es8375-y := es8375.o
 snd-soc-es8389-y := es8389.o
 snd-soc-es9039q2m-y := es9039q2m.o
 snd-soc-es9356-y := es9356.o
+snd-soc-fm34ne-dsp-y := fm34ne-dsp.o
 snd-soc-framer-y := framer-codec.o
 snd-soc-fs-amp-lib-y := fs-amp-lib.o
 snd-soc-fs210x-y := fs210x.o
@@ -590,6 +591,7 @@ obj-$(CONFIG_SND_SOC_ES8375)    += snd-soc-es8375.o
 obj-$(CONFIG_SND_SOC_ES8389)    += snd-soc-es8389.o
 obj-$(CONFIG_SND_SOC_ES9039Q2M)	+= snd-soc-es9039q2m.o
 obj-$(CONFIG_SND_SOC_ES9356)    += snd-soc-es9356.o
+obj-$(CONFIG_SND_SOC_FM34NE_DSP)	+= snd-soc-fm34ne-dsp.o
 obj-$(CONFIG_SND_SOC_FRAMER)	+= snd-soc-framer.o
 obj-$(CONFIG_SND_SOC_FS_AMP_LIB)+= snd-soc-fs-amp-lib.o
 obj-$(CONFIG_SND_SOC_FS210X)	+= snd-soc-fs210x.o
sound/soc/codecs/fm34ne-dsp.c new file +388 -0

388 lines not on this page · raw message

sound/soc/codecs/fm34ne-dsp.h new file +1030 -0

1,030 lines not on this page · raw message

Signature · 1 line
2.53.0
maintainer
#4 lore raw
In reply to Svyatoslav Ryhel
Quoted 4 lines · Svyatoslav Ryhel

ASoC: codecs: Add support for Fortemedia FM34NE DSP

The Fortemedia FM34NE is digital sound processing chip used for active noise suppression mainly on ASUS Transformers.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5

Thanks!

[1/2] ASoC: dt-bindings: Document FM34NE DSP

      https://git.kernel.org/broonie/sound/c/72c167d8e3a7
[2/2] ASoC: codecs: Add support for Fortemedia FM34NE DSP
      https://git.kernel.org/broonie/sound/c/2488b6a08b88

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark