Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Cannot output to bluetooth speaker
#1
Hello,

I would like to output airplay (and the web radios) to an attached bluetooth speaker. Airplay connects but no audio is playing. When trying to play webradios I get the following error message: Failed to open "ALSA Bluetooth" (alsa); Failed to open ALSA device "_audioout": Invalid argument

My moodeutl -l output is the following:

Code:
20241003 182237 worker: --
20241003 182237 worker: -- Start moOde 9 series
20241003 182237 worker: --
20241003 182237 worker: Successfully daemonized
20241003 182237 worker: Wait for Linux startup
20241003 182237 worker: Linux startup complete
20241003 182237 worker: Boot config is ok
20241003 182238 worker: Session loaded
20241003 182238 worker: Package locks applied
20241003 182239 worker: File check complete
20241003 182239 worker: Log to RAM    on
20241003 182239 worker: Debug logging off
20241003 182239 worker: --
20241003 182239 worker: -- System
20241003 182239 worker: --
20241003 182239 worker: Host name:     bridge
20241003 182239 worker: RPi model:     Pi-5B 1.0 8GB
20241003 182239 worker: moOde release: 9.1.2 2024-09-28
20241003 182239 worker: RaspiOS:       12.7 Bookworm 64-bit
20241003 182239 worker: Linux Kernel:  6.6.47 64-bit
20241003 182239 worker: MPD version:   0.23.14
20241003 182239 worker: User id:       user
20241003 182239 worker: Home folder:   /home/user
20241003 182239 worker: Time zone:     America/New_York
20241003 182239 worker: Kbd layout:    us
20241003 182239 worker: HDMI ports(s): on
20241003 182239 worker: HDMI-CEC:      off
20241003 182239 worker: Sys LED0:      on
20241003 182239 worker: Sys LED1:      on
20241003 182239 worker: Reduce power:  off
20241003 182239 worker: CPU governor:  ondemand
20241003 182239 worker: Integ audio:   vc4-kms-v3d
20241003 182239 worker: --
20241003 182239 worker: -- Network
20241003 182239 worker: --
20241003 182239 worker: Eth0
20241003 182239 worker: Ethernet: adapter exists
20241003 182239 worker: Ethernet: timeout off
20241003 182239 worker: Ethernet: method  dhcp
20241003 182239 worker: Ethernet: address
20241003 182239 worker: Ethernet: netmask 255.255.255.0
20241003 182239 worker: Ethernet: gateway
20241003 182239 worker: Ethernet: pri DNS
20241003 182239 worker: Ethernet: domain  localdomain
20241003 182239 worker: Wlan0
20241003 182239 worker: Wireless: adapter exists
20241003 182239 worker: Wireless: country US
20241003 182239 worker: Wireless: SSID    
20241003 182239 worker: Wireless: other   None
20241003 182239 worker: Wireless: timeout up to 90 secs
20241003 182239 worker: Wireless: connect to
20241003 182239 worker: Wireless: method  dhcp
20241003 182239 worker: Wireless: address
20241003 182239 worker: Wireless: netmask 255.255.255.0
20241003 182239 worker: Wireless: gateway
20241003 182239 worker: Wireless: pri DNS
20241003 182239 worker: Wireless: domain  localdomain
20241003 182239 worker: --
20241003 182239 worker: -- File sharing
20241003 182239 worker: --
20241003 182239 worker: SMB file sharing:  off
20241003 182239 worker: NFS file sharing:  off
20241003 182239 worker: DLNA file sharing: off
20241003 182239 worker: --
20241003 182239 worker: -- Special configs
20241003 182239 worker: --
20241003 182239 worker: Plexamp:          not installed
20241003 182239 worker: RoonBridge:       not installed
20241003 182239 worker: Allo Piano 2.1:   not detected
20241003 182239 worker: Allo Boss 2:      not detected, OLED script ok
20241003 182239 worker: IQaudIO AMP*:     not detected
20241003 182239 worker: --
20241003 182239 worker: -- ALSA debug
20241003 182239 worker: --
20241003 182239 worker: Cards:  0:vc4hdmi0        1:vc4hdmi1        2:empty           3:empty
20241003 182239 worker:         4:empty           5:empty           6:empty           7:empty
20241003 182240 worker: Mixers: 0:none            1:none            2:none            3:none
20241003 182240 worker:         4:none            5:none            6:none            7:none
20241003 182240 worker: --
20241003 182240 worker: -- Audio configuration
20241003 182240 worker: --
20241003 182240 worker: Audio device:  0:Pi HDMI 1
20241003 182240 worker: ALSA card:     has not been reassigned
20241003 182240 worker: MPD config:    updated (iec958 device)
20241003 182240 worker: ALSA output:   HDMI
20241003 182240 worker: ALSA mode:     IEC958 (iec958)
20241003 182240 worker: ALSA mixer     PCM
20241003 182243 worker: ALSA volume:   controller not detected
20241003 182243 worker: ALSA maxvol:   100%
20241003 182243 worker: ALSA loopback: off
20241003 182243 worker: MPD mixer      Hardware
20241003 182243 worker: Audio formats: Alsacap was unable to detect formats
20241003 182243 worker: CamillaDSP:    off
20241003 182243 worker: CDSP volume:   0dB
20241003 182243 worker: CDSP volrange: 60dB
20241003 182243 worker: --
20241003 182243 worker: -- MPD startup
20241003 182243 worker: --
20241003 182243 worker: MPD service:        started
20241003 182243 worker: MPD port 6600:      accepting connections
20241003 182243 worker: MPD ALSA Default:   on
20241003 182243 worker: MPD ALSA Bluetooth: off
20241003 182243 worker: MPD HTTP Server:    off
20241003 182243 worker: MPD volume:         0
20241003 182243 worker: Saved MPD vol:      -1
20241003 182243 worker: Saved SRC vol:      0
20241003 182243 worker: MPD crossfade:      off
20241003 182243 worker: MPD ignore CUE:     no
20241003 182243 worker: MPD first boot:     SDCARD scanned
20241003 182244 worker: MPD first boot:     default playlist loaded
20241003 182244 worker: MPD CDSP volsync:   off
20241003 182244 worker: --
20241003 182244 worker: -- Music sources
20241003 182244 worker: --
20241003 182244 worker: USB drives:     none
20241003 182244 worker: NVMe drives:    none
20241003 182244 worker: NAS sources:    none
20241003 182244 worker: --
20241003 182244 worker: -- Feature availability
20241003 182244 worker: --
20241003 182244 worker: Input select:    available, Source: MPD, Output: Pi HDMI 1
20241003 182245 worker: Bluetooth:       started, PIN: None, ALSA/CDSP maxvol: 100%/0dB, ALSA outmode: Standard
20241003 182245 worker: AirPlay:         available
20241003 182245 worker: Spotify Connect: available
20241003 182245 worker: Squeezelite:     available
20241003 182245 worker: UPnP client:     available
20241003 182245 worker: Plexamp:         not installed, ALSA maxvol: 100%
20241003 182245 worker: RoonBridge:      not installed
20241003 182245 worker: Multiroom:       available
20241003 182245 worker: GPIO buttons:    available
20241003 182245 worker: Stream recorder: n/a
20241003 182245 worker: --
20241003 182245 worker: -- Security
20241003 182245 worker: --
20241003 182245 worker: Web SSH server:    off
20241003 182245 worker: XSS detection:     off
20241003 182245 worker: HTTPS mode:        available
20241003 182245 worker: --
20241003 182245 worker: -- Peripherals
20241003 182245 worker: --
20241003 182246 worker: Local display:   off
20241003 182246 worker: HDMI 4K 60Hz:    off
20241003 182246 worker: On-screen kbd:   off
20241003 182246 worker: Rotary encoder:  off
20241003 182246 worker: USB volume knob: off
20241003 182246 worker: LCD updater:     off
20241003 182246 worker: --
20241003 182246 worker: -- Miscellaneous
20241003 182246 worker: --
20241003 182246 worker: Software update:   Automatic check off
20241003 182246 worker: Auto-CoverView:    off
20241003 182246 worker: CoverView timeout: Never
20241003 182246 worker: Auto-shuffle:      off
20241003 182246 worker: Auto-play:         off
20241003 182246 worker: Maintenance task:  360 mins
20241003 182246 worker: Current view:      reset to Playback
20241003 182246 worker: Active flags:      all false
20241003 182246 worker: Reset flags:       skipped
20241003 182246 worker: Session check:     ok
20241003 182246 worker: --
20241003 182246 worker: -- Startup complete
20241003 182246 worker: --
20241003 182246 worker: Mount monitor:    started
20241003 182246 worker: Radio monitor:    off
20241003 182246 worker: Watchdog monitor: started
20241003 182246 worker: Responsiveness:   Default
20241003 182246 worker: Ready
20241003 183003 worker: Job airplaysvc
20241003 183140 worker: Job airplaysvc
20241003 183140 worker: Retry 1 stopping AirPlay
20241003 183644 worker: Job updater_auto_check
20241003 183644 worker: Software update:   Automatic check on
20241003 183644 worker: Software update:   Checking for available update...
20241003 183644 worker: Software update:   Software is up to date
20241003 185459 worker: Job airplaysvc
20241003 185500 worker: Retry 1 stopping AirPlay

