X86_64 – UP Board – ‘Cherry Trail’ – Sound – Working..
The only missing OS component on the new UP Board (x5-Z8350) was that sound (HDMI) was not present.. After a bit of digging, I found some patches for Kernel 4.5, and a later patched kernel version that was supposed to work..
I tried the patched version of 4.7.0 from here: https://github.com/plbossart/sound/tree/byt-cht-hdmi-v4.7 but found that the compile failed:
............................... CC [M] sound/hdmi_audio/intel_mid_hdmi_audio_if.o In file included from sound/hdmi_audio/intel_mid_hdmi_audio_if.c:31:0: sound/hdmi_audio/intel_mid_hdmi_audio_if.c: In function ‘had_chk_intrmiss’: sound/hdmi_audio/intel_mid_hdmi_audio.h:730:12: error: inlining failed in call to always_inline ‘snd_intelhad_read_len’: function body not available inline int snd_intelhad_read_len(struct snd_intelhad *intelhaddata); ^~~~~~~~~~~~~~~~~~~~~ sound/hdmi_audio/intel_mid_hdmi_audio_if.c:203:13: note: called from here intr_count = snd_intelhad_read_len(intelhaddata); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from sound/hdmi_audio/intel_mid_hdmi_audio_if.c:31:0: sound/hdmi_audio/intel_mid_hdmi_audio.h:738:12: error: inlining failed in call to always_inline ‘had_write_register’: function body not available inline int had_write_register(uint32_t reg_addr, uint32_t data); ^~~~~~~~~~~~~~~~~~ .................................
After more ‘research’, it seemed that this might possibly be due to the ‘later’ gcc compiler provided with Fedora 24 (6.1.1)..? I found some older articles that referenced this particular error, and these suggested that the fix was simply to remove references to ”inline” in the affected code.. So, I modified ~/sound/hdmi_audio/intel_mid_hdmi_audio.h and removed references to ‘inline‘ from the code, and re-compiled the kernel, and it compiled OK, and when booted, sound (via HDMI) actually worked..
[rgadsdon@rgup ~]$ uname -a Linux rgup 4.7.0-up #2 SMP Thu Aug 25 18:28:44 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux ............ [rgadsdon@rgup ~]$ ll /dev/snd total 0 drwxr-xr-x 2 root root 60 Aug 25 18:54 by-path crw-rw----+ 1 root audio 116, 2 Aug 25 18:54 controlC0 crw-rw----+ 1 root audio 116, 3 Aug 25 19:02 pcmC0D0p crw-rw----+ 1 root audio 116, 1 Aug 25 18:54 seq crw-rw----+ 1 root audio 116, 33 Aug 25 18:54 timer
Not sure when this will all be incorporated in mainline kernel code, and the patches still include at least one #Fixme..
Robert Gadsdon. August 25, 2016.
You are a legend, I was trying to compile the kernel for Arch Linux and I was encountering the same issue, I tried removing the inline references – but maybe I went berserk and removed them from too many files 🙂
Thanks for posting this. I too have an up-board and this too was an issue for me.
Thanks man. You’re a life-saver. 🙂 I thought I applied the patch incorrectly.
Hi,
do you think there’s a way to just compile the hdmi_audio and not the whole thing?
I’ve hot a super modded kernel and DE running on my intel compute stick and don’t want to messed up everything just for audio.
Might be possible to just compile as a module, but not recommended, and may not work correctly, in any case.. The existing known/good config is in the .config file, and can easily be saved, just in case..
RG.
Can you provide the complete kernel (+ some help how to install it manually)?
I don’t have any capacity for supplying binaries.. The kernel compile/install is relatively straightforward Intel/x86_64, as long as you remember to select ‘Atom’ for the CPU type..
RG.
will it fix internal sound also, or just hdmi?
Only tested with HDMI.
RG.