HelloVolla / ubuntu-touch-beta-tests

Status overview and issues for beta tests of Ubuntu Touch on the Volla Phone
23 stars 1 forks source link

FM radio only works with a special application #158

Open JamiKettunen opened 1 year ago

JamiKettunen commented 1 year ago

Is this a new report?

Yes

Device model

Volla Phone 22 (2022)

OS version

20.04 (r78)

Describe the bug

FM radio apps such as https://open-store.io/app/it.mardy.fmradio (using QML Radio element anyway) don't seem to work.

Steps to reproduce the bug

  1. Install FM Radio by Alberto Mardegan
  2. Insert headphones through jack
  3. Open the app
  4. See FM radio not available

Expected behaviour

The app allows me to tune into specific FM radio frequencies to listen to.

Additional context

After further debugging (adding some prints statements) the following is seen on journalctl --user -f even with headphones connected through headphone jack:

Jan 14 18:07:04 ubuntu-phablet aa-exec[4614]: defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.radio"
Jan 14 18:07:04 ubuntu-phablet aa-exec[4614]: qml: Active focus item: NoRadioPage_QMLTYPE_17(0x1c274830)
Jan 14 18:07:04 ubuntu-phablet aa-exec[4614]: qml: Active focus control: NoRadioPage_QMLTYPE_17(0x1c274830)
Jan 14 18:07:04 ubuntu-phablet aa-exec[4614]: qml: Component.onCompleted: radio.availability 1 (Available 0, Busy 2, Unavailable 1, ResourceMissing 3)
Jan 14 18:07:04 ubuntu-phablet aa-exec[4614]: qml: Component.onCompleted: radio.antennaConnected false

It appears QMediaServiceProvider::defaultServiceProvider()->requestService(Q_MEDIASERVICE_RADIO)) (Q_MEDIASERVICE_RADIO defined here) fails as per the first line in that log, which results in the rest of the code also failing and doing nothing useful.

JamiKettunen commented 1 year ago

Hm ok this is interesting, I just fixed up https://github.com/Venji10/fmradio-volla locally and now have working FM radio with Volla Phone (yggdrasil) on 20.04, wonder what the best direction to go from here is

JamiKettunen commented 1 year ago

Pushed my 20.04 fixes on https://github.com/JamiKettunen/fmradio-volla/tree/focal for the time being at least so those aren't lost if someone wants to use the app ^^

JamiKettunen commented 1 year ago

Seems the typical FM radio apps on Ubuntu Touch use fm-radio-service with the main control logic being in: https://gitlab.com/ubports/development/core/fm-radio-service/-/blob/main/src/service/mediatek/radio_control.cpp

Seems it already supports some MediaTek devices but clearly it's missing something for the Volla Phones to take advantage of it.. needs investigation