Driver radio STLC2590

Fri 03 October 2008

This is a re-post of a project I did. It’s still the same, no version upgrade. I’m putting it on this blog as I don’t update or track comments on the old one and people generally go there through google.

First of all I’d like to thank ST Microeletronics for give us the opportunity to work on a Linux driver for their chip STLC2590. All the documentation needed to write it was given by them. Thanks also to Patrick Bellasi, our tutor, which has tough us so much in regard to Linux driver development, APIs of ST, tools used in this project etc. At last, I’d like to thank William Fornaciari, which indicated us to ST so we could do this project as part of the course “Laboratory of Operating Systems and Software Design” at Politecnico di Milano.

This is a driver intended to be used mainly on Embedded Systems and SoC. I’ve never heard about a common PC using this chip within multimedia cards. So, all the instructions and documentation were made in the scope of crosscompiling it for ARM processors.

Here I publish the code under the GPLv2 License. I remember all of you that may use this driver that it’s dependent on the I2C API of STLinux (thought this limitation can be removed with few lines of code, but it requires knownledge of the vanilla I2C API). Also, I recommend to use the kernel and tools (for crosscompiling) from Poky Linux.

Current version: 0.0.12
Description and features:
- Radio driver for chip STLC2520 using V4L2 API.
- Configure the chip through I2C.
- RDS stuff is implemented. You have to use an userspace utility to get it working: rdsd.
- Kernel Linux 2.6.20 and tools for crosscompiling from Poky Linux. Patches to kernel from STLinux that include the I2C API used.
- Tools used for debugging and testing: rdsd and rdsquery, fmtools.

Still somethings to do:
- Remove the “exclusive_open” behavior (taken from V4L2) so more than one client at a time can connect to it (for example, one could control radio stations, volume, etc and the other the rds stuff, that it’d be the case of fmtools and rdsd working together).
- Review the sleep calls inside the code to render it faster and better.
- Review the need of locks on interrupt handlers of rds data.

Download the source code and documentation (in italian, as a final report for my course): stlc2590-0.0.12.tar.bz2.

If you want to know more about the driver or its development, I really encourage you to:
1) Read the documentation (if you are Italian please translate it - documentation is also under GPLv2 and the .odt and image files are given);
2) Contact me (either through the comments space or by email)
3) Hire me to work with you ;-)
As an academic work I think it can also be useful for those which are learning Linux and Kernel Programming. If you want to learn more you should get this driver as example and also read books (at least some chapters) like Linux Device Drivers (available online) and Advanced Linux Programming.

Enjoy it.