ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #17117
Re: FM Radio info collection
This seems to be more complicated than expected but please make this happen.This is one of the things I considered when I bought my bq E5 instead of MX4.Too bad for me, FM Radio still isn't working and Podbird development seems to be stagnant right now andthe bug on the podcast I'm listening to isn't fixed yet :(
From: Thomas Voß <thomas.voss@xxxxxxxxxxxxx>
To: sturmflut <sturmflut@xxxxxxxxxxxxxx>
Cc: ubuntu-phone <ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
Sent: Thursday, December 3, 2015 8:32 AM
Subject: Re: [Ubuntu-phone] FM Radio info collection
On Thu, Dec 3, 2015 at 1:36 AM, sturmflut <sturmflut@xxxxxxxxxxxxxx> wrote:
> Dear list,
>
> I've been looking at the necessary pieces for FM radio support, and I
> hope somebody can correct me, but it looks more complicated than I expected.
>
We discussed this topic lengthily on the list some time ago :) It's
not like we don't want to
support FM radio, but the lack of a common Android HAL for FM radio
access would force us to
maintain an FM radio abstraction ourselves (more on that below). In
addition, most of the device-specific
radio apps require elevated privileges to run as they directly access
the FM radio HW (not multiplexed by a system service).
> For some reason Android doesn't have an FM radio API and leaves it up to
> the manufacturers to come up with something. I've looked at several
> devices, among them the bq Aquaris E4.5, and every SoC manufacturer
> seems to have a different opinion on how to do it.
>
> Some ship no FM radio at all.
>
> Some seem to ship drivers for the Linux V4L subsystem.
>
> MediaTek (Aquaris E4.5 and E5) decided to implement custom kernel
> drivers with a custom character device (/dev/fm) and custom ioctl
> commands. There seem to be userspace libraries (libfm*) including a JNI
> wrapper in /system/lib of the Android container on our Ubuntu phones.
>
> Because there is no standard API, there are no generic FM radio apps for
> Android, and pretty much every manufacturer ships a custom app for his
> own SoC(s) and/or device(s).
>
>
> I'll try to come up with a piece of C code for the command line that can
> at least initialize and tune the FM radio on the Aquaris E4.5 and E5.
> The long-term goal could be to turn this into plugins for an extended
> media-hub.
>
If you are interested in helping to enable the functionality, the
correct chain for integrating the feature would be:
[1.] Add a (potentially limited) API to lp:platform-api, that exposes
a simple common C interface to the Ubuntu side.
[2.] Provide an implementation of the API in platform-api/android (see
http://bazaar.launchpad.net/~phablet-team/platform-api/trunk/files/head:/android/)
[2.1] Provide a dummy fallback implementation for devices that do not
support FM radio of any kind.
[3.] Expose the respective hardware functionality to media-hub.
Multiple ways are possible, but we would need to significantly adjust
the interfaces
to support fm radio semantics (switching stations, rds, automatic scans etc.)
[4.] Adjust Qt's radio abstraction and come up with a Ubuntu Touch
specific backend implementation, that either:
[4.1] Leverages the API in [1.] directly (would require any app to
have special privileges in accessing the system).
[4.2] Leverages the API in [3.] (which is the clean way of
integration FM radio support).
For starters, [1.], [2.], [2.1] and [4.1] should be good enough to get started.
Cheers,
Thomas
>
> cheers,
> Simon
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp
--
Mailing list: https://launchpad.net/~ubuntu-phone
Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help : https://help.launchpad.net/ListHelp
Follow ups
References