[mythtv-commits] Ticket #1133: Support pcHDTV analog tuner
MythTV
mythtv at cvs.mythtv.org
Mon Feb 20 20:22:53 UTC 2006
#1133: Support pcHDTV analog tuner
---------------------+------------------------------------------------------
Reporter: danielk | Owner: danielk
Type: task | Status: new
Priority: minor | Milestone: 0.20
Component: mythtv | Version: head
Severity: medium | Resolution:
---------------------+------------------------------------------------------
Comment (by foom at fuhm.net):
I've updated to this and tried it on my pcHDTV 3000 card. It works nicely.
Two issues, though:
1) the check for "pcHDTV" doesn't work, so I had to remove the check. I'm
not sure what name it's supposed to be checking; my card identifies itself
as:
{{{DVB#0 Using DVB card 0, with frontend 'Oren OR51132 VSB/QAM
Frontend'.}}}
2) When switching to analog from digital (with recordings back to back, or
in livetv), the channel change doesn't work the first time, even though
the v4l2 call appears to succeed and the frequency returned from
VIDIOC_G_FREQUENCY is the proper one. I did the following workaround,
which gets the current frequency and re-sets it to the same thing every
time a VIDIOC_DQBUF error happens. I know it isn't the "right" fix, but it
at least makes things work for me. With this fix, there is static for the
first couple seconds after the digital->analog change, then it's fine.
{{{
Index: NuppelVideoRecorder.cpp
===================================================================
--- NuppelVideoRecorder.cpp (revision 9028)
+++ NuppelVideoRecorder.cpp (working copy)
@@ -1424,6 +1424,23 @@
if (ioctl(fd, VIDIOC_DQBUF, &vbuf) < 0)
{
perror("VIDIOC_DQBUF");
+
+ {
+ struct v4l2_frequency vf;
+ int ioctlval;
+ vf.tuner = 0; // use first tuner
+ vf.type = V4L2_TUNER_ANALOG_TV;
+ ioctlval = ioctl(fd, VIDIOC_G_FREQUENCY, &vf);
+ if (ioctlval < 0) {
+ fprintf(stderr, "ERROR RESETTING\n");
+ } else {
+ ioctlval = ioctl(fd, VIDIOC_S_FREQUENCY, &vf);
+ if (ioctlval < 0) {
+ fprintf(stderr, "ERROR RESETTING\n");
+ }
+ }
+ }
+
if (errno == -EINVAL)
{
for (int i = 0; i < numbuffers; i++)
Index: videosource.cpp
===================================================================
--- videosource.cpp (revision 9028)
+++ videosource.cpp (working copy)
@@ -1932,8 +1932,7 @@
signal_timeout->setValue(500);
channel_timeout->setValue(3000);
- if (name.left(6) == "pcHDTV")
- buttonAnalog->setVisible(true);
+ buttonAnalog->setVisible(true);
break;
default:
}}}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/1133>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list