Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#4466 closed defect (invalid)

MythTV should disable tuner before switching inputs

Reported by: starz909@… Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythtv Version: unknown
Severity: medium Keywords: tuner inputs
Cc: Ticket locked: no

Description

Hello, I came across this problem with the Hauppauge pvr-150 MCE card. It may be reproducable with other ivtv cards, but I don't know.

I have a standard analog TV lineup connected to the tuner of the pvr-150, and I have a digital cablebox source connected to the rear inputs of the card. During livetv, if I want to switch to the cablebox, I'd switch the card's inputs.

This switching doesn't work anymore because recent ivtv driver versions make it necessary to disable the tuner prior to actually issuing the command to switch inputs. I verified this with a running mplayer and the v4l2-ctl utility. The reason behind this change in driver behavior is to avoid corruption in the mpeg stream.

I can't write patches, so I'm asking that Mythtv code be modified such that before mythtv changes from the tuner source to any other source, the tuner is disabled first.

I know this is a hardware issue, but there is no sign that this driver change will be repealed. Further, the changed driver has not yet made it into mainline kernel sources, so few people are coming across this problem.

For further reference on the subject, please see: http://www.gossamer-threads.com/lists/mythtv/dev/308522 http://www.gossamer-threads.com/lists/mythtv/users/304472 http://www.gossamer-threads.com/lists/ivtv/devel/37242

Best regards, Sam

Attachments (4)

4466-hack-v1.patch (5.4 KB) - added by danielk 11 years ago.
Possible workaround. This still needs to be tested with 2.6.24, but Hans suggested this might work instead of the more crazy close/open hack employed in other applications.
4466-hack-v2.patch (12.7 KB) - added by danielk 11 years ago.
just stopping streaming on videofd didn't work, so this tries to do it on all ivtv file descriptors, but that doesn't work either. This seems to confirm that there is no less than 1000 line workaround we can do in MythTV. (This is itself a 387 line patch and it is just a proof of concept and doesn't even do proper error checking.)
input-switching-v1.patch (2.8 KB) - added by danielk 11 years ago.
Patch for ivtv driver to address the problem
4466-hack-v3.patch (12.7 KB) - added by danielk 11 years ago.
Another hack attempt, based on e-mail from Martin Dauskard. This hasn't been tested with 2.6.24 yet..

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

FYI If someone else wants to look at this be my guest. :)

comment:2 Changed 12 years ago by starz909@…

I've just got confirmation from Hans Verkuil, this change in ivtv driver behavior has gone into the upcoming 2.6.24 kernel.

Sam Logen

comment:3 Changed 11 years ago by starz909@…

OK, just a reminder everyone. Kernel 2.6.24 is marked as stable on www.kernel.org. Anyone who switches to this kernel or uses a bleeding edge ivtv driver will NOT be able to change inputs on their IVTV hardware encoder cards during livetv, or any time the card is active, until a patch that does as I propose is added to Mythtv. And I imagine there are quite a few people that own IVTV cards. I urge the developers to please consider my request for this addition.

Thank you, Sam

comment:4 Changed 11 years ago by danielk

Resolution: invalid
Status: assignedclosed

This really needs to be fixed at the driver level. I've e-mailed the ivtv developer mailing list for help any help they can provide with the problem. Basically trying to work around this driver regression within MythTV would be a major undertaking, it is much easier to just fix the driver.

comment:5 Changed 11 years ago by starz909@…

Well, it's already been asked if the ivtv developers will regress this change in the driver behavior. After reading the original mailing list from the link I supplied, it sounds like this will be a standard feature of the driver for now. Still, I'm hopeful the ivtv developers can help with a workaround.

Personally, I don't see why this would be a major undertaking if we're just adding one more step to the input change process. Perhaps you could explain what you mean by that.

Sam

comment:6 Changed 11 years ago by starz909@…

Ah, nevermind about explaining that. Mail always comes to me last to first, so I eventually got to the emailed discussions on the topic.

Changed 11 years ago by danielk

Attachment: 4466-hack-v1.patch added

Possible workaround. This still needs to be tested with 2.6.24, but Hans suggested this might work instead of the more crazy close/open hack employed in other applications.

Changed 11 years ago by danielk

Attachment: 4466-hack-v2.patch added

just stopping streaming on videofd didn't work, so this tries to do it on all ivtv file descriptors, but that doesn't work either. This seems to confirm that there is no less than 1000 line workaround we can do in MythTV. (This is itself a 387 line patch and it is just a proof of concept and doesn't even do proper error checking.)

Changed 11 years ago by danielk

Attachment: input-switching-v1.patch added

Patch for ivtv driver to address the problem

Changed 11 years ago by danielk

Attachment: 4466-hack-v3.patch added

Another hack attempt, based on e-mail from Martin Dauskard. This hasn't been tested with 2.6.24 yet..

Note: See TracTickets for help on using tickets.