<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Kodi on Making Clean Tech</title><link>https://nunrg.eu/tags/kodi/</link><description>Recent content in Kodi on Making Clean Tech</description><generator>Hugo -- 0.136.5</generator><language>en-us</language><copyright>2024 Franci Kopač</copyright><lastBuildDate>Fri, 04 Dec 2026 13:12:08 +0100</lastBuildDate><atom:link href="https://nunrg.eu/tags/kodi/index.xml" rel="self" type="application/rss+xml"/><item><title>Using the Merus Amplifier Hat on Raspberry Pi</title><link>https://nunrg.eu/posts/merus_on_pi/</link><pubDate>Fri, 04 Dec 2026 13:12:08 +0100</pubDate><guid>https://nunrg.eu/posts/merus_on_pi/</guid><description>A short note on how to fix sound playback dropouts with Merus amplifier hats on Raspberry Pi.</description><content:encoded><![CDATA[<figure>
    <img src="/images/merus-pi-hat.jpg" alt="Picture of a Merus Pi hat for Raspberry Pi">
    <figcaption>The Hat</figcaption>
  </figure>
  
<h2 id="the-advantages">The Advantages</h2>
<p>I loved the idea of the Merus audio amplifier hats ever since I first heard of them. It&rsquo;s a high-performance HiFi Class D amplifier module using the <a href="https://www.infineon.com/part/MA12070">Infineon MA12070</a>. It delivers 2×80W of power along with a power supply for your Pi while being very power-efficient. All you need is an old-style 19-volt laptop power supply, a Pi, and some speakers. Moreover, it takes up very little space and is very easy to wire together.</p>
<p>I&rsquo;ve been using a Pi 4 to run my Kodi box since forever, but the Pi was always connected to a simple amp via the headphones output, so the sound was &hellip; less than optimal. Slight background hissing during stopped playback was the biggest issue, but it was an all-around second-rate setup, even with my decent-quality speakers.
This hat (<a href="https://www.aliexpress.com/item/1005001623757092.html">you can get it on AliExpress for less than 50€</a>) uses I2S, so hissing is history. There is plenty of power available too, so I can really enjoy the concerts on medici.tv now.</p>
<h2 id="the-setup">The Setup</h2>
<p>I set up my new Kodi box using a 2 GB Pi 5, the hat, a 25V 4A PSU, and my existing 120W speakers with a woofer. It took me literally 15 minutes to connect everything to the existing setup. I installed LibreELEC, set it up, and started watching.</p>
<h2 id="the-issue">The Issue</h2>
<p>After watching a few streams, the sound dropped out, and I had to reboot. Two more shows, and it drops out again. Sometimes it worked for hours; sometimes it would not survive 5 minutes. A little pop and silence—please reboot now.</p>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>After noodling around with my Lurus Code AI tool for a while, it seems the Linux driver for the chip simply gives up on any error and never resets the card afterward (latched protection fault). It also doesn&rsquo;t log the reason for the fault, and there were several candidates, from the PSU voltage dipping to speaker impedance issues to digital signal input losing sync, etc.
I built a script that managed to reset the audio card on dropout, but this still required Kodi to restart, a less than ideal solution, and it sometimes crashed the whole Pi.</p>
<h2 id="the-cause">The Cause</h2>
<p>I started looking into the candidate causes. The most obvious one to test was the digital input sync loss theory. Most of the time, the sound would drop out on playback start. It turns out that Kodi uses an optimized audio stream system that changes the I2S bitstream depending on sample rate and other properties of the audio stream. So each time the properties would change, the bitstream would too and sometimes this switch would cause the card to crash.</p>
<h2 id="the-solution">The Solution</h2>
<p>The fix was very simple: just go to the <strong>Settings &gt; System &gt; Audio</strong>:</p>
<ul>
<li>First set <strong>Keep audio device alive</strong> to <strong>Always</strong>.</li>
<li>Then turn on <strong>Send low volume noise</strong>.</li>
<li>Finally, set <strong>Output configuration</strong> to <strong>Fixed</strong>. (This might cause the card to crash and the sound to stop, but don&rsquo;t worry, just apply the changes and reboot.)</li>
</ul>
<p>These settings prevent the bitstream config from ever changing after startup and entirely solved the problem for me. LFMF, as they say :)</p>
<p>Happy watching!</p>
<p>If you found this article useful, you can buy me a beer <a href="https://paypal.me/FranciKopac?country.x=SI&amp;locale.x=en_US">here</a>.</p>
]]></content:encoded></item></channel></rss>