1 1
nikkov

i2s clock problem

Recommended Posts

Hi,

I try working with i2s driver on last armbian (5.99 kernel 4.19.84) with nanopi neo and found trouble with I2S clock - it has very excessive jitter (see attached screen from my oscilloscope). I use small dts overlay for enable i2s and mainline i2s code without changes and with changes from codekipper, nanopi neo and neo 2 with same result, but old armbian image 5.65 (4.14.17) working without problem.

I also found a mention of a similar problem on forum volumio

 

sun8i-h3-i2s0.dts

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun8i-h3";

 	fragment@0 {
 		target-path = "/";
 		__overlay__ {
			pcm5102a: pcm5102a {
			#sound-dai-cells = <0>;
			compatible = "ti,pcm5102a";
			pcm510x,format = "i2s";
			};
 		};
 	};

	fragment@1 {
		target = <&i2s0>;
		__overlay__ {
			status = "okay";
			pinctrl-0 = <&i2s0_pins>;
			sound-dai = <&pcm5102a>;
			pinctrl-names = "default";
		};
	};

	fragment@2 {
		target-path = "/";
		__overlay__ {
			sound_i2s {
				compatible = "simple-audio-card";
				simple-audio-card,name = "I2S-master";
				simple-audio-card,mclk-fs = <256>;
				simple-audio-card,format = "i2s";
		                status = "okay";

				simple-audio-card,cpu {
					sound-dai = <&i2s0>;
				};

				simple-audio-card,codec {
					sound-dai = <&pcm5102a>;
				};
			};
		};
	};
};

 

i2s_clock.jpg

Share this post


Link to post
Share on other sites

I made some investigation and found that unstable phase is a consequence of sigma-delta modulation for audio PLL from this commit

Sigma-delta modulation make more exact frequency but it leads variable phase of clocks. This means that with the kernel> 4.15 some codecs will not work, as they will not be able to synchronize with the clocks.

My PCM5102A may work only with 48k, but not higher

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1