]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: ics43432: add CMM-4030D-261 support
authorAngelo Dureghello <angelo.dureghello@timesys.com>
Sat, 21 Aug 2021 08:26:56 +0000 (10:26 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 23 Aug 2021 15:41:01 +0000 (16:41 +0100)
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

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Link: https://lore.kernel.org/r/20210821082658.4147595-1-angelo.dureghello@timesys.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig
sound/soc/codecs/ics43432.c

index fe5e558635ad6491c57abcbad61d49756a92250a..82ee233a269d07330dca4c2808d644991f910e58 100644 (file)
@@ -848,7 +848,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"
index 47e749f0394053141b7c2a5bd923ca6455e489a8..de4c8460ab3df05ebbbbfc3dd4b2e65bbd22a660 100644 (file)
@@ -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);