Thanks in advance!
Reply
#2
Moode can only receive an AirPlay stream and output to a local audio device, it cannot send an AirPlay stream to a remote host.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(10-04-2024, 10:01 AM)Tim Curtis Wrote: Moode can only receive an AirPlay stream and output to a local audio device, it cannot send an AirPlay stream to a remote host.

I thought output could go to a Bluetooth speaker....

   
Reply
#4
It can but only from MPD.

ETA: Renderers for example AirPlay can also play to moode and be routed via the Bluetooth connection to a remote Speaker.

I just ran a quick test and it seems to work ok

         
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(10-04-2024, 04:11 PM)Tim Curtis Wrote: It can but only from MPD.

ETA: Renderers for example AirPlay can also play to moode and be routed via the Bluetooth connection to a remote Speaker.

I just ran a quick test and it seems to work ok

 

I see that it works for you, but unfortunately it does not for me. Any ideas on how I can diagnose and resolve this?

I was able to play a wav file using this:  aplay -D bluealsa /usr/share/sounds/alsa/Front_Center.wav but unfortunately it does not work for airplay or when trying to stream webradio.
Reply
#6
There is no manual configuration involved. When the output option in Bluetooth Control is set to "Bluetooth speaker" it configures the _audioout.conf ALSA device which is used by MPD and the renderers to route PCM data to the ALSA device named "bitstream" which is the Bluetooth connection.

Code:
pi@moode9:~ $ cat /etc/alsa/conf.d/_audioout.conf
#########################################
# This file is managed by moOde
#########################################
pcm._audioout {
type copy
slave.pcm "btstream"
}

pi@moode9:~ $ cat /etc/alsa/conf.d/btstream.conf
#########################################
# This file is managed by moOde
#########################################
pcm.btstream {
type plug
slave.pcm {
type bluealsa
device "A4:77:58:09:EE:C8"
profile "a2dp"
}
}
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: