Skip to contentSkip to conversation

ASoC: ics43432: add CMM-4030D-261 support

PATCH RESEND New Angelo Dureghello 1 participant 3 messages Aug 25, 2021

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

PATCH RESEND 1/3 ASoC: ics43432: add CMM-4030D-261 support

Despite minimal datasheet differences, the driver seems perfectly compatible with CMM-4030D-261.

Tested CMM-4030D-261 to work with this changes:

/ {
        cmm4030d: cmm4030d {
                #sound-dai-cells = <0>;
                compatible = "cui,cmm-4030d-261";
        };

        sound_mic {
                compatible = "simple-audio-card";
                simple-audio-card,name = "i2s mem mic";
                simple-audio-card,format = "i2s";
                simple-audio-card,bitclock-master = <&sound_master>;
                simple-audio-card,frame-master = <&sound_master>;
                sound_master: simple-audio-card,cpu {
                        sound-dai = <&ssi2>;
                        system-clock-frequency = <2822400>;
                };
                simple-audio-card,codec {
                        sound-dai = <&cmm4030d>;
                };
        };
};

Audio has been captured and tested successfully by:

arecord -D "hw:1,0" -f S24_LE > test.wav
aplay test.wav

---
 sound/soc/codecs/Kconfig    | 2 +-
 sound/soc/codecs/ics43432.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/Kconfig +1 -1
index db16071205ba..cd1976aae328 100644
@@ -847,7 +847,7 @@ config SND_SOC_HDAC_HDA
 	select SND_HDA
 
 config SND_SOC_ICS43432
-	tristate
+	tristate "ICS43423 and compatible i2s microphones"
 
 config SND_SOC_INNO_RK3036
 	tristate "Inno codec driver for RK3036 SoC"
sound/soc/codecs/ics43432.c +3 -1
index 47e749f03940..de4c8460ab3d 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * I2S MEMS microphone driver for InvenSense ICS-43432
+ * I2S MEMS microphone driver for InvenSense ICS-43432 and similar
+ * MEMS-based microphones.
  *
  * - Non configurable.
  * - I2S interface, 64 BCLs per frame, 32 bits per channel, 24 bit data
@@ -53,6 +54,7 @@ static int ics43432_probe(struct platform_device *pdev)
 #ifdef CONFIG_OF
 static const struct of_device_id ics43432_ids[] = {
 	{ .compatible = "invensense,ics43432", },
+	{ .compatible = "cui,cmm-4030d-261", },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ics43432_ids);
Signature · 1 line
2.32.0
#1 lore raw

PATCH RESEND 2/3 dt-bindings: add compatible vendor prefix for CUI Devices

Add vendor prefix for CUI Devices.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 07fb0d25fc15..ed4f66ec9a65 100644
@@ -271,6 +271,8 @@ patternProperties:
     description: Shenzen Chuangsiqi Technology Co.,Ltd.
   "^cubietech,.*":
     description: Cubietech, Ltd.
+  "^cui,.*":
+    description: CUI Devices
   "^cypress,.*":
     description: Cypress Semiconductor Corporation
   "^cznic,.*":
Signature · 1 line
2.32.0
#2 lore raw

PATCH RESEND 3/3 ASoC: ics43432: add compatible for CUI Devices

In reply to Angelo Dureghello

Add compatible for CUI Devices CMM-4030D-261-I2S-TR.

---
 Documentation/devicetree/bindings/sound/ics43432.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/ics43432.txt +4 -2
index b02e3a6c0fef..e6f05f2f6c4e 100644
@@ -1,4 +1,4 @@
-Invensense ICS-43432 MEMS microphone with I2S output.
+Invensense ICS-43432-compatible MEMS microphone with I2S output.
 
 There are no software configuration options for this device, indeed, the only
 host connection is the I2S interface. Apart from requirements on clock
@@ -8,7 +8,9 @@ contain audio data. A hardware pin determines if the device outputs data
 on the left or right channel of the I2S frame.
 
 Required properties:
-  - compatible : Must be "invensense,ics43432"
+  - compatible: should be one of the following.
+     "invensense,ics43432": For the Invensense ICS43432
+     "cui,cmm-4030d-261": For the CUI CMM-4030D-261-I2S-TR
 
 Example:
 
Signature · 1 line
2.32.0