By the way, I have not removed it. Should I? If yes, how do I do it?
Good news!
Yes, you should have done that already
Anyway, good to hear the progress. Meanwhile neither @fzinken nor I can get speaker-test to work. Iām sure it used to (and does for the HDMI output). I can use aplay to play a sound, though.
If you choose the BT output in Kodi settings, if the BT speaker is turned off (or goes out of range) sound reverts to the default output device. When it comes back in range or is turned on again, sound reverts to BT.
I canāt recall if weāve catered for your situation where the default device should be the USB card. If not itās on my list.
Thank you @fzinken! I followed your instructions and with that my headphone is working perfectly with Vero4k bluetooth.
So after some playing with the settings, I can confirm that once BT headphones are switched on, the BeoplayH9 option appears in settings ā auto, but it never auto-selects.
If I manually select BeoplayH9 in settings, I will have music via Bluetooth.
Once I switch off the headphones, Vero4K audio output goes to default option - HDMI. As far as I can see this option is not user selectable. Unfortunately, my audio is connected to the USB output. Therefore, I have to manually change that again.
I wonder if it is possible somehow to automate BT connection once headphones are switched on and to change default audio output in settings?
Thanks for confirming. Thatās all as expected except itās not clear whether your BT re-connects automatically if BT is already selected in audio settings. It does for me and other people whoāve tested this (with different speaker/headphones). It can take a few seconds to switch.
Weāve been discussing how automatic to make BT connections within the team. We might add an option for automatic connection but I think it would need to be optional as the behaviour for battery-operated audio sinks and mains-powered devices would need to be different.
Changing the fall-back sink when BT disconnects would need yet another option. Meanwhile, you might be able to achieve this with an alsa conf tweak. Iāll do some tests.
Iām probably a little bit confused here. When BT device is not in range, I have only 4 options in the audio output settings:
- Default (AML-M8AUDIO: HDMI, S/PDIR & analogue)
- AML-M8AUDIO, HDMI
- USB Audio 2.0, Analog
- USB Audio 2.0, S/PDIF
The last one is the one I selected. Thereās no BT option here. Once I switch the headphones on, another option pops up - BeoplayH9 (as per .asoundrc). Then I select it manually.
When I switch off the headphones, the BeoplayH9 option disappears, hence it cannot be selected by default.
Am I missing something?
This is what I mean:
- Connect BT HP
- Select BT in audio settings
- enjoy sound in HP
- turn off BT HP and sound reverts to HDMI (donāt open the settings page)
- turn on BT HP and sound goes back to them
So the act of opening settings and selection of a sink changes the output from BT.
In testing, Iāve found it works a lot better (reliably, snappier sink switches) if the package bluez is installed. Thatās part of the a2dp-bluez-app-osmc package so is removed if you remove a2dp-bluez-app-osmc. Reinstall it with sudo apt-get install bluez
. @pagody should do that as well. Iāve added it to the instructions posted by @fzinken.
Hi, Iāve been testing BT behaviour this week and, I must admit, no matter what I did, my headphones never auto connected to Vero4K. If, as advised by @grahamh above, āI connect BT HP -> Select BT in audio settingsā I will have sound in headphones. Then turning HP off, as expected, reverts sound to default audio settings - HDMI. However, turning BT HP on again does nothing in audio settings (waited a few minutes, still HDMI was selected).
Interestingly, if after these steps above I go to Settings, the āBeoplayH9ā option would not be there.
Turning headphones off/on does nothing, āBeoplayH9ā option does not appear.
After that, if I re-start Vero4K (takes surprisingly too long) and then turn on HP, the BeoplayH9 option is there and I can manually connect to Vero4K and, basically, I will be back to where I started.
Also, after several attempts and Vero4K restarts, I somehow ended up with a very strange list of audio devices in settings:
- ALSA: Default (AML-M8AUDIO: HDMI, S/PDIR & analogue)
- ALSA: AML-M8AUDIO, HDMI
- ALSA: USB Audio 2.0, Analog
- ALSA: USB Audio 2.0, S/PDIF
- ALSA: Default (AML-M8AUDIO: HDMI, S/PDIR & analogue)
- ALSA: AML-M8AUDIO, HDMI
- ALSA: USB Audio 2.0, Analog
- ALSA: USB Audio 2.0, S/PDIF
In this list of 2 * 4 identical devices two HDMI options were simultaneously highlighted. Definitely some kind of a bug. My understanding was that I should not see ALSA at all in settings. Have I broken anything?
Back to restarting Vero4K now
No you havenāt broken anything.
I got that weird double-entry audio list the other day when testing. Understand that it takes a while for BT devices to sort themselves out. I fixed it by re-booting with my BT speaker off, waiting for the GUI to appear, then connecting to BT (in my case, just turning the speaker on). I think the problem came when I turned the speaker on while vero was booting or else I turned it off then on again too quickly. Iāve not been able to reproduce it since.
If my speaker is on when vero boots, it will not connect automatically. The easiest way (for me) to connect is to turn the speaker off then on again.
At the moment, BT devices wonāt appear in Kodiās audio settings unless they are connected, and they donāt appear if you connect while you are looking at the audio settings screen. You have to back out of that screen and go in again.
Also, itās no good going into audio settings to see if the BT entry is there. If itās not there, Kodi will change the selected audio sink to somethings that is - ie HDMI.
So if you are waiting with the audio settings screen open, BT will never show up and will never be selected. If you follow the procedure in the bullet points in my last post it ought to work.
FWIW with my JBL Flip, if I turn it off it takes a couple of seconds for sound to switch to HDMI. If I turn it on again, it can take a long time to re-connect and then it takes at least 4 seconds for Kodi to realise itās back and switch to it. But it does all this while playing a video or music track. Any attempt to āsee whatās happeningā in audio settings is doomed as explained above.
If you are up for it, you could let us know what happens if you open a commandline and tail -f ~/.kodi/temp/kodi.log
while playing a track and turning the Beoplay off and then on. You should see Kodi re-enumerating all the audio sinks and switching to BT if that was the selected sink. (Ctrl-C to exit the tail command).
Weāre still wondering whether what you are describing is unique to Beoplay or whether the Momentums act the same.
@grahamh - Thank you for detailed response. I will test both Beoplay and Momentum 2 closer to weekend as requested. I will keep you updated.
Hi, apologies for disturbing the old topic. Could anyone please advise if the option to change default audio output has been implemented?
I have USB as my audio output to send signal to external DAC. I only change this setting when I listen to Bluetooth headphones (I still do it manually). Switching off headphones changes the audio output on Vero4K to the only default option, i.e. HDMI. Therefore, I have to go to settings again to change that to USB.
So, in my case, I wonder if it is possible for the audio output to default to USB?
Thanks,
Apologies. I mustāve lost that list . Iāll have a look at hacking alsa for you. Itās a matter of overriding the default device in the alsa conf files but quite how those interact is voodoo. Needs some trial and error.
Try this - make a file called .asoundrc in /home/osmc with these lines:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
This assumes your USB card is No 1. Check with cat /proc/asound/cards
Then re-start Kodi.
Thanks @grahamh for your prompt response!
Iāve checked cat /proc/asound/cards - it looks, USB card is No. 1 indeed:
0 [AMLMESONAUDIO ]: AML-MESONAUDIO - AML-MESONAUDIO
AML-MESONAUDIO
1 [U20 ]: USB-Audio - USB Audio 2.0
USB Audio 2.0 at usb-xhci-hcd.0.auto-1.1, high speed
I have then added new lines at the bottom of .asoundrc file, it now looks like this:
pcm.beoplayh9 {
type bluealsa
device ā00:09:A7:46:D8:52ā
profile āa2dpā
hint {show on description āBeoplayH9ā}
}
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
I have not noticed any changes to the audio output profile in Kodi, it still shows HDMI as default. USB Audio 2.0 was correctly selected. I have then switched on and connected BeoplayH9 (manually). As before, audio went to headphones. However, as before, switching headphones off changes audio output to HDMI.
Unless I am doing something wrong, it looks like adding these extra lines to .asoundrc did not help.
Is there anything else I should try!
Many thanks!
Did you restart Kodi (Power->Exit)?
Yes, I executed āRebootā in PuTTy a few times.
After my post I have also tried moving the new lines suggested by you to the top of .asoundrc file, but no luck either.
Very odd. Works for me with those lines at the top and a BT device node after it. The only downside is the previous default AML device disappears from Kodiās audio devices.
Is your system up to date? Can you post logs again?
BTW, I had less success using this incantation Setting the default device - AlsaProject YMMV.
Hi @grahamh,
Thanks a lot! I think Iāve fixed it now following recommendation in the link in your latest post (the one that you said you had less success with). What confused me at first is that they advise to make a change in the file /etc/asound.conf, which I donāt have. So I have made a change in my .asoundrc file instead. And it worked!
Now my updated .asoundrc is:
defaults.pcm.card 1
defaults.ctl.card 1
pcm.beoplayh9 {
type bluealsa
device ā00:09:A7:46:D8:52ā
profile āa2dpā
hint {show on description āBeoplayH9ā}
}
and with BT Headphones switched off the list of my audio output is:
Default (USB Audio 2.0 Analog)
AML-MESONAUDIO, HDMI
USB Audio 2.0, Analog
USB Audio 2.0, S/PDIF
When I switch BT Headphones ON, audio goes to headphones and the audio output list is updated as follows:
Default (USB Audio 2.0 Analog)
Bluetooth Audio
BeoplayH9
AML-MESONAUDIO, HDMI
USB Audio 2.0, Analog
USB Audio 2.0, S/PDIF
So far Iām happy. By the way, do you know what is the difference between the two USB audio profiles? Previously I had USB Audio 2.0, S/PDIF selected (although both worked). Now the other one is default. Is there any difference between them?
Thanks again for your help!
Glad to hear it. I suspect I didnāt make that recommended solution work because I didnāt re-start Kodi.
Thereās no practical difference between /etc/asound.conf (works for all users) and ~/.asoundrc (works for just user osmc).
The USB S/PDIF option would be useful if your soundcard had a digital output. In my experience, all DAC chips support S/PDIF out but most DAC devices donāt use it (ie donāt have a digital out port). Better to use the Analog option to make sure you get multi-channels and > 48kHz PCM support.
Merry Christmas and thanks @grahamh, really appreciate your help!
So just to clarify, out of all Vero4K outputs which one is the best for audio? In my case HDMI is busy sending video to TV. Whatās left is USB and Optical audio (Iām ruling out analogue audio output).