AN 1911 PL88 1912 131733 Linux drivers and kernel building with MERUS audio amp HAT ZW Drivers and kernel building KIT 40W AMP HAT ZW About this document Scope and purpose TM This application note describes one of the methods of software driver installation in Raspbian for the MERUS audio amp HAT Zero W, which includes the MA12070P proprietary multi-level amplifier. The installation process is carried out as a kernel building in an Ubuntu host machine. This allows the user not only to make use of all of the driver features for the MA12070P device, but also to maintain compatibility with the last Raspbian kernel version and all its loadable kernel modules. This method may also be applied to any kernel customization required by the user prior to compiling and building, and used to add any additional features required on the MA12070P Linux codec driver too. Additionally, a brief review of the driver features is made, and AirPlay set-up for Raspberry Pi is also explained as a tool for quick wireless audio streaming testing. Intended audience Audio DIY community, audio amplifier design engineers. Table of contents About this document ....................................................................................................................... 1 Table of contents ............................................................................................................................ 1 1 Introduction .......................................................................................................................... 2 TM 2 Kernel building process with MERUS audio Linux drivers ......................................................... 3 2.1 Tools and requirements ..................................................................................................................... 3 2.2 Compile, build and install process .................................................................................................... 3 TM 2.2.1 Download the Infineon MERUS audio driver source files .............................................................. 3 2.2.2 Set-up of the build environment ....................................................................................................... 4 2.2.3 Get the Raspbian kernel source ......................................................................................................... 4 2.2.4 Verification of the SD card format ..................................................................................................... 4 2.2.5 Makefile .............................................................................................................................................. 5 2.3 Configuring the device tree overlay .................................................................................................. 5 2.4 Configuring the wireless network and SSH ....................................................................................... 5 TM 3 Exploring Raspberry Pi and MERUS audio amp HAT ZW ............................................................ 7 3.1 First log in to the Raspberry Pi with SSH ........................................................................................... 7 TM 3.2 MERUS audio amp alsamixer .......................................................................................................... 8 TM 4 Music streaming with AirPlay and MERUS audio amp HAT ....................................................... 10 4.1 Installation process for shairport-sync client ................................................................................. 10 Revision history............................................................................................................................. 11 Please read the Important Notice and Warnings at the end of this document www.infineon.com/kit-40w-amp-hat-zw page 1 of 12 2019-12-02 TM MERUS audio amp HAT ZW Drivers and kernel building Introduction 1 Introduction There are several methods to install drivers or loadable kernel modules in a Linux-based OS. This depends on many factors, such as the target machine, local or cross-compilation building method, and the kernel source, among others. Specifically in the case of Raspbian, which is the OS supported on Raspberry Pi boards, the sound cards drivers are already built in to the current kernel version of Raspbian. Therefore, there is no need to build and compile the kernel for the built-in modules as described later. These built-in modules are available and ready to use after the standard Raspbian installation process. This last process consists of burning a pre- compiled image file on to a Raspberry Pi SD card. However, at the time of writing this application note the TM MERUS Audio Linux drivers are not included yet in the last Raspbian kernel source and currently the available method to install them consists of manually compiling and building their source files with the Raspbian kernel. After this process has been completed the output files need to be installed on an SD card. The complete process of compiling, building and installing the drivers is handled by a makefile script, so there is minimal command typing by the user. Another advantage of this method is that it allows the user to add any TM additional features to the MERUS audio Linux drivers for the required application. This is especially aimed at users and makers interested in configuring and testing other power management modes and audio performance parameters in the MA12070P proprietary multi-level amplifier. This method is also useful when a TM custom kernel with MERUS audio Linux drivers is needed. TM Figure 1 MERUS audio amp HAT Zero W board 2 of 12 V 1.0 2019-12-02