Skip to content

Sendspin on Pi doesnt allow fixed usb hardware name, relies on USB number #112

@paulcad44

Description

@paulcad44

I have a soundblade installed via usb to Pi P400, its currently usb device 3.

I have the following configuration in /etc/asound.conf as the soundblade only accepts 48khz:

pcm.upsampler {
    type plug
    slave.pcm "softvol"
    # The 'plug' plugin is the only one that understands the 'rate' field
    slave.rate 48000
}

pcm.softvol {
    type softvol
    slave {
        pcm "hw:3,0"
    }
    control {
        name "Master"
        card 3
    }
}

pcm.!default {
    type copy
    slave.pcm "upsampler"
}

In sudo systemctl edit sendspin.service

[Service]
User=sendspin
Group=audio

ExecStart=
ExecStart=/home/sendspin/.local/bin/sendspin daemon --audio-device=upsampler
Restart=on-failure
RestartSec=5

# No ExecStartPost - no timeout issues
ExecStopPost=/usr/bin/pkill -u sendspin sendspin

While this works, its not robust enough to survive a new USB device inserted, using the name of the device in aplay -l , causes an error and the service doesnt load.

Aplay -l ouput:

card 3: SOUNDBLADE [BLUEANT SOUNDBLADE], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions