# ALSA output fails despite seemingly valid config

**URL:** <https://discourse.libretime.org/t/alsa-output-fails-despite-seemingly-valid-config/1949>\
**Category:** Get Help\
**Created:** [October 6, 2025, 10:09pm UTC](https://discourse.libretime.org/t/alsa-output-fails-despite-seemingly-valid-config/1949 "2025-10-06T22:09:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjhelms](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/rjhelms/32/846_2.png) [@rjhelms](https://discourse.libretime.org/u/rjhelms)\
**Post date:** [October 6, 2025, 10:09pm UTC](https://discourse.libretime.org/t/alsa-output-fails-despite-seemingly-valid-config/1949/1 "2025-10-06T22:09:32Z")

</div>

**Describe the problem**  
I am attempting to enable hardware output on an existing Libretime install that has been functioning with stream-only output for a few years. Using ALSA, I am unable to successfully do so - after configuring output in config.yml, libretime-liquidsoap service restarts continuously with error connecting to ALSA.

**To reproduce**  
Steps to reproduce the behavior.

1. Enter relevant configuration keys in config.yml for ALSA, in my case:

```auto
    system:
      - # Whether the output is enabled.
        # > default is false
        enabled: true
        # System output kind.
        # > must be one of (alsa, ao, oss, portaudio, pulseaudio)
        # > default is alsa
        kind: alsa
        device: default:CARD=U192k

```

1. Restart libretime services

**Expected behavior**  
After restart, Liquidsoap plays through specified device

**Relevant log output or error messages**  
Error logged in /var/log/libretime/liquidsoap.log:

```auto
2025/10/06 21:07:13 [alsa:1:3] Using ALSA 1.2.2.
2025/10/06 21:07:13 [threads:3] Thread "alsa:1" aborts with exception Alsa error: Device or resource busy!
2025/10/06 21:07:13 [main:3] Shutdown started!

```

**LibreTime version**  
LibreTime version: `4.3.0`

**Installation method and OS / Environment**  
The method used to install and the operating system / environment your installation is running on.

Operating system: Ubuntu 20.04.6 LTS  
Method: install script

**Additional information** :

I have confirmed that ALSA configuration is valid and `libretime` user has appropriate groups etc to access it. For example, playing `aplay -D default:CARD=U192k test.wav` as libretime results in expected output.

`radio.liq` as generated by Libretime does seem to have the correct ALSA configuration, it contains the following lines:

```auto
# alsa:1
%ifndef output.alsa
log("output.alsa is not defined!")
%endif
%ifdef output.alsa
output.alsa(
  id="alsa:1",
  device="default:CARD=U192k",
  s
)
%endif

```

If I make a manually run a minimal liquidsoap script using the same device config (again, as the libretime user), it plays the single MP3 as expected:

```auto
source = single("test.mp3")
s = mksafe(source)
output.alsa(
  id="alsa:1",
  device="default:CARD=U192k",
  s
)

```

I am at a bit of a loss here - it seems like somehow the config is not being used by Libretime as expected, but everything I can see seems valid. This seems similar to [ALSA broken · Issue #3125 · libretime/libretime · GitHub](https://github.com/libretime/libretime/issues/3125)

I’ve seen elsewhere that PulseAudio is preferred to ALSA. I would be open to using PulseAudio however I am running Libretime on a dedicated server. PulseAudio is installed but not running, and I have not been able to find any clear documentation on configuring PulseAudio (alone or in conjunction with Libretime) headless, while (given my investigation) ALSA seems to be functioning correctly outside of Libretime.

---

<div class="post-metadata">

**Author:** ![rjhelms](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/rjhelms/32/846_2.png) [@rjhelms](https://discourse.libretime.org/u/rjhelms)\
**Post date:** [October 7, 2025, 5:55pm UTC](https://discourse.libretime.org/t/alsa-output-fails-despite-seemingly-valid-config/1949/2 "2025-10-07T17:55:41Z")

</div>

As an update - I did get output working with PulseAudio after much poking around to get it running in system-wide mode and set up as a systemd service.

If my schedule permits, I would be happy to write some documentation about that as it may be useful for other users in the future.

Would it be helpful if I added the details of this to issue #3125?
