GNOME Bugzilla – Bug 429005
Port radio tuner code over to the Video4Linux 2 API
Last modified: 2010-06-05 19:50:11 UTC
When I upgraded to Ubuntu Feisty, gnome-radio stopped working. I am guessing this is due to the dsbr100 driver being upgraded to V4L2 in the newer kernel (2.6.20), and gnome-radio not being able to program it right (probably due to a problem in the V4L1 compatibility layer).
I've ported the tuner code over to the equivalent V4L2 API, which fixes the problem for me. I'll attach the patch shortly.
With the patch, gnome-radio will probably not work with V4L1-only devices. It would probably be possible to support both APIs, but I haven't structured the patch like that.
Created attachment 86236 [details] [review]
the V4L2 patch
Created attachment 86274 [details] [review]
A new version that improves the error handling in radio_init()
I patched gnomeradio svn version with your patch but i get this error message:
Could not open device /dev/radio0
Check your settings and make sure that no other
program is using /dev/radio0.
Also make sure that you have read-access to it.
Also it spits this out in the console:
VIDIOC_QUERYCAP: Invalid argument
What can it be?
I am also experiencing same problem as joel. Till now I have been unable to get radion working on my bt878 based tv tuner + fm card. I thought this patch will help but it didn't. :-(
I just commited an updated version of Jamesh's work to svn. I refactored it so that now both api's (v4l and v4l2) are supported. gnomeradio will try v4l first and then v4l2, if that fails. Probably it should be the other way round, but I really don't know which API has better support. Alternatively a gconf-key (/apps/gnomeradio/driver) can be used to specify the driver that can be used (defaults to "any", "v4l1" and "v4l2" are other possible values).
It would be nice if someone could try this out, because I can't (don't have any tuner hardware anymore).
> gnomeradio will try v4l first
> and then v4l2, if that fails. Probably it should be the other way round, but I
> really don't know which API has better support.
The drivers are using V4L2 API. IMO, V4L2 should be used in the first attempt.
I have a machine running Hardy Heron and using an Aztech/Packard Bell FM Radio Card. As others have reported, the card seems to work (it detects stations, fmscan reports more than adequate signal strengths, etc.), but I get no audio. The same hardware worked just fine under another distro (a disk install of Knoppix).
I went to the gnomeradio home page, and downloaded the source for ver. 1.8
Unfortunately configure dies with the following:
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
the relevant lines of config.log:
configure:2956: checking for C compiler default output file name
configure:2983: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2986: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "gnomeradio"
| #define PACKAGE_TARNAME "gnomeradio"
| #define PACKAGE_VERSION "1.8"
| #define PACKAGE_STRING "gnomeradio 1.8"
| #define PACKAGE_BUGREPORT "http://mfcn.ilo.de/gnomeradio"
| #define PACKAGE "gnomeradio"
| #define VERSION "1.8"
| /* end confdefs.h. */
| main ()
| return 0;
configure:3031: error: C compiler cannot create executables
Is there a file or files missing in the tarball, or is something else going on?
I successfully got ver. 1.8 to compile. It required the following additional packages:
gettext (not just gettext-base)
Still get the same result: gnomeradio starts, appears to detect stations (the stereo indicator goes on when gnomeradio is tuned to a known station(, but no audio. If I try to record audio when tuned to a known station, the resulting file contains only noise.
Any ideas as to how to proceed? My sound system seems to be working fine, and all of the channel sliders are set to near maximum level.
Modifying gnomeradio like that means that V4L1 devices won't work anymore. I'd recommend looking into libv4l instead:
The "no sound" problem appears to also happen with all of the other standard fm radio applications, including kradio, radio (the console app), and fm (from fmtools). Gnomeradio exhibits the same problems whether it's ver. 1.7.5 (ubuntu) or ver. 1.8 .
(In reply to comment #10)
> The "no sound" problem appears to also happen with all of the other standard fm
> radio applications, including kradio, radio (the console app), and fm (from
> fmtools). Gnomeradio exhibits the same problems whether it's ver. 1.7.5
> (ubuntu) or ver. 1.8 .
Hmm, sorry, but that does not sound a lot like a gnomeradio problem then :-(
(In reply to comment #9)
> Modifying gnomeradio like that means that V4L1 devices won't work anymore.
Hmm, could you explain what you exactly is the problem?
> recommend looking into libv4l instead:
Sounds like a good idea, but honestly I'm mostly maintaining gnomeradio these days. I don't even have a radio tuner card myself anymore, so I cannot even test whether my changes actually work :-/
gnomeradio 1.8 has both v4l1 and v4l2 backends, so resolving this as fixed.