PulseAudio / gstreamer not working with I2S microphone connected to Rubik Pi

You may proceed with the adaptation on your own by following the method below, or you may choose to wait for the support to be released by our R&D team in the near future.

Please refer to the documentation listed below to download the source code and set up the development environment according to your PC’s operating system.

Recommended debugging approach:

Refer to the documents src/vendor/qcom/opensource/kernel-6.6/Documentation/devicetree/bindings/sound/ics43432.txt and src/vendor/qcom/opensource/kernel-6.6/sound/soc/codecs/ics43432.c, integrate the ICS43434 driver, and add the corresponding modifications in the dts; the additional property "#sound-dai-cells = <0>;" may be required.

The driver node must be bound to the appropriate I²S interface; please refer to the diagram below.

Hi @amccem

Thank you for your feedback.

I purchased the ICS-43434 and expect it to arrive in about three days. If there are still any issues by then, I’d like to discuss debugging together.

Thanks very much for your help @Hongyang.Zhao and @kinkin. I tried to fetch the source for v1.5 so that I can add the driver, but i am encountering the following error when running repo sync:

error.GitError: Cannot fetch GitCommandError: 'update-ref -m manifest set to c382865206fe925a02a1cdbdd856e16310bc9dbc --no-deref refs/remotes/m/qcom-linux-scarthgap c382865206fe925a02a1cdbdd856e16310bc9dbc^0' on meta-tensorflow failed
stderr: fatal: c382865206fe925a02a1cdbdd856e16310bc9dbc^0: not a valid SHA1


error: Downloading network changes failed.
Failing repos (network):
layers/meta-tensorflow
Try re-running with "-j1 --fail-fast" to exit at the first error.
================================================================================
Repo command failed due to the following `SyncError` errors:
GitCommandError: 'update-ref -m manifest set to c382865206fe925a02a1cdbdd856e16310bc9dbc --no-deref refs/remotes/m/qcom-linux-scarthgap c382865206fe925a02a1cdbdd856e16310bc9dbc^0' on meta-tensorflow failed
stderr: fatal: c382865206fe925a02a1cdbdd856e16310bc9dbc^0: not a valid SHA1

This is for when I checkout:

repo init -u https://github.com/rubikpi-ai/rubikpi-manifest -b qcom-linux-scarthgap -m qcom-6.6.90-QLI.1.5-Ver.1.2.xml

Should you wish to download the Yocto project, please run the following commands:
rubikpi-6.6.90-QLI.1.5-Ver.1.2_qim-product-sdk-2.0.1.xml
Alternatively, you may refer to the approach described in the documentation:

After completing the code modifications and build, you may flash the device tree and push the *.ko file; once the *.ko file has been pushed, please manually run insmod.

Thanks for your reply @kinkin .

With the rubikpi-6.6.90-QLI.1.5-Ver.1.2_qim-product-sdk-2.0.1.xml manifest i get the error:

error.GitError: Cannot fetch GitCommandError: 'update-ref -m manifest set to c382865206fe925a02a1cdbdd856e16310bc9dbc --no-deref refs/remotes/m/qcom-linux-scarthgap c382865206fe925a02a1cdbdd856e16310bc9dbc^0' on meta-tensorflow failed
stderr: fatal: c382865206fe925a02a1cdbdd856e16310bc9dbc^0: not a valid SHA1

I tried on a clean VM and get the same result.

I also tried to follow the getting started guide, but the link to download the toolchains_V1.1.0.zip seems to point to the wrong place (it links to the system image download).

I was able to download the sources from the older release (6.6.52 qualcomm linux v1.3). Here’s what i tried:

Device Tree Changes Made

  1. Added ICS43432 device node:
ics43432: ics43432 {
    compatible = "invensense,ics43432";
    #sound-dai-cells = <0>;
};
  1. Modified tertiary MI2S capture DAI link to include ICS43432:
tert-mi2s-capture-dai-link {
    link-name = "MI2S-LPAIF_AUD-TX-SECONDARY";
    cpu {
        sound-dai = <&q6apmbedai TERTIARY_MI2S_TX>;
    };
    codec {
        sound-dai = <&msm_stub_codec 1>, <&ics43432>;
    };
};
  1. Enabled kernel driver: Added CONFIG_SND_SOC_ICS43432=y to kernel configuration

Driver Verification

Confirmed ICS43432 driver loaded successfully:

  • Platform device created: /sys/devices/platform/ics43432
  • Driver registered: /sys/bus/platform/drivers/ics43432
  • Device tree node present: Compatible string shows invensense,ics43432
  • Sound card detected: qcm6490-idp-snd-card
  • PCM capture device created: 00-09: MI2S-LPAIF_AUD-TX-SECONDARY multicodec-9

AGM Capture Test Results

Command: agmcap /home/my.wav -D 100 -d 101 -r 48000 -b 16 -c 1 -i MI2S-LPAIF_AUD-TX-SECONDARY -dkv 0xA3000003

Result:

Failed to open mixer
Captured 0 frames

AFAIK, the ics43432 is backwards compatible with the ics43432, so that shouldn’t be the issue

The toolchains_V1.1.0.zip package can be downloaded from the following link:
https://thundercomm.s3.dualstack.ap-northeast-1.amazonaws.com/uploads/web/rubik-pi-3/20250325/toolchains_V1.1.0.zip

You are required to download the latest version of the source code.
Prior to downloading the Yocto sources, please configure your Ubuntu host as described below.

Code download:
repo init -u https://github.com/rubikpi-ai/rubikpi-manifest -b qcom-linux-scarthgap -m rubikpi-6.6.90-QLI.1.5-Ver.1.2_qim-product-sdk-2.0.1.xml

Hi @kinkin @Hongyang.Zhao

The problem with syncing the repo is that the manifest file for meta-tensorflow refers to an invalid commit (it appears to have been erased via force push / history re-write by the maintainer of that git repo). To fix it, i switched the commit to the one that came shortly after (eeee54cfa3c51c1fd99604a0d5f173096bdcf1da). After fixing the manifest i was able to sync the repo and make changes to the latest release - please see my post above for details of the changes made to the config and device tree. The only difference v.s. the 1.3 version is the link-name:

		tert-mi2s-capture-dai-link {
			link-name = "MI2S-LPAIF-TX-TERTIARY";
			cpu {
				sound-dai = <&q6apmbedai TERTIARY_MI2S_TX>;
			};
			codec {
				sound-dai = <&msm_stub_codec 1>, <&ics43432>;
			};
		};

After making these changes i am still unable to record audio:

root@rubikpi:~# agmcap my.wav -D 100 -d 101 -r 48000 -b 16 -c 1 -i MI2S-LPAIF-TX-TERTIARY -dkv 0xA3000003
pcm_plug_open: dlopen successful for libagm_pcm_plugin.so
pcm_plug_open: failed to open plugin
Unable to open PCM device (cannot open device (101) for card (100): Unknown error -5)
Captured 0 frames

If your mic has arrived could you please help me to debug further?

Our R&D is currently working on the adaptation. I will update as soon as there is any progress.

1 Like

Please retry with this version.
File:FlatBuild_Ru…606.zip
Link:查看分享
Password:swjx
Expiry:2025-11-14 17:56:54
Test command:

pactl set-default-source regular0
pactl set-source-port regular0 handset-mic
parecord --rate=48000 --format=s32le --channels=1 -v /opt/record.wav

Thanks for your work on this @kinkin . Could you please re create the link as it seems to have expired.

File:FlatBuild_Ru…606.zip
Link:查看分享
Password:n5hy
Expiry:2025-11-24 16:20:56
Please retry with this version.

Thanks for uploading it again @kinkin. Unfortunately the file is still all nulls other than the WAV header. This was after running the pa commands you shared earlier:

pactl set-default-source regular0
pactl set-source-port regular0 handset-mic
parecord --rate=48000 --format=s32le --channels=1 -v /opt/record.wav

Thank you for your response; I will sync your test results to the R&D team immediately.

1 Like

Kindly refer to the diagram below and confirm that your wiring matches the illustrated connection.

Thanks @kinkin it works!

The problem was that i had wired it according to the following diagram, so dout on the microphone board was wired to I2S1_DIN (pin 38) instead of I2S1_DOUT (pin 40):

Shouldn’t dout go to din on the pi? I have designed a hat around this assumption (and to be backwards compatible with other Pis, it would need to be pin38, which is the PCM in).