Jump to content

odroid N-1 3399 enable spdif


phase

Recommended Posts

 aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMICODEC [HDMI-CODEC], device 0: ff8a0000.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

no i dont think i have asound.conf in my dir-tree

Link to comment
Share on other sites

nvm found it...

 

https://github.com/hardkernel/linux/blob/odroidn1-4.4.y/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts

 

It doesnt seem to enable the SPDIF node atm...

 

SPDIF node is defined here,

https://github.com/hardkernel/linux/blob/odroidn1-4.4.y/arch/arm64/boot/dts/rockchip/rk3399.dtsi#L1658

 

so it has to be instantiated in the board dts by checking the schematics...

 

You can look at other RK3399 boards for that, but try at your own risk since I dont have the N1 to verify that works for your HW:

 

 

&spdif {
	status = "okay";
	pinctrl-0 = <&spdif_bus_1>;
	i2c-scl-rising-time-ns = <450>;
	i2c-scl-falling-time-ns = <15>;
	#sound-dai-cells = <0>;
};
      
	spdif-sound {
		status = "okay";
		compatible = "simple-audio-card";
		simple-audio-card,name = "ROCKCHIP,SPDIF";
		simple-audio-card,cpu {
			sound-dai = <&spdif>;
		};
		simple-audio-card,codec {
			sound-dai = <&spdif_out>;
		};
	};

	spdif_out: spdif-out {
		status = "okay";
		compatible = "linux,spdif-dit";
		#sound-dai-cells = <0>;
	}

 

Link to comment
Share on other sites

apt install device-tree-compiler
cd /media/boot/
dtc -I dtb -O dts -o rk3399-odroidn1-linux.dts rk3399-odroidn1-linux.dtb 
cp rk3399-odroidn1-linux.dts rk3399-odroidn1-linux-mod.dts

Then you tweak rk3399-odroidn1-linux-mod.dts and afterwards:

dtc -I dts -O dtb -o rk3399-odroidn1-linux.dtb rk3399-odroidn1-linux-mod.dts

If something goes wrong your board might not even boot any more afterwards. And you'll get a ton of warning with the above, see https://forum.armbian.com/topic/6496-odroid-n1-not-a-review-yet/?do=findComment&comment=49438

 

Link to comment
Share on other sites

root@odroid:/media/boot# dtc -I dtb -O dts -o rk3399-odroidn1-linux.dts rk3399-odroidn1-linux.dtb
Warning (unit_address_vs_reg): Node /usb@fe800000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /usb@fe900000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@3 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@4 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@5 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@6 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@7 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@8 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@9 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /phy@e220 has a unitroot@odroid:/media/boot# dtc -I dtb -O dts -o rk3399-odroidn1-linux.dts rk3399-odroidn1-linux.dtb
Warning (unit_address_vs_reg): Node /usb@fe800000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /usb@fe900000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@3 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@4 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@5 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@6 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@7 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@8 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /thermal-zones/soc-thermal/trips/trip-point@9 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /phy@e220 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /efuse@ff690000/id has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/cpul-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/cpub-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/gpu-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/center-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/logic-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/wafer-info has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /gpio-keys/button@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /gpiomem has a reg or ranges property, but no unit name name, but no reg property
Warning (unit_address_vs_reg): Node /efuse@ff690000/id has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/cpul-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/cpub-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/gpu-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/center-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/logic-leakage has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /efuse@ff690000/wafer-info has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /gpio-keys/button@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /gpiomem has a reg or ranges property, but no unit name

 

Link to comment
Share on other sites

The dts blob I posted has to go into your kernel source tree, it wont work like that in a decompiled dtb from /boot since the references are wrong. DTS are just text files...

 

You have to put the blob into 

https://github.com/hardkernel/linux/blob/odroidn1-4.4.y/arch/arm64/boot/dts/rockchip/rk3399-odroidn1-linux.dts

 

and then run make dtbs again to produce the output dtb and put that back in /boot.

 

If you are cross-compiling, you need to ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make dtbs

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines