Hi all,

I am currently trying to get audio output working on a LinkIt Smart
7688 (Mediatek MT7688, MIPS) using a WM8960 codec. I am using the
OpenWrt master branch (kernel 4.4.14). The relevant sections of my
device tree look like this:

#include "mt7628an.dtsi"
/ {
        /* ... */
        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>;
&pinctrl {
        /* ... */
        i2s_pins: i2s {
                i2s {
                        ralink,group = "i2s";
                        ralink,function = "i2s";
        wm8960_mclk_pins: wm8960_mclk {
                wm8960_mclk {
                        ralink,group = "refclk";
                        ralink,function = "reclk";
&i2c {
        compatible = "ralink,rt2880-i2c";
        status = "okay";
        codec: wm8960@1a {
                #sound-dai-cells = <0>;
                compatible = "wlf,wm8960";
                reg = <0x1a>;

&i2s {
        #sound-dai-cells = <0>;
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2s_pins>, <&wm8960_mclk_pins>;
&gdma {
        status = "okay";

I had to manually enable the support for the MT7688 in the I2S driver
by modifying the DEPENDS variable for KernelPackage/sound-mt7620 in
target/linux/ramips/modules.mk. In the kernel configuration I had to

The drivers seem to be loading fine. The relevant dmesg lines are:
rt2880-pinmux pinctrl: request pin 4 (io4) for 10000900.i2c
rt2880-pinmux pinctrl: request pin 5 (io5) for 10000900.i2c
i2c-ralink 10000900.i2c: clock 100KHz, re-start not support
rt2880-pinmux pinctrl: request pin 0 (io0) for 10000a00.i2s
rt2880-pinmux pinctrl: request pin 1 (io1) for 10000a00.i2s
rt2880-pinmux pinctrl: request pin 2 (io2) for 10000a00.i2s
rt2880-pinmux pinctrl: request pin 3 (io3) for 10000a00.i2s
rt2880-pinmux pinctrl: request pin 36 (io36) for 10000a00.i2s
ralink-i2s 10000a00.i2s: mclk 480KHz
asoc-simple-card sound: wm8960-hifi <-> 10000a00.i2s mapping ok

When running 'alsactl init', I get:
Found hardware: "Audio-I2S" "" "" "" ""
Hardware is initialized using a generic method

However, when trying to play back sounds using madplay, I run into a
kernel BUG with the call trace:
[<871014f0>] snd_pcm_lib_default_mmap+0x30/0x48 [snd_pcm]
[<871015f0>] snd_pcm_mmap_data+0xe8/0xd8c [snd_pcm]

I traced this back to the following statements in dma_mmap_attrs:
struct dma_map_ops *ops = get_dma_ops(dev);

Here, get_dma_ops always returns NULL as CONFIG_SYS_HAS_DMA_OPS is not
defined. Now I am wondering how I could resolve this issue? Any hints
are appreciated!

Thanks, Sven
openwrt-devel mailing list

Reply via email to