Bug 680813 - kernel upgrade broke support for FM tuner in saa7134
Summary: kernel upgrade broke support for FM tuner in saa7134
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 14
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jarod Wilson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 681520
TreeView+ depends on / blocked
 
Reported: 2011-02-27 22:01 UTC by John Fattaruso
Modified: 2011-03-02 17:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 681520 (view as bug list)
Environment:
Last Closed: 2011-03-02 17:32:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Fattaruso 2011-02-27 22:01:27 UTC
Description of problem:

The original kernel package in Fedora 14, 2.6.35.10-74, included support for the FM tuner for the Avermedia GO 007 FM card in the saa7134 module that worked fine, as did the kernel package in previous Fedora versions. I followed the recent kernel upgrade to 2.6.35.11-83 and found the FM tuner support no longer working, although the TV tuner continues to run fine. A /dev/radio0 device is still created, and can be opened, but an ioctl call that has worked for years now returns an error code.

Version-Release number of selected component (if applicable):

2.6.35.11-83

How reproducible:

Always

Steps to Reproduce:
1. Upgrade to 2.6.35.11-83
  
Actual results:

struct video_audio audio;
radfd = open("/dev/radio0",O_RDONLY);
status = ioctl(radfd,VIDIOCGAUDIO,&audio);
  returns an error status with the "Invalid argument" error number

Expected results:

Current FM tuner audio state returned in audio structure.

Additional info:

Booting back into 2.6.35.10-74 allows the FM tuner to run as before.

Comment 1 Jarod Wilson 2011-02-28 23:40:54 UTC
Mauro, any ideas on this one?

Comment 2 Jarod Wilson 2011-03-01 20:59:53 UTC
Can you provide dmesg output after a fresh boot for the non-working kernel? You might also want to try this kernel here:

http://kojipkgs.fedoraproject.org/packages/kernel/2.6.35.11/85.fc14/

It carries a tuner-related fix that *might* be relevant here as well...

Comment 3 Mauro Carvalho Chehab 2011-03-02 12:55:11 UTC
Jarod,

It is simple: VIDIOCGAUDIO is an old V4L1 call. V4L1 API were removed.

John,

You need to use an application that works with V4L2 API. You can use "radio" application shipped with xawtv. I've ported it recently to work with the new API. I just built a new package for rawhide at:
    http://koji.fedoraproject.org/koji/taskinfo?taskID=2878324

Comment 4 Mauro Carvalho Chehab 2011-03-02 13:34:02 UTC
Added an update for F14 at bugzilla:
    https://bugzilla.redhat.com/show_bug.cgi?id=681520

Fedora 14 packages are at:
    http://koji.fedoraproject.org/koji/buildinfo?buildID=231654

Please test.

Comment 5 Jarod Wilson 2011-03-02 15:43:55 UTC
(In reply to comment #3)
> Jarod,
> 
> It is simple: VIDIOCGAUDIO is an old V4L1 call. V4L1 API were removed.

D'oh. Missed that. Thanks Mauro!

Comment 6 John Fattaruso 2011-03-02 17:20:17 UTC
OK, I've updated xawtv to xawtv-3.100-1.fc14.i686, and the new radio app works fine with the updated 2.6.35.11-83.fc14.i686.PAE kernel.

I've used my own C code for some years in crontab jobs to do timed recordings of various weekly radio programs. Any pointers to documentation for the V4L2 API for the FM tuner would be appreciated. Or I will try to dissect the source code for the radio app.

Thanks-
John

Comment 7 Mauro Carvalho Chehab 2011-03-02 17:32:05 UTC
V4L2 API has a chapter about V4L1 to V4L2 changes, but it is probably easier if you take a look at the code changes for radio application. They are at my git repository at:
    http://git.linuxtv.org/xawtv3.git

A diff between version 3.95 and the last one will give you the directions for it:
    $ git diff 45a153b46c280b51471ec12854cce623ef8f92be.. console/radio.c

You can also use something like:
    $ radio -qf 91.4

to tune into an specific channel and use v4lctl or v4l2ctl to mute/unmute the device on some script.

Anyway, I'll close this BZ, as there's no kernel bug on this change, and userspace changes are handled on another bugzilla.

Comment 8 John Fattaruso 2011-03-02 17:57:07 UTC
OK, I've updated xawtv to xawtv-3.100-1.fc14.i686, and the new radio app works fine with the updated 2.6.35.11-83.fc14.i686.PAE kernel.

I've used my own C code for some years in crontab jobs to do timed recordings of various weekly radio programs. Any pointers to documentation for the V4L2 API for the FM tuner would be appreciated. Or I will try to dissect the source code for the radio app.

Thanks-
John

Comment 9 John Fattaruso 2011-03-02 17:57:56 UTC
Thanks for your help Mauro-
John


Note You need to log in before you can comment on or make changes to this bug.