I2S Microphone on Radxa Zero 3W

Hi everyone,

I’m building an IoT device that requires camera & microphone using the Radxa Zero 3W. Here the additional hardware components:

  • Camera: Raspberry Pi Camera V2 via CSI interface
  • Microphone: INMP441 MEMS via GPIO pins

The camera works fine after following the official guide and enabling the overlay.

However I’m having trouble with the microphone. I’m pretty new to audio stuff so please highlight any stupid stuff I’m doing or writing here :grin:.

Here is how I connected the INMP441 microphone to the Radxa using the official pinout documentation as reference:

.

The microphone did not show up in the Input devices nor was I able to record audio with the arecord command.

Then I tried looking for I2S overlays via rsetup, but didn’t find anything. I tried looking at the device-tree using:
dtc -I fs /sys/firmware/devicetree/base | grep i2s

According to the output i2s@fe40000 has status='okay' but i2s@fe410000, i2s@fe420000 and i2s@f430000 are all disabled. Do I need to enable them somehow? Any other suggestions?

Additional information:

  • OS: Debian Bullseye B6
  • Kernel release: 5.10.160-26-rk356x
  • aplay --list-devices
    **** List of PLAYBACK Hardware Devices ****
    card 0: rockchiphdmi0 [rockchip-hdmi0], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [ fe400000.i2s-i2s-hifi i2s-hifi-0]
    Subdevices: 0/1
    Subdevice #0: subdevice #0

Any help is appreciated! Thank you,

Yannick

From look of it that is the I2s for the hdmi and in use (rockchiphdmi0).
The gpio i2s are listed here https://docs.radxa.com/en/zero/zero3/hardware-design/hardware-interface

I’m having a similar issue as the OP. Device doesn’t show up at all. The pinout that the OP listed are the correct pins according to the link you posted.

Any thoughts?:thinking:

Yeah I2S1,2,3 have gpio but likely all he has enabled is the hdmi I2S0 dts

I’ve managed to get i2s3 working both ways on Radxa Zero 3E running Armbian 24.5.1 (6.1.43-vendor-rk35xx) with this overlay:

radxa-zero3-i2s3-experiments.dts
/dts-v1/; 
/plugin/;

/ {
	compatible = "rockchip,rk3568";

	fragment@0 {
		target = <&i2s3_2ch>;
		__overlay__ {
			rockchip,clk-trcm = <1>;
			pinctrl-names = "default";
			pinctrl-0 = <&i2s3m0_sclk
				     &i2s3m0_lrck
				     &i2s3m0_sdi
				     &i2s3m0_sdo>;
			status = "okay";
		};
	};

	fragment@1 {
		target-path = "/";
		__overlay__ {
			sound {
				status = "okay";
				compatible = "simple-audio-card";
				simple-audio-card,name = "test";
				simple-audio-card,format="i2s";

				simple-audio-card,bitclock-master = <&cpu_dai>;
				simple-audio-card,frame-master = <&cpu_dai>;
				simple-audio-card,mclk-fs = <256>;

				cpu_dai: simple-audio-card,cpu {
					sound-dai = <&i2s3_2ch>;
				};

				codec_dai: simple-audio-card,codec {
					sound-dai = <&i2s3_out>;
				};

			};

			i2s3_out: i2s3-out {
				#sound-dai-cells = <0>;
				compatible = "rockchip,dummy-codec";
				status = "okay";
			};
		};
	};
};

It enables i2s3-m0 and creates a sound card which uses it.
Do sudo armbian-add-overlay radxa-zero3-i2s3-experiments.dts and reboot and the sound card should appear and work. At least my UDA1334A and INMP441 work.

It is my first overlay and my first message here so hi everyone:)