Bug #1810
Analog NTSC using Hauppauge 2250 (saa7164) freezes one second after displaying image
0%
Description
configuration
Hauppauge 2250 dual tuner card
3.8.0-31-generic #46-Ubuntu SMP
x86_64 x86_64 x86_64 GNU/Linux
Frontend XBMC frodo & Showtime
HTS Tvheadend 3.5.243~g2b64995-dirty
First off I would like to commend the developers, Tvheadend is a great product, very elegant!
Unfortunately my cable provider offers all of the channels I want to watch in analog, unless I'm willing to pay an extra $25/month to use an HD cable box(no guarantee the channels
will be HD though).
Tvheadend does not work out of the box with NTSC so I downloaded the source for 3.5 and followed some instructions a couple of people posted.
to add NTSC support I followed this link
https://tvheadend.org/projects/tvheadend/wiki/Tvheadend_NTSC
1) Download source
2) open v4l.c
3) change "v4l2_std_id std = 0xff;" to "v4l2_std_id std = V4L2_STD_NTSC;"
then to fix a tuning issue I followed this link
https://tvheadend.org/attachments/1541/v4l-tune.patch?utf8=%E2%9C%93&type=sbs
4) change "vf.frequency = (frequency * 16) / 1000000; to "vf.frequency = (frequency * 16) / 1000;"
5) change "int frequency = t->s_v4l_frequency;" to "vf.frequency = (frequency * 16) / 1000;"
6) compile
7) install
I added a couple of channels and attempted to watch them. At times when I attempted to watch a channel, a still image of the channel I was attempting to watch would display.
On occassion, the channel would run for 1 second and then freeze.
I then noticed that I would always get an image if the the digital side of the card was not scanning.
Frustrated I began to debug with gdb.
After many hours of debugging v4l.c(I was sure the problem was here) I somehow came to the conclusion that line 145 should not read
"r = poll(pfd, 2, -1);" but rather "r = poll(pfd, 2, 0);"
then I ran
./configure --disable-linuxdvb --disable-dvbscan
make
make install.
I can now watch NTSC analog channels with tvheadend.
I'm not exaclty sure what I did but I know it's been working nicely for the last serveral hours.
I hope this helps someone out there and if it really is a bug I hope it gets fixed.
Once again, hats off to the development team
History
Updated by Pedro Pena about 11 years ago
correction
step 5) should be
5) change "int frequency = t->s_v4l_frequency;" to "unsigned int frequency = t->s_v4l_frequency;"