Skip to content

Kodi 19 no sound over hdmi using fkms #4634

Open

Description

@unformatted

Describe the bug
With the latest linux-raspberrypi kernel on RPi4 aarch64 and kodi-rpi I cannot select hdmi as audio output device anymore.

To reproduce
With config.txt as follows:
dtoverlay=vc4-fkms-v3d,cma-512
dtoverlay=rpivid-v4l2
dtoverlay=
dtparam=audio=on
From kodi, go to Settings > System > Audio > Audio output device.

Expected behaviour
hdmi selectable as an audio output device.

Actual behaviour
there's only headphone option.

System

  • RPi4
  • Arch ARM (aarch64)
  • linux-firmware 20210919.d526e04-1
  • linux-raspberrypi4 5.10.73-3

Additional context
Since kms heavily depends on the monitor's hdmi capabilties and I'm using an hdmi audio extractor in combination with a DVI monitor I have to use fkms. This worked fine until linux-raspberrypi4 5.10.63-18. After upgrading a few days ago hmdi sound was not available anymore. When I downgrade the current linux-raspberrypi4 5.10.73-2 kernel to linux-raspberrypi4 5.10.63-18 I have sound over hdmi back again. See also https://archlinuxarm.org/forum/viewtopic.php?f=65&t=15598 for more details.

Activity

  1. popcornmix commented on Oct 17, 2021

    @popcornmix
    Collaborator

    Can you report output of dmesg, aplay -l and aplay -L for 5.10.63 and 5.10.73 kernels.

  2. Dark-Sky commented on Oct 17, 2021

    @Dark-Sky

    With all of the latest 5.19, 5.14 and 5.15 kernels I have had to put this in cmdline.txt, not just kodi:

    KMS:
    snd-bcm2835.enable_compat_alsa=0
    FKMS:
    snd-bcm2835.enable_compat_alsa=1

    Basically this looks like this it turns on and off the bcm2835-hdmi and vc4-hdmi sound. I am guessing the PiOS is using something different to accomplish this. This was done automatically before this depending on which mode you were booting along with the Headphones.

    Our thread:

    https://forum.manjaro.org/t/i-have-no-sound-output-through-hdmi-on-5-10-73-1-or-5-14-or-5-15/86485

  3. unformatted commented on Oct 17, 2021

    @unformatted
    Author

    @Dark-Sky: snd-bcm2835.enable_compat_alsa=1 works for me with fkms, thank you for the detailed information.

    @popcornmix: do you still want me to report those outputs after Dark-Sky's answer?

  4. popcornmix commented on Oct 17, 2021

    @popcornmix
    Collaborator

    If you are saying that then behaviour changed between 5.10.63 and 5.10.73 kernels, then I'd like to understand why (it's not something I'm immediately aware of having a new requirement). So the logs could b useful.

  5. Dark-Sky commented on Oct 17, 2021

    @Dark-Sky

    In the past kernels fkms would boot ok. Starting with kernels 5.14 and 5.15 kernels I figured out I had to manually put values with snd-bcm2835.enable_compat_alsa= depending on which mode (kms/fkms). And with the last 5.10 this issue crept in. This is with no mention of snd-bcm2835.enable_compat_alsa=1 in cmdline.txt with fkms using V3D rendering. All you get is the headphones but what is strange is the hdmi seems to be picked up in inxi but not available to be picked if you open up the Sound Settings to switch Headphones is the only choice.

    I have seen multiple times with in the last couple of months if these manual setting was not right on the 2 newer kernels that it would boot up to going into the graphical login or trying to enter kodi I would get a black screen and a message from my monitor saying "No Signal". I have not seen this on the latest 5.10 because as soon as I saw my sound situation I knew what to try to fix it.

    pic

    dmesg:
    In the Kernel command line: snd_bcm2835.enable_compat_alsa=0 the value needs to be =1 for it to boot (in the past it was =0) with fkms with bcm2835-hdmi sound as it stands with now with the latest 5.10. 514 and 5.15 kernels.

    https://drive.google.com/file/d/1LkM3gOQVSgLjuGjre07XYMpzy3UVESl2/view?usp=sharing

    Xorg log:

    https://drive.google.com/file/d/1ozSjN5ezFWZsL8PaZSvFfAVuuXivQO4G/view?usp=sharing

  6. Dark-Sky commented on Oct 17, 2021

    @Dark-Sky

    In contrast if I put snd-bcm2835.enable_compat_alsa=1 in cmdline.txt for fkms with v3d rendering and the hdmi sound works and seen in the Sound Settings.

    enabled-aplay

    enabled-inxi

  7. unformatted commented on Oct 18, 2021

    @unformatted
    Author

    @popcornmix :
    Here's 5.10.63-18 dmesg: https://pastebin.com/2fjSnZLt
    Here's 5.10.73-3 dmesg: https://pastebin.com/A6PTxEkH
    I don't have aplay installed and for the moment while I'm still testing I won't install anything new.
    If you want me to post other logs please let me know.

  8. popcornmix commented on Oct 18, 2021

    @popcornmix
    Collaborator

    I wonder if this problem is the same as #4635
    @Dark-Sky can you test a kernel with the linked device tree commit?

  9. Dark-Sky commented on Oct 18, 2021

    @Dark-Sky

    I wonder if this problem is the same as #4635 @Dark-Sky can you test a kernel with the linked device tree commit?

    Sure. Just getting up; need some coffee first.

  10. Dark-Sky commented on Oct 18, 2021

    @Dark-Sky

    @popcornmix I put the new bcm2711-rpi-4-b.dtb through a battery of tests and all is back to what it used to be. I removed any mention of snd-bcm2835.enable_compat_alsa= in config.txt and tested fkms/kms with V3D rendering with the DE and tested kodi-rpi 19.2 with kms and fkms.

    As far as I am concerned this fixes and was a firestorm getting people to adjust to the way you all had it and we released new images with that change yesterday. Now I am having to re-live that memory all over again. Just wanted to let you know I understand. Game on again..... lol

    cmdline.txt used in all tests:

    root=PARTUUID=b75fdbb1-02 rw rootwait console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 usbhid.mousepoll=8 audit=0

    fkms aplay -l:

    card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
      Subdevices: 4/4
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
    card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
      Subdevices: 4/4
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
    

    kms aplay -l:

    card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
      Subdevices: 8/8
      Subdevice #0: subdevice #0
      Subdevice #1: subdevice #1
      Subdevice #2: subdevice #2
      Subdevice #3: subdevice #3
      Subdevice #4: subdevice #4
      Subdevice #5: subdevice #5
      Subdevice #6: subdevice #6
      Subdevice #7: subdevice #7
    card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    

    A side note:

    It has been mentioned that with kodi using fkms one does not get HW decoding. That is not the case here.

    kodi-fkms

  11. 38 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions