viktorgino / headunit-desktop

HeadUnit Desktop is a car PC software built with Qt 5 and QML
https://github.com/viktorgino/headunit-desktop/wiki
GNU General Public License v3.0
285 stars 64 forks source link

No audio - Issues with Vol cntrl module #34

Closed anandmg101 closed 2 years ago

anandmg101 commented 5 years ago

Hi Viktorgino, I have compiled the app and the app is running awesome except the audio part. When I start the app I get an error "Module 'org.viktorgino.headunit.volume' does not contain a module identifier directive - it cannot be protected from external registrations." When I goto Settings -> Audio -> Advanced -> Profile and change the profile, I get an error "org.kde.plasma.pulseaudio: No object for name "alsa_output.platform-soc_audio.analog-stereo" org.kde.plasma.pulseaudio: No object for name "alsa_output.platform-soc_audio.analog-stereo.monitor" Even though Pulse audio works fine. I have other apps and those output audio via audio jack & HDMI through ALSA & Pulse audio

Can you let me know what might be the issue?

anandmg101 commented 5 years ago

Ok finally I found a temporary, not so elegant solution, but at least I have audio output through the audio jack. If some else is also having same issue they can try this. The fix: Make sure you have installed all of plugins required. One thing that I had missed even though I had installed a ton of them, was gstreamer1.0-pulseaudio.

After all of that, comment out the bluetooth modules in /etc/pulse/default.pa `### Automatically load driver modules for Bluetooth hardware

.ifexists module-bluetooth-policy.so

load-module module-bluetooth-policy

.endif

.ifexists module-bluetooth-discover.so

load-module module-bluetooth-discover

.endif`

This solution was provided here


A bit of history, so I tried out lot of options. Reinstalled the OS multiple times to start from scratch. Installed all plugins, reinstalled the app multiple times, tried installing Qt 5.10 and follow travis.yml. Nothing worked. So I went back and downloaded many versions starting from Oct, 2017 and all the way to the new one. I had all downloaded, ran qmake & make in all of them. Then one by one I ran to see which one was the issue. I finally out that the 2nd commit done on Jan 12, 2018 was someway related. Till the 1st commit of Jan 12 I had audio coming out, but not this one. That commit introduced Bluetooth I believe and this was causing some issue. I knew pulse audio was an issue as noted in the above comment. So then finally looking at various logs I found an error "the name org.bluez was not provided by any .service files" (among several others ofcourse!) and that lead me to the above link. It seems Pulse audio is trying to play audio through the bluetooth, even for normal things. Ideally phone calls should be routed through the bluetooth and normal audio through the jack, but for some reason, normal audio also is going through bluetooth. I think that is the issue, could be something else too. I need to analyze the "telephone.h" code a bit to find where/how/why that is happening and see if I can separate normal audio vs phone call.

I believe for call to be routed it needs some more set-up as noted here . Not sure if that will solve the issue though, as the issue I'm having is pulse audio forcing audio back into the phone's bluetooth. Anyway I will try that and update on this.


And one more thing. Tons & tons of thanks to Viktorgino for creating this amazing app. Especially with the plugin interface, its so much easy to create your own plugin and add it. Thanks a bunch Viktorgino!!!

viktorgino commented 5 years ago

Hi @anandmg101

Sorry for the delayed response, unfortunately I wasn't able to as much time on this project as I'd like to. I have some things in the pipeline that I've been working on for the last few months, but its all half done, but slowly I'll start pushing it out.

First of all thank you for your kind word it, really means a lot :)

As for pulse: I've been struggling with this for a while now. There are a lot of confusing issues around the Bluetooth part, especially on the Pi. I seem to be able to run it fairly well on standard Ubuntu, but I can newer get it right on the Pi. I will go through the links above and have a good play with it, hopefully I can come to a proper solution, because its a big one for getting everything working smoothly. Will keep you updated.

I tried to make the plugin system as simple but dynamic as possible. I'm working on pluggable theme system right now with an alternative GUI included, this should make it easy to create complete GUIs from the ground up too. Documentation should follow closely too.