request: merus-audio-amp-hat-zw support (infineon ma12070p) [RESOLVED] Topic is solved

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
MattG
Posts: 15
Joined: Sat Dec 08, 2018 5:00 pm

request: merus-audio-amp-hat-zw support (infineon ma12070p) [RESOLVED]

Post by MattG »

Edit: DietPi does in fact already have this support. I was working off what appears to be a failed/incomplete upgrade.

Would it be possible to include support for the MERUS audio amp HAT ZW amplifier HAT based on the Infineon ma12070p chip? Source is available via merus-audio-amp-hat-zw on GitHub. The documentation implies that it ships with Raspbian, so maybe most of the work has already been done?

If that is hard to add to DietPi, is there a quick and dirty way I can pull the overlay and alsa driver from Raspbian for use in DietPi?

Thanks!
Last edited by MattG on Fri Jan 15, 2021 10:27 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p)

Post by Joulinar »

Hi,

DietPi on Raspberry Pi is based on Raspberry OS. It's an extrem slim/diet version of Raspberry OS with reduced amount of packages. Nevertheless you could pull/install every package from Raspberry apt repository. ALSA could be enabled within dietpi-config > 2 : Audio Options
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
MattG
Posts: 15
Joined: Sat Dec 08, 2018 5:00 pm

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p)

Post by MattG »

I just booted up Raspberry OS install (2021-01-11-raspios-buster-armhf-lite), and the drivers and overlay are part of the kernel package:

Code: Select all

pi@raspberrypi:~ $ dpkg-query -S /lib/modules/`uname -r`/kernel/sound/soc/codecs/snd-soc-ma120x0p.ko  /boot/overlays/merus-amp.dtbo 
raspberrypi-kernel: /lib/modules/5.4.83-v7+/kernel/sound/soc/codecs/snd-soc-ma120x0p.ko
raspberrypi-kernel: /boot/overlays/merus-amp.dtbo
That was the point of my original post: it appears that Raspberry OS (formerly called Raspbian) already has support for this. So it appears that either it's very new and DietPi hasn't caught up yet, or DietPi is explicitly excluding it.

If I install Raspberry OS's raspberrypi-kernel package on a DietPi installation, will that work, or will it break things? Usually installing a kernel package isn't as straightforward as installing a random userspace package.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p)

Post by Joulinar »

That's how it looks on my RPi4B

Code: Select all

root@DietPi4:~# dpkg-query -S /lib/modules/`uname -r`/kernel/sound/soc/codecs/snd-soc-ma120x0p.ko  /boot/overlays/merus-amp.dtbo
raspberrypi-kernel: /lib/modules/5.4.83-v7l+/kernel/sound/soc/codecs/snd-soc-ma120x0p.ko
raspberrypi-kernel: /boot/overlays/merus-amp.dtbo
root@DietPi4:~#
Just to avoid a misunderstanding, DietPi is not an own OS. It is a set of scripts on top of a base image. In case of Raspberry Pi devices, base image is Raspberry OS. Means kernel as well as software packages are provided by Raspberry apt source list. DietPi did not and will not provide own kernel packages. They are provided by the base image.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
MattG
Posts: 15
Joined: Sat Dec 08, 2018 5:00 pm

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p)

Post by MattG »

Joulinar wrote: Fri Jan 15, 2021 10:07 pm That's how it looks on my RPi4B
Thank you for the hint... I actually have three RPIs running DietPi, two RPI3 and one RPI4. All three have the same version of DietPi, v6.34.3. For whatever reason, one of those is missing the snd-soc-ma120x0p.ko and merus-amp.dtbo files. The one that is missing just so happens to be the one I'm trying to use with an ma12070p device. I only recently powered this device up, actually - it had been sitting in a drawer for some long period of time. The first thing I did was dietpi-upgrade, but I did not make note of what old version it had before I did the upgrade. I also recall the upgrade hung at some point, and I rebooted and restarted the upgrade. In hindsight, I should have just started with a fresh install, probably would have avoided all this confusion.

Anyway, thank you for your help, and apologies for the confusion!
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p) [RESOLVED]

Post by Joulinar »

DietPi version has no relation to OS kernel version. Kernel can be updated running apt update && apt upgrade
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
MattG
Posts: 15
Joined: Sat Dec 08, 2018 5:00 pm

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p) [RESOLVED]

Post by MattG »

Is the kernel upgraded when you do "dietpi-upgrade"?
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: request: merus-audio-amp-hat-zw support (infineon ma12070p) [RESOLVED]

Post by Joulinar »

command dietpi-upgrade did not exist, it's dietpi-update ;)

It takes effect only, if a new version of DietPi scripts are available. If there is a new version, dietpi-update will be executed in 2 steps
  1. run apt update && apt upgrade
  2. update/download DietPi scripts
Means, if an update is available it will update all apt packages (including the kernel).
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply