Baytrail HDMI Audio Kernel HOWTO

This post provides the instructions required to build the kernel for the Meegopad and other similar devices with HDMI audio enabled.

# Get the HDMI audio patch patch
wget https://raw.githubusercontent.com/01org/baytrailaudio/master/hdmi_audio_20150319.patch

# Get the Ubuntu mainline PPA packaging patches 
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.7-ckt10-utopic/0001-base-packaging.patch
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.7-ckt10-utopic/0002-debian-changelog.patch
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16.7-ckt10-utopic/0003-configs-based-on-Ubuntu-3.16.0-37.49.patch

# Get the kernel
git clone git://kernel.ubuntu.com/ubuntu/linux.git
cd linux
git checkout v3.16.7-ckt10

# Apply the patches
git am ../000*
patch -p1 < ../hdmi_audio_20150319.patch

# Theres a .config included in the HDMI audio patch so we can use that
# If you really want to you could copy the config from elsewhere
make oldconfig
make clean
make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-byt

Once this completes you’ll have the .deb files in the parent directory ready to install on your device using dpkg.

PK

MeegoPad T01 HDMI Audio SUCCESS

Ha! Finally got this little sucka going!

I finally found a github repo with a patch to enable the HDMI audio in the kernel (https://github.com/01org/baytrailaudio).

I got the patch, got the kernel code, applied the patch and did a build. It booted fine, but no audio device! I looked at the source and found the ACPI device it was trying to use (HAD0F28). The device was there in the device tree, but the status of the device was 0, i.e. not ready. So I got down with acpi dump and found this little snippet

Device (HAD)
{
  Name (_ADR, Zero) // _ADR: Address
  Name (_HID, "HAD0F28") // _HID: Hardware ID
  Name (_CID, "HAD0F28") // _CID: Compatible ID
  Name (_DDN, "Intel(R) HDMI Audio Driver - HAD")
  Name (_UID, One) // _UID: Unique ID
  Method (_STA, 0, NotSerialized) // _STA: Status
  {
    If (And (OSSL, 0x80))
    {
      Return (0x0F)
    }
    Return (Zero)
  }
...

You’ll notice that the device returns a 0 status unless the OSSL field (in an operation region) has the top bit set. I couldn’t for the life of me find anything that would set this bit from any ACPI methods so I just hacked the DSDT to always return 0x0F (i.e. fully enabled).

So now to get the kernel to use the custom DSDT and install the new kernel and try it out!

  1. Copy this file 01_apci to /etc/grub.d, and make it executable
  2. Copy the modified dsdt.aml file to /boot
  3. Install the following kernel files
    1. linux-headers-3.16.7-ckt3+_3.16.7-ckt3+-10.00.Custom_amd64.deb
    2. linux-image-3.16.7-ckt3+_3.16.7-ckt3+-10.00.Custom_amd64.deb
  4. run update-grub2
  5. reboot

Next I installed mythtv frontend and selected the HDMI device in the audio settings. The test playback kind of worked, but playing a video was absolutely fine.

If you give this a go, let me know how you get on. Try kodi and see if works too. I’m a die-hard mythtv user so I’ll stick with that thanks 🙂

UPDATE: For some reason this does not work with auto boot BIOS that people have installed. I’ll see if I can get that installed and find out what’s going on.

UPDATE2: For those with the auto-on BIOS, could you try with this DSDT file embedded-oem-dsdt.aml and let me know how it goes. You will have name the file dsdt.aml and copy it to the /boot directory.

PK