RPi 3B+: Disable HDMI audio driver?

Hello Folks,
I use Patchbox OS on RPi in headless mode (no display, no external sound card).
By command “aplay -l” I see 3 output devices for “card0”: device 0 - 2.

I want to keep device 0 (internal analogue audio).
I want to disable device 1 and 2 (HDMI and HDMI1 audio).

Reason: My tracker software is unable to start, because it wrongly recognizes device 1 and 2 as busy.

How can I disable alsa device 1 and 2 at card0?

Thanks for answering!

Hi, a quick search on the internet says that adding dtparam=audio=off to /boot/config.txt will disable both, the HDMI audio and the analog audio output. Unfortunately it seems both are tightly related.

Anyway, as Patchbox OS is based on Raspbian Lite, any information you can find on Raspbian should equally apply to Patchbox OS as well, included raspi-config config utility.

Thank you very much for the quick reply, Giedrius. :smiley:

I already went into a deeper research about this topic before I came here. I studied the config.txt options as well as the raspi-config options. My final hope is to find an alsa option at /usr/share/alsa. I’m an IT guy, so don’t fear to give me advanced hints.

A little more info about my motivation. I want to use LittleGPTracker in combination with a little OLED display, which is connected by I2C. After a little source code tweak (not related to this topic) I was able to compile the tracker.

The error messages I have to fix when starting LittleGPTracker are:

RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,1), Device or resource busy.
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,2), Device or resource busy.

LittleGPTracker has a makefile designed for RPi hardware, but it seems like it can’t deal with a real-time Raspbian. Here is the link to the source code .

It turned out that the JACK library has to be added to the RPi makefile rules (libjack-jackd2-dev) to avoid the HDMI errors.

I’m still running into errors, because SDL is not active at my headless system. However, those errors are expected. I want to replace the SDL output by using an OLED library (ssd1306).

The goal is a stand-alone-system (Akai MPC style):

  • MIDI controller (Akai MPD218)
  • RPi with tracker software, completely controlled by MIDI commands
  • OLED display for minimum output

Current issue solved! :slightly_smiling_face:
I’ll keep you people up-to-date about my project later on another thread.

1 Like