Trying to get Audio via Bluetooth running

Hi there,
I am running Picroft on a new Raspi4 after following this Install guide that worked out of the box. Nevertheless I didnt get any of three tested bt devices (Anker Soundcube, Bose QC35, Skullcandy Hesh 2) running though they got paired and connected to the RP4. They even are shown and selected in the audio menu within the Raspbian Desktop, but sound still only is working via HDMI output. Attached a log, maybe one of you guys has any idea how to get this working.
Cheers and Thanks
Kelvin

019-10-11 18:46:07.294 | INFO | 558 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in 'src/hostapi/alsa/pa_linux_als$
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in 'src/hostapi/alsa/pa_linux_als$
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in 'src/hostapi/alsa/pa_linux_als$
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in 'src/hostapi/alsa/pa_linux_als$
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in 'src/hostapi/alsa/pa_linux_als$
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition ‘defaults.bluealsa.device’
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa

See if this provides any help?

Hi Kelvin,

The link baconator provided has a number of things to try. Did any of those work?

Did any of the devices work with the Mycroft audiotest?

Thanks, I went through it, logs attached. What I stumbled over:

  • After “this usually indicates that mycroft can’t find pulseaudio. Make sure it’s installed and mycroft is able to access it.”
    There is a dedicated “pi” user but no “mycroft” user though mycroft is running (told me the pairing code
)
  • Had some trouble installing " pulseaudio-module-bluetooth" before. For unknown reasons, installation worked now.
  • I also followed this guide. Even when headset connected, there is no bt device found
    " Let’s go back to PulseAudio, display current sound cards.
    pacmd list-cards
    You’ll find two, the built-in one of Raspberry Pi, and the headset one:
    bluez_card.xx_xx_xx_xx_xx_xx"

Thanks
Kelvin

Logs/Config

pi@raspberrypi:~ $  dpkg -l pulseaudio

GewĂŒnscht=Unbekannt/Installieren/R=Entfernen/P=VollstĂ€ndig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhÀngig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
++±==============-==============-============-=================================
ii pulseaudio 12.2-4+deb10u1 armhf PulseAudio sound server
pi@raspberrypi:~ $ dpkg -l bluez
GewĂŒnscht=Unbekannt/Installieren/R=Entfernen/P=VollstĂ€ndig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhÀngig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
++±==============-============-============-=================================
ii bluez 5.50-1+rpt1 armhf Bluetooth tools and daemons

pi@raspberrypi:~ $ ps aux | grep pulseaudio
pulse 389 2.1 0.4 181496 18328 ? S<sl 10:39 0:16 /usr/bin/pulseaudio --system --realtime --disallow-exit --no-cpu-limit
pi 895 0.0 0.5 201020 20196 ? S<sl 10:40 0:00 /usr/bin/pulseaudio --daemonize=no
pi 2760 0.0 0.0 7492 548 pts/1 S+ 10:52 0:00 grep --color=auto pulseaudio

pi@raspberrypi:~ $ pacmd list-cards
1 card(s) available.
index: 0
name: <alsa_card.platform-soc_audio>
driver: <module-alsa-card.c>
owner module: 29
properties:
alsa.card = “0”
alsa.card_name = “bcm2835 ALSA”
alsa.long_card_name = “bcm2835 ALSA”
alsa.driver_name = “snd_bcm2835”
device.bus_path = “platform-soc:audio”
sysfs.path = “/devices/platform/soc/soc:audio/sound/card0”
device.form_factor = “internal”
device.string = “0”
device.description = “Internes Audio”
module-udev-detect.discovered = “1”
device.icon_name = “audio-card”
profiles:
output:analog-mono: Analog Mono-Ausgabe (priority 700, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: output:analog-mono
sinks:
alsa_output.platform-soc_audio.analog-mono/#1: Internes Audio Analog Mono
sources:
alsa_output.platform-soc_audio.analog-mono.monitor/#1: Monitor of Internes Audio Analog Mono
ports:
analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec, available: unknown)
properties:

pi@raspberrypi:~ $ pactl info
Server-Zeichenkette: /run/user/1000/pulse/native
Bibliotheks-Protokollversion: 32
Server-Protokollversion: 32
ist lokal: ja
Client-Index: 10
Tile-GrĂ¶ĂŸe: 65496
Name des Benutzers: pi
Rechnername: raspberrypi
Name des Servers: pulseaudio
Version des Servers: 12.2
Standard-Abtastwert-Angabe: s16le 2ch 44100Hz
Standard-Kanal-Zuordnung: front-left,front-right
Standard-Ziel: alsa_output.platform-soc_audio.analog-mono
Standard-Quelle: alsa_output.platform-soc_audio.analog-mono.monitor
Cookie: 3170:2970

pi@raspberrypi:~ $ pactl list sinks short
0 null module-null-sink.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.platform-soc_audio.analog-mono module-alsa-card.c s16le 1ch 44100Hz SUSPENDED

pi@raspberrypi:~ $ pactl list sources short
0 null.monitor module-null-sink.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.platform-soc_audio.analog-mono.monitor module-alsa-card.c s16le 1ch 44100Hz SUSPENDED

pi@raspberrypi:~ $ pactl list modules short
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
8 module-null-sink
9 module-udev-detect
10 module-bluetooth-policy
11 module-bluetooth-discover
12 module-bluez5-discover
13 module-native-protocol-unix
14 module-native-protocol-tcp
15 module-zeroconf-publish
16 module-default-device-restore
17 module-rescue-streams
18 module-always-sink
19 module-intended-roles
20 module-suspend-on-idle
21 module-console-kit
22 module-systemd-login
23 module-position-event-sounds
24 module-role-cork
25 module-filter-heuristics
26 module-filter-apply
27 module-x11-publish display=:0
28 module-x11-cork-request display=:0
29 module-alsa-card device_id=“0” name=“platform-soc_audio” card_name=“alsa_card.platform-soc_audio” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties=“module-udev-detect.discovered=1”
30 module-cli-protocol-unix

pi@raspberrypi:~ $ ~/mycroft-core/start-mycroft.sh audiotest -l
Bereits aktuell.
Initializing

Starting audiotest
Initializing

Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 924
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 924
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 934
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 934
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 934
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition ‘defaults.bluealsa.device’
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition ‘defaults.bluealsa.device’
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib bluealsa-pcm.c:763:(_snd_pcm_bluealsa_open) Couldn’t get BlueALSA PCM: PCM not found
ALSA lib bluealsa-pcm.c:763:(_snd_pcm_bluealsa_open) Couldn’t get BlueALSA PCM: PCM not found
ALSA lib bluealsa-pcm.c:763:(_snd_pcm_bluealsa_open) Couldn’t get BlueALSA PCM: PCM not found
ALSA lib bluealsa-pcm.c:763:(_snd_pcm_bluealsa_open) Couldn’t get BlueALSA PCM: PCM not found
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
====================== Audio Devices ======================
Index Device Name
0: pulse
3: default

========================== Info ===========================
Input device: Default device @ Sample rate: 16000 Hz
Playback commandline: paplay WAV_FILE --stream-name=mycroft-voice

===========================================================
== STARTING TO RECORD, MAKE SOME NOISE! ==

===========================================================
== DONE RECORDING, PLAYING BACK
 ==

I decided to go the easy way and ordered a Respeaker-4-Mic-Array.
Nevertheless I would be eager to know how to get BT stuff running. The Bose QC35 is my ultimate “commander headset” =D
Cheers
Kelvin

1 Like