Mt7623ni / R2 audio properties?

Hello I think I try use my R2 for media box also but I need audio (5.2 channel great, but 2 acceptable). What routes I should go further? Current 4.19 @frank-w kernel status is:

[    6.842389] ALSA device list:
[    6.845405]   No soundcards found.


  1. HDMI audio. Is it supported, and how?? This is best alternative.

  2. USB audio. Posible but low amount of ports/hub etc. hazzle.

  3. BT audio. May work but if use projector then every listener needs headset or BT-audio bridge.

  4. GPIO I2S ??? I like to keep gpio free for other projects.

And CPU/GPU media HW accelerators? R2 should do routing at same when play movie…

Cases for board that support laptop DVD-rom and sata disk at same? Such case is bigger than R2 board. I think IR-receiver needs to move and reset/poweron needs some pushrods. What is specs of IR-receiver? It may need to put pin-header its place and new one with cable…

Is there v. 1.2 board 3D model (.stl) availabe? Its boring to do by myself because I know it is somewhere… I need it to do new case for board including holder for cd-rom…

@sinovoip have any ideas?

For HDMI audio: I find kernel config: # CONFIG_SND_SOC_MT2701 is not set.

Have anybody tested it and why it is disabled in default Frank kernel?

This is configured: CONFIG_SND_SOC_HDMI_CODEC=y

There is not any hdmi_audio nodes in .dtsi. Should look like this?:

sound_hdmi: sound-hdmi {

I have only enabled options i use…as i have not tried much with sound (had also no information about getting it working) there may some options missing

When it’s enabled - no sound device anyway (5.5 kernel), actually cant rebember if sound was worked on any older kernels - never tested it.

Nope, nothing is available, no specs, no dts, no drivers.

Sound over HDMI works fine, I used an R2 as my desktop system for 6 months. You just need to enable the correct option in the kernel config - there’s an early post here about it.

Can you point to changes needed as diff to my repo (e.g. 5.4-main)?

it’s something like WMC codec - its under sound - pretty much the first post in this board about booting the R2 has the details

could you link the post? maybe dts-node is needed too…i only know i2s used with external module

Did anyone tested if sound works in 4.4-BSP?

According to this there are 2 main components for hdmi sound:

  • soc chip driver (orange)

  • hdmi_codec(purple)

Unclear question for me - if dts/dtsi nones should be enought for working sound? or hdmi codec driver is needed, like wm8960/cs42448?

It works(detects hdmi) in 4.4 and it uses mt7623-wm8960 driver for hdmi.

1 Like

Could you add dts-nodes and driver (configsymbol) from 4.4 to 5.4-main? And report me whats needed?

I’m trying to figure out what to add, looks like 4.4 has different mt7623-wm8960 driver, which has hdmi support. I still have some concerns about it - i have only 7" display w/o sound - so can’t test sound, and the hdmi-out is labaled as a demo output:

Anyway, i’ll post info on any progress.

UPD: First “success” - kernel panic :smiley:

The mainline linux mt2701_wm9860 is exactly wm9860 i2c codec driver. And mt7623a-rfb-emmc.dts, mt7623a-rfb-nand.dts, and mt7623n-rfb-emmc.dts and has its dts notes e.g.:

/ {
        model = "MediaTek MT7623A with eMMC  reference board";
        compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623";
        sound {
                compatible = "mediatek,mt2701-wm8960-machine";
                mediatek,platform = <&afe>;
                audio-routing =
                        "Headphone", "HP_L",
                        "Headphone", "HP_R",
                        "LINPUT1", "AMIC",
                        "RINPUT1", "AMIC";
                mediatek,audio-codec = <&wm8960>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2s0_pins_a>;

&i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_b>;
        status = "okay";

        wm8960: wm8960@1a {
                compatible = "wlf,wm8960";
                reg = <0x1a>;

Afrer adding it to mt7623n-bananapi-bpi-r2.dts i got kernel panic on mt2701_wm9860 module load (i don’t have wm9860 codec)

if you have a working dts you can give it to me…my display has audio-output (tested with rpi3 yesterday). but i have not much done with alsa, i guess i need some more config to pass audio through hdmi

Unfortunately I haven’t, and if I understood correct - hdmi codec is not implemented (I mean alsa driver) in current mainline kernel.

Which file is it in 4.4? Maybe it’s possible to port

It depends on other mt8521p header files

according to this (alsa overview) and this(machinr driver) the mt7623-wm8960.c from 4.4 is a machine driver with hdmi support (but i did’nt tested the sound), the machine drivers are present in recent kernels, but only for wm8960 and cs42448 external codecs. All other drivers seems to be implemented (platform, dai) and they are different from 4.4 (including dts) so it would be tricky to port it(at least from 4.4) @Ryder.Lee do you as the author of mainline wm8960 driver have any plans to implement hdmi? Or may be there are some useful resources that you know for alsa SoC oding are exsists? that may help to implement it by community?