After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 429005 - Port radio tuner code over to the Video4Linux 2 API
Port radio tuner code over to the Video4Linux 2 API
Status: RESOLVED FIXED
Product: gnomeradio
Classification: Deprecated
Component: general
1.7
Other Linux
: Normal normal
: ---
Assigned To: Jörgen Scheibengruber
Jörgen Scheibengruber
Depends on:
Blocks:
 
 
Reported: 2007-04-12 14:10 UTC by James Henstridge
Modified: 2010-06-05 19:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
v4l2-support.patch (4.97 KB, patch)
2007-04-12 14:11 UTC, James Henstridge
none Details | Review
v4l2-support.patch (v2) (11.51 KB, patch)
2007-04-13 02:55 UTC, James Henstridge
none Details | Review

Description James Henstridge 2007-04-12 14:10:30 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.
Comment 1 James Henstridge 2007-04-12 14:11:30 UTC
Created attachment 86236 [details] [review]
v4l2-support.patch

the V4L2 patch
Comment 2 James Henstridge 2007-04-13 02:55:09 UTC
Created attachment 86274 [details] [review]
v4l2-support.patch (v2)

A new version that improves the error handling in radio_init()
Comment 3 joelcalado 2007-05-09 22:51:26 UTC
Hi James,

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?

Thanks,

Joel
Comment 4 Onkar Shinde 2007-11-23 14:50:35 UTC
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. :-(
Comment 5 Jörgen Scheibengruber 2008-04-13 14:48:24 UTC
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).
Comment 6 Douglas Schilling Landgraf 2008-05-19 10:36:10 UTC
Hello  Jörgen,

> 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.
Comment 7 Mike Altarriba 2008-10-04 14:48:04 UTC
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:3024: result: 
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.  */
| 
| int
| 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?
Comment 8 Mike Altarriba 2008-10-07 00:03:21 UTC
I successfully got ver. 1.8 to compile. It required the following additional packages:

libc6-dev
gettext (not just gettext-base)
libgnomeui-dev
libgnome-media-dev
gstreamer-tools
libgstreamer0.10-dev
libgstreamer-plugins-base0.10-dev

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.
Comment 9 Bastien Nocera 2008-10-07 00:13:12 UTC
Modifying gnomeradio like that means that V4L1 devices won't work anymore. I'd recommend looking into libv4l instead:
http://hansdegoede.livejournal.com/3636.html
Comment 10 Mike Altarriba 2008-10-07 04:53:13 UTC
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 .

Comment 11 Jörgen Scheibengruber 2008-10-11 09:18:33 UTC
(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 :-( 

Comment 12 Jörgen Scheibengruber 2008-10-11 09:22:00 UTC
(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?

> I'd
> recommend looking into libv4l instead:
> http://hansdegoede.livejournal.com/3636.html

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 :-/
Comment 13 Jörgen Scheibengruber 2010-06-05 19:50:11 UTC
gnomeradio 1.8 has both v4l1 and v4l2 backends, so resolving this as fixed.