Closed TASSDevon closed 3 years ago
Many thanks for your report.
Can you show the update log that we especially see which packages were upgraded: cat /var/tmp/dietpi/logs/dietpi-update.log
Paired: yes Trusted: no
Probably something can be done to trust the Bluetooth device.
Also please show the ALSA config so that we see that all is still as it should be:
for i in /etc/asound.conf /etc/alsa/conf.d/*; do [[ -f $i ]] && echo "$i: $(<$i)"; done
root@skyspeaker:~# cat /var/tmp/dietpi/logs/dietpi-update.log
and
root@skyspeaker:~# for i in /etc/asound.conf /etc/alsa/conf.d/*; do [[ -f $i ]] && echo "$i: $(<$i)"; done
As for the speaker being labeled trusted, I have no idea if it was like this in the past or not. the whole setup was up and running for months (without downtime of either the pi or the speaker).
Anyway, hope this info helps!
Ah, the Squeezelite reinstall re-created /etc/asound.conf
which should be removed: rm /etc/asound.conf
I removed the config file and rebooted, still no BT audio though. Anywhere I need to specify which audio device to send output to?
Just searched through the old threads. Indeed not no but the following config should do it:
echo -e 'pcm.!default bluealsa\nctl.!default bluealsa' > /etc/asound.conf
Thanks, I tried and Squeezelite is exiting with
root@skyspeaker:~# cat /var/log/squeezelite.log
[19:12:42.540908] test_open:281 playback open error: No such file or directory
[19:12:42.541984] output_init_common:391 unable to open output device: default
Strange, /etc/alsa/conf.d/20-bluealsa.conf
defines that device name 🤔.
Does alsamixer -D bluealsa
work?
Or aplay -D bluealsa /path/to/some.wav
?
The mixer works, when trying to play a wav file the output is
root@skyspeaker:~# aplay -D bluealsa test.wav
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
aplay: main:828: audio open error: No such file or directory
It is all right there in /etc/alsa/conf.d/50-bluealsa.conf:
pcm.bluealsa {
@args [ SRV DEV PROFILE DELAY ]
@args.SRV {
type string
default {
@func refer
name defaults.bluealsa.service
}
}
@args.DEV {
type string
default {
@func refer
name defaults.bluealsa.device
}
}
Okay three things: I think pcm/ctl prefix is required as well to override the default device:
echo -e 'pcm.!default pcm.bluealsa\nctl.!default pcm.bluealsa' > /etc/asound.conf
When playing audio, it's actually not required, but just to assure:
aplay -D pcm.bluealsa test.wav
I see PulseAudio is installed. Not sure if it might interfere, so, if it's not a package dependency for something else, could you try to remove it?
apt purge pulseaudio
apt autopurge
You compiled BlueZ-ALSA manually that time: https://github.com/MichaIng/DietPi/issues/3611#issuecomment-647008737 Could you try to re-compile, or otherwise try to use/reinstall the package from the RPi repository:
apt install --reinstall bluealsa
Updated the asound.conf file, purged pulseaudio and reinstalled bluealsa, seemed to have no effect:
root@skyspeaker:~# aplay -D pcm.bluealsa test.wav
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 pcm.bluealsa
aplay: main:828: audio open error: No such file or directory
ls -l /run/bluealsa/
contains some files? Generally if the bluealsa.service
does not do it's job, this error seems to be the result: https://github.com/Arkq/bluez-alsa/issues/26
Did you try to recompile the newest version from sources? Probably it contains some required changes to work with Linux 5.10.
Otherwise it could be tested to downgrade the kernel:
apt install rpi-update
rpi-update b7c8ef64ea24435519f05c38a2238658908c038e
I pulled the latest code from the repo and rebuilt bluealsa, then also added another asoundrc file, this was key actually. I think somehow the rc file got removed and that was causing the issues. No harm done in having the latest greatest bluealsa in the process I guess :)
Thanks @MichaIng for your help, again 👍
Great, many thanks for the feedback. How long does compiling take? When we add bluealsa support to our scripts, maybe we should either compile it from sources or ship own updated packages.
It took a couple of minutes, but then again it was running on a pi1B
Okay, sounds acceptable 👍.
Creating a bug report/issue
Required Information
G_DIETPI_VERSION_CORE=7 G_DIETPI_VERSION_SUB=0 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng'
Linux skyspeaker 5.10.17+ #1403 Mon Feb 22 11:26:13 GMT 2021 armv6l GNU/Linux
Additional Information (if applicable)
Somewhat related to #3611 That setup was running fine, I just updated to the latest dietpi and now I don't get audio on the bt speaker anymore
`root@skyspeaker:~# systemctl status bluealsa ● bluealsa.service - Bluealsa daemon Loaded: loaded (/etc/systemd/system/bluealsa.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-03-09 20:10:21 GMT; 11min ago Docs: https://github.com/Arkq/bluez-alsa/ Main PID: 234 (bluealsa) Tasks: 6 (limit: 991) CGroup: /system.slice/bluealsa.service └─234 /usr/bin/bluealsa
Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/at.c:161: AT messa ge: SET: command:+CSRSF, value:0,0,0,1,0,0,0 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: W: Unsupported AT message: SET: command:+CSRSF, value:0,0,0,1,0,0,0 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/ba-rfcomm.c:108: S ending AT message: RESP: command:(null), value:ERROR Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/dbus.c:57: Called: org.bluez.MediaEndpoint1.SetConfiguration() on /org/bluez/hci0/A2DP/SBC/Source/1 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/bluez.c:585: Confi guration: Selected A2DP SBC bit-pool range: [2, 53] Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/bluez.c:735: A2DP Source (SBC) configured for device 10:B7:F6:28:24:7E Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/bluez.c:737: Confi guration: channels: 2, sampling: 48000 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/ba-transport.c:721 : State transition: 0 -> 0 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/bluez.c:931: Creat ing media endpoint object: /org/bluez/hci0/A2DP/SBC/Source/3 Mar 09 20:12:12 skyspeaker bluealsa[234]: /usr/bin/bluealsa: D: ../../src/bluez.c:849: Regis tering media endpoint: /org/bluez/hci0/A2DP/SBC/Source/3`
root@skyspeaker:~# bluetoothctl info 10:B7:F6:28:24:7E Device 10:B7:F6:28:24:7E (public) Name: Jabra Solemate Mini v8.0.0 Alias: Jabra Solemate Mini v8.0.0 Class: 0x00240404 Icon: audio-card Paired: yes Trusted: no Blocked: no Connected: yes LegacyPairing: no UUID: Headset (00001108-0000-1000-8000-00805f9b34fb) UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
Expected behaviour
Audio used to play through the bluetooth speaker
Actual behaviour
No audio can be heard through the bt speaker