01-14-2019, 11:16 PM
Ok, I figured this out on my own and share what I know. I'm including my diff for the DTS file. The key issues are that you need enable daudio and daudio0. You need to disable uart2 because it conflicts with the I2S MCK pin.
You need to change your kernel configuration to enable the DAUDIO and DAUDIO0 sound driver. I enabled them as modules. You also need to enable the rudimentary sound drivers for sunxi. If you build as modules, you will need to insert the daudio module before the daudio0 module.
Doing these things, I was able to see the I2S signals toggling correctly on my logic analyzer when I play a wav file using aplay. The aplay device name can be found using aplay -L
Hope this helps everybody. This enables the I2S on the Pine64 with the Pine64 as a master. It also doesn't do anything to communicate with your CODEC through its control port. That is my next step as I'm using a CS4270 where the CS4270 is the clock master. So, I need the I2C functioning and I need to change the DTS to make the Pine a clock slave.
diff --git a/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts b/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
index 0675b205..f1db8bc4 100644
--- a/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
+++ b/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
@@ -1737,7 +1737,7 @@
pinctrl-1 = <0x20>;
uart2_port = <0x2>;
uart2_type = <0x4>;
- status = "okay";
+ status = "disabled";
pinctrl-0 = <0xa4>;
};
@@ -1956,7 +1956,7 @@
frametype = <0x0>;
tdm_config = <0x1>;
tdm_num = <0x0>;
- status = "disabled";
+ status = "okay";
linux,phandle = <0x4e>;
phandle = <0x4e>;
device_type = "daudio0";
@@ -1981,7 +1981,7 @@
frametype = <0x0>;
tdm_config = <0x1>;
tdm_num = <0x1>;
- status = "disabled";
+ status = "okay";
linux,phandle = <0x4f>;
phandle = <0x4f>;
device_type = "daudio1";
@@ -2026,14 +2026,14 @@
sound@1 {
compatible = "allwinner,sunxi-daudio0-machine";
sunxi,daudio0-controller = <0x4e>;
- status = "disabled";
+ status = "okay";
device_type = "snddaudio0";
};
sound@2 {
compatible = "allwinner,sunxi-daudio1-machine";
sunxi,daudio1-controller = <0x4f>;
- status = "disabled";
+ status = "okay";
device_type = "snddaudio1";
};
You need to change your kernel configuration to enable the DAUDIO and DAUDIO0 sound driver. I enabled them as modules. You also need to enable the rudimentary sound drivers for sunxi. If you build as modules, you will need to insert the daudio module before the daudio0 module.
Doing these things, I was able to see the I2S signals toggling correctly on my logic analyzer when I play a wav file using aplay. The aplay device name can be found using aplay -L
Hope this helps everybody. This enables the I2S on the Pine64 with the Pine64 as a master. It also doesn't do anything to communicate with your CODEC through its control port. That is my next step as I'm using a CS4270 where the CS4270 is the clock master. So, I need the I2C functioning and I need to change the DTS to make the Pine a clock slave.
diff --git a/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts b/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
index 0675b205..f1db8bc4 100644
--- a/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
+++ b/arch/arm64/boot/dts/sun50iw1p1-pine64-plus.dts
@@ -1737,7 +1737,7 @@
pinctrl-1 = <0x20>;
uart2_port = <0x2>;
uart2_type = <0x4>;
- status = "okay";
+ status = "disabled";
pinctrl-0 = <0xa4>;
};
@@ -1956,7 +1956,7 @@
frametype = <0x0>;
tdm_config = <0x1>;
tdm_num = <0x0>;
- status = "disabled";
+ status = "okay";
linux,phandle = <0x4e>;
phandle = <0x4e>;
device_type = "daudio0";
@@ -1981,7 +1981,7 @@
frametype = <0x0>;
tdm_config = <0x1>;
tdm_num = <0x1>;
- status = "disabled";
+ status = "okay";
linux,phandle = <0x4f>;
phandle = <0x4f>;
device_type = "daudio1";
@@ -2026,14 +2026,14 @@
sound@1 {
compatible = "allwinner,sunxi-daudio0-machine";
sunxi,daudio0-controller = <0x4e>;
- status = "disabled";
+ status = "okay";
device_type = "snddaudio0";
};
sound@2 {
compatible = "allwinner,sunxi-daudio1-machine";
sunxi,daudio1-controller = <0x4f>;
- status = "disabled";
+ status = "okay";
device_type = "snddaudio1";
};