← Back to team overview

ubuntu-phone team mailing list archive

FM Radio info collection

 

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.

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.


cheers,
Simon


Follow ups