I have followed the instructions to build and install the desktop head unit on a Debian 10.6.0 64bit VM in VMWare.
I connected my Pixel4 phone with Android11 to the desktop head unit, and tied to play some music from the YoutubeMusic.
There was sound output but just the configuration was not correct, either the channels or the sample rate was wrong.
I can see from the log there were some PCM open errors but the sound did played out.
And I tried to look at the source code and the audio config for music audio is 16bit-48kHz-2ch which was right.
So, what else could be going wrong?
./headunit-app
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Plugin Manager: Plugin loaded : "libandroid-auto-plugin.so"
Car settings file doesn't exists! "/home/huangwei/hud/modules/hvac/cars/sample/config.ini"
Plugin Manager: Plugin loaded : "libhvac-plugin.so"
Plugin Manager: Plugin loaded : "libmedia-player-plugin.so"
Settings Loader: "" : Error loading settings JSON, root type should be of "items" type
Plugin Manager: Plugin loaded : "libodb-car-plugin.so"
Plugin Manager: Plugin loaded : "libphone-bluetooth-plugin.so"
rpiplugin not initializing.
Plugin Manager: Plugin loaded : "librpi-plugin.so"
Plugin Manager: Plugin loaded : "libsample-plugin.so"
Plugin Manager: Plugin loaded : "libusbconnectionlistener-plugin.so"
WelleIoPlugin
2020-11-12T18:22:37.339 Debug: Plugin loaded : "libwelle-io-plugin.so"
2020-11-12T18:22:37.339 Debug: Loading qml plugin: "libandroid-auto-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libhvac-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libmedia-player-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libodb-car-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libphone-bluetooth-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "librpi-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libsample-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libusbconnectionlistener-plugin.so"
2020-11-12T18:22:37.340 Debug: Loading qml plugin: "libwelle-io-plugin.so"
2020-11-12T18:22:37.341 Debug: Theme loaded : "themes/default-theme/libdefault-theme.so"
2020-11-12T18:22:37.341 Debug: Has onEvent
2020-11-12T18:22:37.536 Debug: Audio: ActiveState
2020-11-12T18:22:37.672 Debug: Starting headunit
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:392: Start : Opening device 0x18d1 : 0x4ee7
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:409: Start : Device 0x18d1 : 0x4ee7 responded with protocol ver 2
2020-11-12T18:22:37.725 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:258: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:37.743 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:154: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:37.746 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:69: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:37.746 Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
2020-11-12T18:22:37.753 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:58: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:37.753 Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
2020-11-12T18:22:37.754 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.756 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.758 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.760 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.762 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.767 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.770 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.772 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.774 Warning: libpng warning: iCCP: known incorrect sRGB profile
2020-11-12T18:22:37.808 Warning: qrc:/MediaPlayer/qml/MediaPlayerLayout.qml:6:1: module "QtGraphicalEffects" version 1.11 is not installed
2020-11-12T18:22:37.857 Warning: QIODevice::read (QFile, ":/AUTHORS"): device not open
2020-11-12T18:22:37.857 Warning: QIODevice::read (QFile, ":/THANKS"): device not open
2020-11-12T18:22:37.857 Warning: QIODevice::read (QFile, ":/COPYING"): device not open
2020-11-12T18:22:37.857 Warning: QIODevice::read (QFile, ":/libs/COPYING.LGPL-2.1"): device not open
2020-11-12T18:22:37.857 Warning: QIODevice::read (QFile, ":/libs/kiss_fft/COPYING"): device not open
2020-11-12T18:22:37.871 Warning: qrc:/QML/settingpages/NullSettings.qml: No such file or directory
2020-11-12T18:22:37.873 Debug: main: Set language "en_US"
2020-11-12T18:22:37.873 Debug: main: Error while loading language "en_US" use English "en_GB" instead
2020-11-12T18:22:37.882 Warning: QIODevice::read (QFile, ":/AUTHORS"): device not open
2020-11-12T18:22:37.882 Warning: QIODevice::read (QFile, ":/THANKS"): device not open
2020-11-12T18:22:37.882 Warning: QIODevice::read (QFile, ":/COPYING"): device not open
2020-11-12T18:22:37.883 Warning: QIODevice::read (QFile, ":/libs/COPYING.LGPL-2.1"): device not open
2020-11-12T18:22:37.883 Warning: QIODevice::read (QFile, ":/libs/kiss_fft/COPYING"): device not open
2020-11-12T18:22:37.888 Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
2020-11-12T18:22:37.888 Warning: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
2020-11-12T18:22:37.896 Warning: qrc:/QML/settingpages/SoapySDRSettings.qml: No such file or directory
2020-11-12T18:22:37.897 Debug: Apply settings initially
2020-11-12T18:22:37.897 Debug: RadioController: Close device
2020-11-12T18:22:37.898 Info: InputFactory:Input device:auto
2020-11-12T18:22:37.900 Info: Airspy:Open airspy
2020-11-12T18:22:37.999 Info: Airspy:airpsy_open () failed:AIRSPY_ERROR_NOT_FOUND(-5)
2020-11-12T18:22:38.001 Info: RTL_SDR:Open rtl-sdr
2020-11-12T18:22:38.005 Info: RTL_SDR:No devices found
2020-11-12T18:22:38.131 Info: SoapySdr
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.
2020-11-12T18:22:38.313 Info: [INFO] [UHD] linux; GNU C++ version 8.2.0; Boost_106700; UHD_3.13.1.0-3
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.
2020-11-12T18:22:39.639 Info: SoapySDR driver=Audio hardware=Audio device_id=0 origin=https://github.com/pothosware/SoapyAudio
2020-11-12T18:22:39.639 Info: SoapySDR master clock rate set to 0 kHz
2020-11-12T18:22:39.639 Info: OutputSoapySDR:Actual RX rate: 2048 ksps.
2020-11-12T18:22:39.639 Info: Supported antenna: RX
2020-11-12T18:22:39.639 Info: Not selecting antenna
2020-11-12T18:22:39.639 Info: DC offset compensation not supported
2020-11-12T18:22:39.640 Info: *************** Setup soapy stream
[INFO] Using format CF32.
2020-11-12T18:22:39.640 Debug: RadioController: AGC on
2020-11-12T18:22:39.640 Debug: Audio: Volume 1
2020-11-12T18:22:39.640 Warning: qrc:/WelleIoPluginRes/QML/settingpages/GlobalSettings.qml:176: TypeError: Cannot call method 'initDevice' of null
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.
2020-11-12T18:22:39.655 Warning: QQmlComponent: Component is not ready
2020-11-12T18:22:39.655 Warning: qrc:/WelleIoPluginRes/QML/GeneralView.qml:61: TypeError: Type error
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:46: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:39: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:61: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:54: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:75: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:69: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:89: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:83: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:103: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.235 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:97: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:117: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:111: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:131: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:125: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:145: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:139: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:159: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/FanDirection.qml:153: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:56: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:55: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:51: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:57: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:67: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:66: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.236 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:62: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:68: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:110: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:152: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:151: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:150: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:153: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:171: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:170: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:167: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:181: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.237 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:179: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:191: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:189: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:210: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:209: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:206: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:216: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:257: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:255: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:254: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.238 Warning: qrc:/HVAC/ClimateControl/ACLayout.qml:256: ReferenceError: HVACPlugin is not defined
2020-11-12T18:22:40.240 Debug: [ofono] ofono manager is not available
libusb: error [udev_hotplug_event] ignoring udev action bind
2020-11-12T18:22:41.140 Debug: AndroidAuto event UsbConnectionListenerPlugin::UsbDeviceAdded : "{\"manufacturer\":\"Google\",\"pid\":\"11521\",\"product\":\"Pixel 4 XL\",\"serialNumber\":\"98131FFBA003DU\",\"vid\":\"6353\"}"
2020-11-12T18:22:41.140 Debug: Starting headunit
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:493: Start : Found OAP Device
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:501: Start : OK libusb_claim_interface usb_err: 0 (Success)
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:515: Start : Done get_config_descriptor config: 0x55da124a6060 num_int: 2
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:540: Start : iusb_ep_in: 0x81
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:547: Start : iusb_ep_out: 0x01
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:209: hu_ssl_begin_handshake : SSL_do_handshake() ret: -1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:65: send_ssl_handshake_packet : BIO_read() HS client req ret: 194
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:232: hu_handle_SSLHandshake : BIO_write() server rsp ret: 2282
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:235: hu_handle_SSLHandshake : SSL_do_handshake() ret: -1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:65: send_ssl_handshake_packet : BIO_read() HS client req ret: 1191
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:232: hu_handle_SSLHandshake : BIO_write() server rsp ret: 51
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:235: hu_handle_SSLHandshake : SSL_do_handshake() ret: 1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:261: hu_handle_SSLHandshake : SET: iaap_state: 2 (hu_STATE_STARTED)
W: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:1392: hu_aap_start : Starting HU thread
W: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:599: hu_handle_ServiceDiscoveryRequest : Found BT address 00:1A:7D:DA:71:11. Exposing Bluetooth service
2020-11-12T18:22:41.352 Warning: [BluezQt] bluez manager started
2020-11-12T18:22:41.353 Warning: [BluezQt] Agent registered
2020-11-12T18:22:41.354 Warning: [BluezQt] Agent set as default
2020-11-12T18:22:41.354 Warning: [BluezQt] obex service started
2020-11-12T18:22:41.364 Warning: [BluezQt] obex manager started
BluetoothPairingRequest: phone_address: "F0:5C:77:C4:BD:B8"
pairing_method: BLUETOOTH_PARING_METHOD_HFP