Jump to content

NanoPi NEO3 and SPDIF


Pavel Pogodin

Recommended Posts

Can’t figure out how to enable SPDIF on NanoPi NEO3. rk3328-nanopi-neo3-rev02.dtb sources contain SPDIF

 

        sound-spdif {
                compatible = "simple-audio-card";
                simple-audio-card,name = "SPDIF";
                simple-audio-card,cpu {
                        sound-dai = <&spdif>;
                };
                simple-audio-card,codec {
                        sound-dai = <&spdif_out>;
                };
        };

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

&spdif {
    status = "okay";
    pinctrl-0 = <&spdifm0_tx>;
};

 

Kernel module loaded too

 

root@neo3:~# lsmod |grep spdif
snd_soc_rockchip_spdif    16384  0
snd_soc_core          278528  5 snd_soc_pcm5102a,snd_soc_rockchip_spdif,snd_soc_simple_card_utils,snd_soc_rockchip_i2s,snd_soc_simple_card

 

But I don’t see the sound interface

 

root@neo3:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Pro [DX3 Pro], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Out [I2S Out], device 0: ff010000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [ff010000.i2s-pcm5102a-hifi pcm5102a-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

Link to comment
Share on other sites

SPDIF may be enabled by simple overlay file with this content:

/dts-v1/;
/plugin/;

/ {
    compatible = "friendlyelec,nanopi-neo3", "rockchip,rk3328";

    fragment@0 {
        target = <&spdif_out>;
        __overlay__ {
        status = "okay";
        };
    };
};

compile and install:

sudo armbian-add-overlay spdif-out-enable.dts

reboot and check:

nik@nanopineo3:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: I2S [I2S], device 0: ff010000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [ff010000.i2s-pcm5102a-hifi pcm5102a-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SPDIF [SPDIF], device 0: ff030000.spdif-dit-hifi dit-hifi-0 [ff030000.spdif-dit-hifi dit-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines