Adding Proper Audio Support for the HP Stream 8 tablet in the Linux Kernel – My first contribution to the Linux Kernel

Adding Proper Audio Support for the HP Stream 8 tablet in the Linux Kernel – My first contribution to the Linux Kernel

Hi everyone,

For several years already, I have owned an HP Stream 7 and HP Stream 8 tablets. These were low budget, Windows 8 tablets powered by an Intel Atom Z3735G Bay Trail processor and having only 1GB of RAM. These tablets are also limited to running the 32bit version of Windows not only because of the extremely low RAM amount by today’s standards, but also because the BIOS only runs 32-bit EFI images.

This tablet can be upgraded to the 32bit version of Windows 10, but good luck trying to run software in them. The most limiting factor is the RAM amount, and it will cause intense swapfile read/write operations which will eventually wear out the internal 32GB eMMC drive.

I did a bit of research and it turns out that there’s a specialized image to install Ubuntu in these low powered devices. The bootloader is still 32-bit, but the OS runs as 64bit. I then decided to install it into the tablets and see how they perform.

The reality is that these images have given these tablets new life, especially after using the Lubuntu image (The regular Ubuntu image got stuck loading. I guess it’s just too resource intense for the tablets). I did the usual updates and upgrades, including upgrading the OS to Ubuntu 23.04, followed with installing the ubuntucinnamon-desktop package. This worked really well, until I decided to plug my headphones into the HP Stream 8 tablet.

Surprise! Inserting a headphone into the headphone jack actually disabled that output. I wondered what was happening, and the interesting part was that the issue didn’t happened in the HP Stream 7 tablet.

So I did some research and it turned out that the source file responsible for setting up the correct audio parameters didn’t had an HP Stream 8 configuration but it included the HP Stream 7:

Therefore, I started to tweak the file to add the parameters needed for the HP Stream 8. Essentially, the hardware between the HP Stream 7 and HP Stream 8 tablets are almost the same. The main differences between the 2 are:

  • The HP Stream 8 is obviously 8 inches whereas the HP Stream 7 is 7 inches.
  • The HP Stream 8 has a higher capacity battery
  • The HP Stream 8 has an HSDPA modem (Now almost obsolete due to LTE and 5G rollouts)
  • The HP Stream 8 has stereo speakers while the HP Stream 7 only has one.

I’m making emphasis in that last point because the only parameter I needed to remove was BYT_RT5640_MONO_SPEAKER. The rest was left the same as the HP Stream 7.

After manually compiling the kernel and testing, it worked as expected. I then went ahead and submitted a patch to the Linux Kernel team. It took some days for it to be applied to the respective branch after some communication between me and the developers and maintainers. The patch then made it to the mainstream Kernel and is available as of the Linux Kernel v6.1-rc1 release:

The file I modified is sound/soc/intel/boards/bytcr_rt5640.c, and now looks like this:

Now, you can use the 3.5mm audio jack in the HP Stream 8 tablet. That said, the audio jack of the HP Stream 7 and 8 has a lot of noise. It also seems to stop responding after a while, although this problem is not related to my code. The best way is to use a Bluetooth dongle or headphone to enjoy audio in these tablets.

If you still want to use the speakers and headphone jacks, you now have proper support on the HP Stream 8:

HP Stream 7 and 8 tablets running Ubuntu with Cinnamon Desktop Environment - Audio Settings

This has been my first contribution to the Linux Kernel.