Forums » Tutorial and setups »
tv tuner stops working when starting tvheadend
Added by j smith almost 12 years ago
If I set the analog tuner to channel 2 "v4l2-ctl -f 55.25" and then record from it "cat /dev/video0 > test.mpg" it works fine. But starting tvheadend and selecting that channel gives me static. If I quit tvheadend and try to repeat the above, I still end up only with static. So tvheadend does something to the tv tuner where it does not work anymore until I reboot the computer.
Replies (2)
RE: tv tuner stops working when starting tvheadend - Added by Ferry de Jong almost 12 years ago
This sounds very similar to the problem I'm seeing with my hauppauge PVR-350 card.
I noticed that when I set up some analog channels in "services" under the TV adapters section (including the proper frequencies in Hz) when I afterwards preview an anlog channel with "play" under "Channels" section I get static in the vlc window.
I also see that at the time i select "play" that v4l-ctrl -F reports the analog frequency of the tuner was reset (by tvheadend I suppose) to 44Mhz which is the lowest frequency the card supports, as if it is reset instead of set to the proper frequency.
If I set the frequency manually using v4l2-ctl -f 792.0 (note: frequency is specified in MHz, not Hz contrary to services frequency field!)
vlc starts showing the proper video+audio!
RE: tv tuner stops working when starting tvheadend - Added by Waldemar S. over 11 years ago
Hi,
same issue with my PVR-350 analog TV Tuner too.
When I set the frequency with v4l2-ctl -f 487.250 (in kHz) so you get:
Frequency set to 7796 (487.250000 MHz).
A look at tvheadend v4l.c file1 we find following:
vf.frequency = (frequency * 16) / 1000000;
e.g. with 487.250 kHz:
(487250 * 16) / 1000000 => 7.796 and not 7796
Also see v4l2 documentation2.
My smal patch (see attachment) solve this issue for me.
Sory for my bad english.
1: https://github.com/tvheadend/tvheadend/blob/release/3.4/src/v4l.c#L207
2: http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-tuner.html#v4l2-tuner
v4l-tune.patch (744 Bytes) v4l-tune.patch |