Skip to content

[feature] Support ALSA Virtual PCM Devices as Player Outputs #262

Description

@upfish-sinclare

Feature Description

Hi Chris,

Firstly, thanks for creating Multi-SendSpin-Player-Container. I was hoping to use it as a replacement for multiple Squeezelite instances on a Raspberry Pi.

Hardware

  • Raspberry Pi 5
  • Amped 2x Audio HAT (uses the HiFiBerry DAC8x ALSA driver)
  • Raspberry Pi OS Lite (Debian Trixie)

The sound card is presented by ALSA as:

snd_rpi_hifiberry_dac8x

Goal

The Amped 2x provides four output channels. Using /etc/asound.conf, I split these into two independent stereo PCM devices:

  • bedroom → rear channels (3/4)
  • bathroom → front channels (1/2)

using standard ALSA dmix, route and plug plugins.

Running:

aplay -L

returns:

bedroom
    Bedroom Speakers

bathroom
    Bathroom Speakers

Both devices function correctly.

For example:

speaker-test -D bedroom -c 2
speaker-test -D bathroom -c 2

play through the correct speaker pairs.

Likewise, Squeezelite can open bedroom and bathroom independently, allowing two separate players to run simultaneously from the same physical sound card.

Docker Configuration

The container was started with:

devices:
  - /dev/snd:/dev/snd

volumes:
  - /etc/asound.conf:/etc/asound.conf:ro

The container correctly receives both /dev/snd and the custom asound.conf.

Expected Behaviour

Based on the documentation mentioning support for software-defined ALSA devices, I expected the device selector to include the virtual PCM devices:

  • bedroom
  • bathroom

allowing each SendSpin player to use one stereo pair.

Actual Behaviour

Only the physical hardware device appears:

snd_rpi_hifiberry_dac8x

The ALSA virtual PCM devices are not listed, despite being available through ALSA and visible via aplay -L.

Why this would be useful

Supporting ALSA virtual PCM devices would make it possible to run multiple independent SendSpin players from a single multi-channel sound card.

Let me know if you need any more information. Thankyou!

Use Case

This would benefit users of:

  • Amped 2x Audio HATs
  • HiFiBerry DAC8x-compatible devices
  • Multi-channel USB DACs
  • Any ALSA configuration using dmix, route, plug or softvol

without requiring PulseAudio remap sinks or additional audio middleware.

Installation Method

Docker Standalone

Alternatives Considered (optional)

I explored several alternatives before raising this request, including PulseAudio remap sinks, multiple native SendSpin receiver instances, and running separate Raspberry Pis.

While these approaches can work in some environments, they either didn't support my hardware configuration or required additional hardware.

Since ALSA virtual PCM devices already work correctly with applications such as Squeezelite, supporting them directly would provide a simple and hardware-efficient solution for users of multi-channel sound cards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions