nicokaiser/rpi-audio-receiver

Bluetooth to stereo synced speakers via snapcast would be cool.

StuartIanNaylor opened this issue · 1 comments

I say would be as I have snapcast setup with the default pipe that is working with this asound.conf

pcm.!default {
    type asym
    playback.pcm "plugslave"
    capture.pcm "plughw:1"
}

ctl.!default {
    type hw
    card 1
}

pcm.plugslave {
    type plug
    slave.pcm rate48000Hz
}

pcm.rate48000Hz {
    type rate
    slave {
        pcm writeFile # Direct to the plugin which will write to a file
        format S16_LE
        rate 48000
    }
}

pcm.writeFile {
    type file
    slave.pcm null
    file "/tmp/snapfifobt"
    format "raw"
}

/etc/snapserver.conf is using it as a source
source = pipe:///tmp/snapfifobt?name=BlueTooth

Because its a fifo file it lacks a mixer, but dmix can only use hardware slaves...

Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: bluez.c:1247: Signal: org.freedesktop.DBus.Properties.PropertiesChanged(): org.bluez.MediaTransport1: State
Feb 11 05:09:26 kitchenL bluetoothd[417]: /org/bluez/hci0/dev_24_29_34_90_90_BC/fd1: fd(27) ready
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: ba-transport.c:576: New A2DP transport: 14
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: ba-transport.c:577: A2DP socket MTU: 14: R:672 W:1024
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: bluez.c:1247: Signal: org.freedesktop.DBus.Properties.PropertiesChanged(): org.bluez.MediaTransport1: State
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: ba-transport.c:1174: Starting transport: A2DP Sink (SBC)
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: ba-transport.c:297: Created BT socket duplicate: [14]: 17
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: ba-transport.c:1494: Created new IO thread [ba-a2dp-sbc]: A2DP Sink (SBC)
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: a2dp-sbc.c:357: IO loop: START: a2dp_sbc_dec_thread: A2DP Sink (SBC)
Feb 11 05:09:26 kitchenL bluealsa[587]: /usr/bin/bluealsa: D: codec-sbc.c:234: SBC setup: 44100 Hz JointStereo allocation=SNR blocks=16 sub-bands=8 bit-pool=53 => 327993 bps
Feb 11 05:09:26 kitchenL bluealsa-aplay[586]: /usr/bin/bluealsa-aplay: W: aplay.c:557: Couldn't open mixer: Mixer element not found

Any ideas as x2 L/R stereo snapcast speakers would be cool if it worked :)

I am sorry, this is beyond the scope of this little project, I do not have any experience with Snapcast...