Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No built-in rt5651-sound audio card #28

Open
razum2um opened this issue Nov 12, 2020 · 4 comments
Open

No built-in rt5651-sound audio card #28

razum2um opened this issue Nov 12, 2020 · 4 comments

Comments

@razum2um
Copy link

razum2um commented Nov 12, 2020

I've built mainline 5.9 kernel and have only hdmi audio

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: hdmisound [hdmi-sound], device 0: ff8a0000.i2s-i2s-hifi i2s-hifi-0 [ff8a0000.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

then compared dts (from dtb inside image) and found some related pieces in your version:

rt5651-sound {
  status = "okay";
  compatible = "simple-audio-card";
  simple-audio-card,name = "realtek,rt5651-codec";
  simple-audio-card,format = "i2s";
  simple-audio-card,mclk-fs = <0x100>;
  simple-audio-card,widgets = "Microphone\0Mic Jack\0Headphone\0Headphone Jack";
  simple-audio-card,routing = "Mic Jack\0micbias1\0IN1P\0Mic Jack\0Headphone Jack\0HPOL\0Headphone Jack\0HPOR";

  simple-audio-card,cpu {
    sound-dai = <0xc4>;
  };

  simple-audio-card,codec {
    sound-dai = <0xc5>;
  };
};
...
rt5651@1a {
  #sound-dai-cells = <0x00>;
  compatible = "realtek,rt5651";
  reg = <0x1a>;
  clocks = <0x08 0x59>;
  clock-names = "mclk";
  pinctrl-names = "default";
  pinctrl-0 = <0x3c>;
  status = "okay";
  phandle = <0xc5>;
};
...

I'm not really into kernel development and think I could miss something.. right now rt5651 is included only in rk3399-sapphire-excavator of mainline kernel

Could you push your dts patch for nanopi-m4?

@razum2um razum2um changed the title rt5651-sound No built-in rt5651-sound audio card Nov 12, 2020
@avafinger
Copy link
Owner

Which kernel version did you build?

@razum2um
Copy link
Author

5.9.8

@avafinger
Copy link
Owner

I don't usually maintain a patch set, here is the DTS patch to have wifi, BT, spdif, and rt5651, strip off the rest you don't want. It's been a long time since I worked on it.
rt5651_spdif_wifi_bt_dts.patch.tar.gz

@avafinger
Copy link
Owner

Just restore the following line to original one:

-#include "rk3399-nanopi4.dtsi"
+#include "rk3399-nanopi-m4.dtsi"


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants