Hi,
I'm using the LinkIt Smart 7688 SBC with the baseboard which comes with a WM8960 audio codec. I'm on the 23.05 branch, but I have tried 22.03 as well. This is my change set adding the audio definitions (inspired by this https://openwrt.org/toh/seeed/linkit7688#seeedstudio_breakout_for_linkit_smart_7688_v20):
diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
index 57624c302e..aa1191b2ed 100644
--- a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
+++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
@@ -46,6 +46,25 @@
linux,code = <KEY_WPS_BUTTON>;
};
};
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Audio-I2S";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets = "Headphone", "Headphones";
+ simple-audio-card,routing = "Headphones", "HP_L", "Headphones", "HP_R";
+ simple-audio-card,mclk-fs = <256>;
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
};
&state_default {
@@ -59,11 +78,6 @@
function = "gpio";
};
- i2s {
- groups = "i2s";
- function = "gpio";
- };
-
spis {
groups = "spis";
function = "gpio";
@@ -132,6 +146,25 @@
&i2c {
status = "okay";
+
+ codec: wm8960@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8960";
+ reg = <0x1a>;
+
+ wlf,shared-lrclk;
+ };
+};
+
+&i2s {
+ #sound-dai-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_pins>;
+};
+
+&gdma {
+ status = "okay";
};
&uart1 {
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 816009ac18..d0dfe3765b 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -375,7 +375,7 @@ define Device/mediatek_linkit-smart-7688
IMAGE_SIZE := 32448k
DEVICE_VENDOR := MediaTek
DEVICE_MODEL := LinkIt Smart 7688
- DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sdhci-mt7620
+ DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sdhci-mt7620 kmod-sound-mt7620
SUPPORTED_DEVICES += linkits7688 linkits7688d
endef
TARGET_DEVICES += mediatek_linkit-smart-7688
Playback works well, e.g. using aplay
, however, when I stop playback with Ctrl+C, the board immediately freezes and eventually reboots (watchdog, I guess). If I let the audio play to completion, everything works as expected. Does anyone have an idea what could be wrong here?