{"id":1800,"date":"2016-08-26T05:50:10","date_gmt":"2016-08-26T04:50:10","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1800"},"modified":"2016-08-26T05:50:10","modified_gmt":"2016-08-26T04:50:10","slug":"x86_64-up-board-cherry-trail-sound-working","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1800","title":{"rendered":"X86_64 &#8211; UP Board &#8211; &#8216;Cherry Trail&#8217; &#8211; Sound &#8211; Working.."},"content":{"rendered":"<p>The only missing OS component on the new <strong>UP Board<\/strong> (x5-Z8350) was that sound (HDMI) was not present..\u00a0\u00a0\u00a0 After a bit of digging, I found some patches for Kernel 4.5, and a later patched kernel version that was supposed to work..<\/p>\n<p>I tried the patched version of 4.7.0 from here:\u00a0 <a href=\"https:\/\/github.com\/plbossart\/sound\/tree\/byt-cht-hdmi-v4.7\" target=\"_blank\">https:\/\/github.com\/plbossart\/sound\/tree\/byt-cht-hdmi-v4.7<\/a>\u00a0 but found that the compile failed:<\/p>\n<pre><span style=\"font-family: courier new,courier;\"><strong> ...............................<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>CC [M] sound\/hdmi_audio\/intel_mid_hdmi_audio_if.o<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>In file included from sound\/hdmi_audio\/intel_mid_hdmi_audio_if.c:31:0:<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>sound\/hdmi_audio\/intel_mid_hdmi_audio_if.c: In function \u2018had_chk_intrmiss\u2019:<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>sound\/hdmi_audio\/intel_mid_hdmi_audio.h:730:12: error: inlining failed in call to always_inline \u2018snd_intelhad_read_len\u2019: function body not available<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> inline int snd_intelhad_read_len(struct snd_intelhad *intelhaddata);<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> ^~~~~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>sound\/hdmi_audio\/intel_mid_hdmi_audio_if.c:203:13: note: called from here<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> intr_count = snd_intelhad_read_len(intelhaddata);<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>In file included from sound\/hdmi_audio\/intel_mid_hdmi_audio_if.c:31:0:<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>sound\/hdmi_audio\/intel_mid_hdmi_audio.h:738:12: error: inlining failed in call to always_inline \u2018had_write_register\u2019: function body not available<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> inline int had_write_register(uint32_t reg_addr, uint32_t data);<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong> ^~~~~~~~~~~~~~~~~~<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>.................................<\/strong><\/span><\/pre>\n<p>After more &#8216;research&#8217;, it seemed that this might possibly be due to the &#8216;later&#8217; <strong>gcc<\/strong> compiler provided with Fedora 24 (<strong>6.1.1<\/strong>)..? \u00a0\u00a0\u00a0 I found some older articles that referenced this particular error, and these suggested that the fix was simply to remove references to &#8221;inline&#8221; in the affected code..\u00a0\u00a0\u00a0 So, I modified <strong><span style=\"font-family: courier new,courier;\">~\/sound\/hdmi_audio\/intel_mid_hdmi_audio.h<\/span><\/strong> and removed references to &#8216;<strong><span style=\"font-family: courier new,courier;\">inline<\/span><\/strong>&#8216; from the code, and re-compiled the kernel, and it compiled OK, and when booted, sound (via HDMI) actually worked..<\/p>\n<pre><span style=\"font-family: courier new,courier;\"><strong>[rgadsdon@rgup ~]$ uname -a<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>Linux rgup 4.7.0-up #2 SMP Thu Aug 25 18:28:44 PDT 2016 x86_64 x86_64 x86_64 GNU\/Linux<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>............<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>[rgadsdon@rgup ~]$ ll \/dev\/snd<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>total 0<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>drwxr-xr-x 2 root root 60 Aug 25 18:54 by-path<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>crw-rw----+ 1 root audio 116, 2 Aug 25 18:54 controlC0<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>crw-rw----+ 1 root audio 116, 3 Aug 25 19:02 pcmC0D0p<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>crw-rw----+ 1 root audio 116, 1 Aug 25 18:54 seq<\/strong><\/span>\r\n<span style=\"font-family: courier new,courier;\"><strong>crw-rw----+ 1 root audio 116, 33 Aug 25 18:54 timer<\/strong><\/span><\/pre>\n<p>Not sure when this will all be incorporated in mainline kernel code, and the patches still include at least one <span style=\"font-family: courier new,courier;\"><strong>#Fixme<\/strong><\/span>..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0\u00a0 August 25, 2016.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The only missing OS component on the new UP Board (x5-Z8350) was that sound (HDMI) was not present..\u00a0\u00a0\u00a0 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:\u00a0 https:\/\/github.com\/plbossart\/sound\/tree\/byt-cht-hdmi-v4.7\u00a0 but found that the compile failed: <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1800\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1425,5,6,10,1238,11,1418,14,15,19,20,1322],"tags":[1429,1430,1428,1426,205,1173,242,1427,1175,1326,1431],"class_list":["post-1800","post","type-post","status-publish","format-standard","hentry","category-cherry-trail","category-compilation","category-crash-and-burn","category-fedora","category-fix","category-hacks","category-intel-atom","category-kernel","category-linux-2","category-opinion","category-performance-2","category-up-board","tag-4-7-0","tag-cherry-trail","tag-compiler-fix","tag-hdmi-sound","tag-intel","tag-kernel","tag-linux","tag-patched-kernel","tag-success","tag-up-board","tag-z8350"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1800"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1800\/revisions"}],"predecessor-version":[{"id":1801,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1800\/revisions\/1801"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}