New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPD server with bluez-alsa headless #74
Comments
Hi, I'm not sure, if it will be possible what you are trying to achieve. ALSA is not PulseAudio. It is a simple interface to the underlying hardware. A lot of fancy things which are possible with PulseAudio is not possible with ALSA, or at least requires some tinkering (e.g. writing an ALSA plug-in). And this case (playing audio when a sound card is re-plugged) is one of those. You might try something as follows (if you have or can borrow some USB sound card):
If MPD plays sound via the external sound card immediately, then it might be possible to achieve the same thing with bluez-alsa. However, if the sound is not played immediately, then you're out of luck (due to ALSA design and the MPD ALSA output implementation). == SOME EXTRA ISSUE, BEYOND YOUR CASE == However, the case you've provided is kinda strange :| When you've powered on the BT speaker, in logs I can see Which version of MPD, bluez and alsa-lib you are using? Also, is this case reproducible (e.g. every time you power cycle BT speaker, this case happens)? Could you provide logs from MPD (if it's possible)? I've tried to reproduce it with my setup, and the behaviour was correct. When the headset (I do not have BT speaker) was powered off, player (mpv/mplayer and cmus) has stopped playback. So, when the headset was reconnected, I had to start playback manually. What really concerns me is the line |
Thanks for your answer! I know ALSA is not PulseAudio, and I wanted to try to see if this case could work. I forgot to mention that I also have MPD streaming to http, this is what makes MPD not stop its playback when I disconnect the BT speaker. I disabled the http stream and I had the same behavior you mentioned (MPD stops playback when BT speaker is disconnected, need to start playback manually again). These are the versions I'm currently using: These are the power cycle logs without http:
Power on:
Play (in MPD, because it got paused)
|
Many thanks for these logs. Could you also post version of used bluez (not bluez-alsa)? I'm trying to "fix" errors visible in the logs you've provided (these errors might cause unexpected behaviour in a long run). However, it will not resolve your issue, sorry. I'm afraid that your case is beyond bluez-alsa capabilities. EDIT: |
You’re welcome. |
Closing stale issue. Related issue #174. |
Hi!
I currently have an Arch-powered RPi B as my MPD server, and I was using pulseaudio to get audio to Bluetooth speakers. I didn't like that setup very much, but managed to make it work somehow.
Today I saw this implementation and decided to give it a try.. and it worked! It also managed to drop the high cpu usage I had with the pulseaudio setup.
But there is one problem. If I power off the speaker, and then I power it on while MPD is playing music, then there will be no music output until MPD changes to the next song.
These are the logs when I power off the speaker:
When I power it on, the following appears:
And when the next song plays, the following is logged:
Thanks you for any help.
The text was updated successfully, but these errors were encountered: