The A20 driver for HDMI audio is almost done!


kodi

UPDATE 20-01-2020: Now the A20 HDMI Audio driver patches are submitted  and KODI images with working HDMI Audio are on our ftp

We blogged few weeks ago about the KODI image done for A20 and A64 by our friends Dimitar Gamishev and Stefan Saraev.

A64 had everything working fine, but the A20 image had no HDMI audio, as there is no such driver in the mainline kernel. This of course made A20 not useful for media center.

We decided to try to solve this problem by ourselves by writing this missing driver and today we have success!

The audio driver for HDMI is working, but is still far from complete as we have to add channel management etc, but with our driver we can hear audio via the HDMI with A20!

We will complete and send the patches to mainline after our Christmas-New Year vacation, so somewhere in January the KODI image (and of course all Olimex official images) for A20 will be updated and will have HDMI audio too!

 

25 Comments (+add yours?)

  1. fossonly
    Dec 20, 2019 @ 13:07:39

    awesome!

    Reply

  2. jonassmedegaard
    Dec 20, 2019 @ 13:47:25

    Great! Thanks for doing that extra work of pushing it to mainline, that is much appreciated!

    Reply

  3. saveurlinux
    Dec 20, 2019 @ 16:16:57

    Thanks a lot

    Reply

  4. Kenny
    Dec 20, 2019 @ 22:57:59

    Yay! I can’t wait. Thank you!

    Reply

  5. AlaskaLinuxUser
    Dec 22, 2019 @ 07:33:04

    Well done!

    Reply

  6. NeFAR
    Dec 24, 2019 @ 19:06:00

    how download? where link?

    Reply

  7. Claoudj
    Dec 27, 2019 @ 14:52:12

    Congratz ! can’t wait to see the link to it !

    Reply

  8. SK
    Jan 21, 2020 @ 22:15:50

    Fot those that missed the update, links to working images are now at the top of it 🙂

    Reply

  9. NeFAR
    Feb 01, 2020 @ 16:21:17

    don`t work any plygins

    Reply

  10. tuxd3v
    Feb 23, 2020 @ 07:09:25

    Hello, Nice to have a patch for hdmi audio 🙂
    I was running to apply it on top of 5.5.5 kernel,

    But kernel compilation fails with the error:
    ‘drivers/gpu/drm/sun4i/sun4i_hdmi_audio.o: In function `sun4i_hdmi_audio_startup’:
    sun4i_hdmi_audio.c:(.text+0x324): undefined reference to `snd_pcm_hw_constraint_eld’
    drivers/gpu/drm/sun4i/sun4i_hdmi_audio.o: In function `sun4i_hdmi_audio_create’:
    sun4i_hdmi_audio.c:(.text+0x3b8): undefined reference to `devm_snd_dmaengine_pcm_register’
    sun4i_hdmi_audio.c:(.text+0x3d2): undefined reference to `devm_snd_soc_register_component’
    sun4i_hdmi_audio.c:(.text+0x476): undefined reference to `devm_snd_soc_register_card’
    drivers/gpu/drm/sun4i/sun4i_hdmi_audio.o: In function `.LANCHOR0′:
    sun4i_hdmi_audio.c:(.rodata+0x0): undefined reference to `snd_dmaengine_pcm_prepare_slave_config’
    Makefile:1078: recipe for target ‘vmlinux’ failed
    make: *** [vmlinux] Error 1′

    Does any one knows why it fails to compile?
    thanks in advance
    Best Regards
    tux

    Reply

    • tuxd3v
      Feb 29, 2020 @ 04:10:49

      I applied v1, and not v3, sorry, my mistake 🙂
      v3 only works if you connect Display..
      Some hdmi dongles(if not majority) have a 3.5mm Jack for audio, unfortunatly you also need a display :S

      Reply

  11. Jim
    Apr 02, 2020 @ 20:21:21

    no internet connection with revision K 😦

    Reply

  12. jonassmedegaard
    Apr 02, 2020 @ 20:46:34

    ethernet on rev. K requires changes to code (hardware is not broken) – workaround is to lower speed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911560#26

    Reply

  13. jonassmedegaard
    Apr 02, 2020 @ 21:28:08

    Seems the latest patch pushed upstream is from late January, with latest comment from late February indicating that a new revision is needed: https://patchwork.kernel.org/patch/11354381/

    Reply

  14. tuxd3v
    Jun 06, 2020 @ 06:58:51

    ~# cat /proc/asound/card0/pcm0p/info
    card: 0
    device: 0
    subdevice: 0
    stream: PLAYBACK
    id: SUN4I-HDMI PCM 1c16000.hdmi-0
    name: SUN4I-HDMI PCM 1c16000.hdmi-0
    subname: subdevice #0
    class: 0
    subclass: 0
    subdevices_count: 1
    subdevices_avail: 1
    ~# cat /proc/asound/devices
    0: [ 0] : control
    16: [ 0- 0]: digital audio playback
    33: : timer
    ~# cat /proc/asound/pcm
    00-00: SUN4I-HDMI PCM 1c16000.hdmi-0 : SUN4I-HDMI PCM 1c16000.hdmi-0 : playback 1
    ~# cat /proc/asound/timers
    G0: system timer : 4000.000us (10000000 ticks)
    P0-0-0: PCM playback 0-0-0 : SLAVE

    I can test and hear sound with:
    ‘speaker-test -c2 -twav’
    but on desktop sound appears mutted 😦
    I don’t really know how to solve it..
    root@OLime2:~# amixer controls
    numid=1,iface=PCM,name=’ELD’
    root@OLime2:~# amixer cget numid=1
    numid=1,iface=PCM,name=’ELD’
    ; type=BYTES,access=r–v—-,values=128
    : values=0x10,0x00,0x07,0x00,0x66,0x12,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x6d,0x64,0x56,0x4c,0x32,0x32,0x32,0x57,0x00,0x09,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
    root@OLime2:~# amixer cset numid=1 50%
    amixer: Control default element write error: Operation not permitted

    Reply

  15. Daniel Sousa
    Jul 05, 2020 @ 15:14:16

    Any news about this? I would love to have audio in the “normal” distro

    Reply

    • OLIMEX Ltd
      Jul 07, 2020 @ 10:06:11

      the first patch was not accepted, too much work to re-write everything, Stefan is no longer working for Olimex, so it’s up to him when he will do it

      Reply

      • Daniel Sousa
        Jul 07, 2020 @ 11:20:55

        Thank you for your reply!
        That is unfortunate.

        Could you apply the patch to the armbian images that you have available?

  16. jonassmedegaard
    Jul 07, 2020 @ 12:28:12

    Daniel: You could yourself promote the existing draft patch to Armbian developers – as also mentioned previously, the patch is here: https://patchwork.kernel.org/patch/11354381/

    Reply

    • Daniel Sousa
      Jul 07, 2020 @ 12:39:43

      I have never compiled a kernel or a distro. And my previous experience trying to compile someone else’s code has been quite disappointing.

      And then even if I succeed, no one else is going to be able to take advantage of my work.

      Reply

  17. jonassmedegaard
    Jul 07, 2020 @ 12:47:16

    By “promote the existing draft patch” I do not mean develop it further, but file an issue suggesting its adoption, here: https://github.com/armbian/build/issues

    Reply

  18. jonassmedegaard
    Jul 17, 2020 @ 20:37:59

    that’s great news – thanks for pushing it, Daniel!

    Reply

  19. jonassmedegaard
    Aug 26, 2020 @ 10:45:47

    For the record, the patch pushed by Daniel Sousa to Armbian is https://github.com/armbian/build/issues/2084 and was accepted on July 17th: https://github.com/armbian/build/pull/2096

    Reply

  20. Elia
    Nov 05, 2020 @ 21:10:19

    How can I build an image with this path and an updated Kodi? I can’t access the addons repository.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: