Contents

HDA UserSpace

The goal of this initiative is to move whole codec configuration outside the kernel space. The core of this change is the virtual machine interpreting the special instruction set designed for the C language.

Overview

The currect code in the kernel side should be retained (at least until the whole userspace solution is rock stable). The only acceptable solution is to have one source code (C language) which will be shared with the build-in kernel HDA driver and the HDA driver using the user space firmware files (containing the HDA bytecode):

The whole implementation:

The codec can be controlled using a build-in kernel code (module) or using user space firmware files (containing the HDA bytecode with equal functionality). The kernel builder might choose to support only the native HDA kernel modules or only the bytecode firmware files or the support for both solutions.

Possible issues

HDA modem drivers - it seems that LSI develops some closed source solution for their modems which interact with the kernel HDA codec interfaces

IKIB (In-Kernel Interpreted Bytecode)

The "virtual machine" is the core of this solution. The virtual machine interprets IKIB (In-Kernel Interpreted Bytecode) and interacts with the kernel API and the HDA API. The data structures might be shared (except the pointers which must be translated). The data sharing and the bytecode interpretation must be safe in all ways to not damage the kernel. For example, the interpreter must contain some instruction count limits to prevent CPU lockups, verify data structures passed to the kernel functions to avoid bad behaviour etc. etc. etc...

The ELF loader for the bytecode modules (firmware files) has same functionality as the loader for native kernel modules. It takes care about the final code linking (relocations). It means that the firmware can be separated to logical modules. All firmware files must contain the bytecode version and required library version.

Note that IKIB is quite universal and might be used also for other Linux kernel parts (projects).