Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable app volume control with ALSA softvol on USB audio interface #45

Open
ulexxander opened this issue Mar 31, 2024 · 0 comments
Open

Comments

@ulexxander
Copy link

Sharing my solution, did not find anything appropriate for me in issues here.

I am using tidal-connect-docker image on plain Raspberry Pi OS without any desktop environment, on Pi 4B model
with MOTU M2 USB audio interface that outputs to speakers.

As playback device I was setting M2: USB Audio (hw:2,0).
Because of that volume control didn't work as that device did not had any controls in ALSA.

To make volume control in Tidal app work I configured ALSA to enable softvol - software volume control and set that as a playback device in tidal-connect-docker.

Instead of M2 below put your card name, find it with aplay -L

File asound.conf

pcm.softvol {
    type            softvol
    slave {
        pcm         "hw:CARD=M2,DEV=0"
    }
    control {
        name        "SoftMaster"
        card        "M2" 
    }
}

pcm.!default {
    type             plug
    slave {
        pcm         "softvol"
    }
}

ctl.!default {
    type hw
    card "M2" 
}

File docker-compose.yml

version: "3.8"

services:
  tidal-connect:
    image: edgecrush3r/tidal-connect:latest
    tty: true
    network_mode: host
    devices:
      - /dev/snd
    volumes:
      - /var/run/dbus:/var/run/dbus
      - ./asound.conf:/etc/asound.conf
    environment:
      - FRIENDLY_NAME=malinka
      - MODEL_NAME=malinka
      - PLAYBACK_DEVICE=default
      - MQA_CODEC=false
      - MQA_PASSTHROUGH=false
    restart: always
    stop_grace_period: 1s

Further reading:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant