i2S TDM only 2 channel instead 8

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official images

Please describe your issue below:

I can send 8 channels TDM but when I try to read the channels by I2S IN , I capture only 2 channels but the channels there are all in the logical analyzer, why?

**Delete this line and post your answer here.**

Post a console log of your issue below:


**Delete this line and post your log here.**

1 Like

Hello @marcellom66

We will check and feedback here.

Hello @marcellom66

Do you use the I2S pins from the GPIO header? The default configuration for I2S is one lane out and one lane in, so the out and in are all 2 channels, you sure the out is 8 channels and in is 2 channels ?

I changed the overlay for 8 in and 8 out
/dts-v1/;

/ {

fragment@0 {
	target = <0xffffffff>;

	__overlay__ {

		aml-audio-card,dai-link@0 {
			mclk-fs = <0x80>;
			continuous-clock;
			suffix-name = "alsaPORT-spdif";

			cpu {
				sound-dai = <0xffffffff>;
				system-clock-frequency = <0x5dc000>;
			};

			codec {
				sound-dai = <0xffffffff>;
			};
		};

		aml-audio-card,dai-link@1 {
			format = "dsp_a";
			mclk-fs = <0x40>;
			continuous-clock;
			bitclock-master = <0xffffffff>;
			frame-master = <0xffffffff>;
			suffix-name = "alsaPORT-pcm";

			cpu {
				sound-dai = <0xffffffff>;
				dai-tdm-slot-tx-mask = <0x01>;
				dai-tdm-slot-rx-mask = <0x01>;
				dai-tdm-slot-num = <0x02>;
				dai-tdm-slot-width = <0x10>;
				system-clock-frequency = <0x7d000>;
				phandle = <0x01>;
			};

			codec {
				sound-dai = <0xffffffff>;
				phandle = <0x02>;
			};
		};

		aml-audio-card,dai-link@2 {
			format = "i2s";
			mclk-fs = <0x100>;
			continuous-clock;
			bitclock-master = <0xffffffff>;
			frame-master = <0xffffffff>;
			suffix-name = "alsaPORT-i2s-i2s4hdmirx";

			cpu {
				sound-dai = <0xffffffff>;
				dai-tdm-slot-tx-mask = <0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01>;
				dai-tdm-slot-rx-mask = <0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01>;
				dai-tdm-slot-num = <0x08>;
				dai-tdm-slot-width = <0x20>;
				system-clock-frequency = <0xbb8000>;
			};

			codec {
				sound-dai = <0xffffffff>;
				phandle = <0x03>;
			};
		};

		aml-audio-card,dai-link@3 {
			format = "i2s";
			mclk-fs = <0x100>;
			bitclock-master = <0xffffffff>;
			frame-master = <0xffffffff>;
			suffix-name = "alsaPORT-i2s4parser";

			cpu {
				sound-dai = <0xffffffff>;
				dai-tdm-slot-tx-mask = <0x01 0x01>;
				dai-tdm-slot-rx-mask = <0x01 0x01>;
				dai-tdm-slot-num = <0x02>;
				dai-tdm-slot-width = <0x20>;
				system-clock-frequency = <0xbb8000>;
			};

			codec {
				sound-dai = <0xffffffff>;
				phandle = <0x04>;
			};
		};

		aml-audio-card,dai-link@4 {
			mclk-fs = <0x40>;
			suffix-name = "alsaPORT-pdm";

			cpu {
				sound-dai = <0xffffffff>;
			};

			codec {
				sound-dai = <0xffffffff>;
			};
		};

		aml-audio-card,dai-link@5 {
			mclk-fs = <0x80>;
			suffix-name = "alsaPORT-spdifb";

			cpu {
				sound-dai = <0xffffffff>;
				system-clock-frequency = <0x5dc000>;
			};

			codec {
				sound-dai = <0xffffffff>;
			};
		};

		aml-audio-card,dai-link@6 {
			mclk-fs = <0x100>;
			suffix-name = "alsaPORT-tv";

			cpu {
				sound-dai = <0xffffffff>;
				system-clock-frequency = <0xbb8000>;
			};

			codec {
				sound-dai = <0xffffffff>;
			};
		};

		aml-audio-card,dai-link@7 {
			mclk-fs = <0x100>;
			continuous-clock;
			suffix-name = "alsaPORT-loopback";

			cpu {
				sound-dai = <0xffffffff>;
				system-clock-frequency = <0xbb8000>;
			};

			codec {
				sound-dai = <0xffffffff>;
			};
		};
	};
};

fragment@1 {
	target = <0xffffffff>;

	__overlay__ {
		status = "okay";
	};
};

__symbols__ {
	tdmacpu = "/fragment@0/__overlay__/aml-audio-card,dai-link@1/cpu";
	tdmacodec = "/fragment@0/__overlay__/aml-audio-card,dai-link@1/codec";
	tdmbcodec = "/fragment@0/__overlay__/aml-audio-card,dai-link@2/codec";
	tdmccodec = "/fragment@0/__overlay__/aml-audio-card,dai-link@3/codec";
};

__fixups__ {
	aml_sound = "/fragment@0:target:0";
	spdifa = "/fragment@0/__overlay__/aml-audio-card,dai-link@0/cpu:sound-dai:0";
	dummy_codec = "/fragment@0/__overlay__/aml-audio-card,dai-link@0/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@1/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@2/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@3/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@4/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@5/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@6/codec:sound-dai:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@7/codec:sound-dai:0";
	tdma = "/fragment@0/__overlay__/aml-audio-card,dai-link@1:bitclock-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@1:frame-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@1/cpu:sound-dai:0";
	tdmb = "/fragment@0/__overlay__/aml-audio-card,dai-link@2:bitclock-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@2:frame-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@2/cpu:sound-dai:0\0/fragment@1:target:0";
	tdmc = "/fragment@0/__overlay__/aml-audio-card,dai-link@3:bitclock-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@3:frame-master:0\0/fragment@0/__overlay__/aml-audio-card,dai-link@3/cpu:sound-dai:0";
	pdm = "/fragment@0/__overlay__/aml-audio-card,dai-link@4/cpu:sound-dai:0";
	spdifb = "/fragment@0/__overlay__/aml-audio-card,dai-link@5/cpu:sound-dai:0";
	extn = "/fragment@0/__overlay__/aml-audio-card,dai-link@6/cpu:sound-dai:0";
	loopbacka = "/fragment@0/__overlay__/aml-audio-card,dai-link@7/cpu:sound-dai:0";
};

};

1 Like

Hello @marcellom66

You sure you can send 8 ch with the SDO pin?

I hear the 440Hz out from all the outputs

Only from the I2S SDO pin?

yes but the problem is when I use aloop from I2S in to I2S out (how you can see in the logic analyer screeshot) the 6 signals audio go to only 2 audio signal, have you examples of tdm use and setups?