Opened 11 years ago

Closed 10 years ago

#6833 closed defect (wontfix)

Hauppauge HVR-1300 + MPEG encoder + external cable box + changing channels = error

Reported by: radu.cx+mythtv@… Owned by: danielk
Priority: minor Milestone: unknown
Component: MythTV - Recording Version: 0.21-fixes
Severity: medium Keywords: hvr-1300
Cc: Ticket locked: no

Description

I have a Hauppauge HVR-1300 capture card. It has an MPEG encoder (cx88 blackbird) and I use it to capture analogue signal from my cable box. I filled in the channels and EPG with XMLTV and I control the box with IR. Everything is fine with V4L capture, but with MPEG capture I end up with "I/O error" when I change channels. It seems that the cx88 doesn't like it when it's opened multiple times.

I used Google and my brain, and traced the problem to libs/libmythtv/mpegrecorder.cpp. And I fixed it. Patch attached (for 0.21-fixes). All it does is release the card when the recording is finished (i.e. the channel is changed), so it's really simple.

I'm not sure if 0.22 still has the problem - I'd think it does - but the function I changed no longer exists in trunk: MpegRecorder::FinishRecording?(void), so if you can follow up this patch and put it in the right place, that would be wonderful. Thanks.

Attachments (4)

myth_fix_hvr1300.patch (437 bytes) - added by radu.cx+mythtv@… 11 years ago.
Close the MPEG card when recording finishes (0.21-fixes)
hvr1300_0.23rc2_not-working.patch (1.2 KB) - added by radu.cx+mythtv@… 10 years ago.
Attempted refresh of the original patch
playback.log (6.3 KB) - added by radu.cx+mythtv@… 10 years ago.
Log showing the channel switching sequence with -v playback
hvr1300_0.23rc2_working-but-not-properly.patch (2.2 KB) - added by radu.cx+mythtv@… 10 years ago.
Attempted refresh of the original patch (try 2)

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by radu.cx+mythtv@…

Attachment: myth_fix_hvr1300.patch added

Close the MPEG card when recording finishes (0.21-fixes)

comment:1 Changed 10 years ago by anonymous

comment:2 Changed 10 years ago by stuartm

Status: newinfoneeded_new

Could someone using analogue capture with an HVR-1300 tell us if this is still an issue with 0.23 RC2 or failing that 0.22-fixes?

comment:3 Changed 10 years ago by radu.cx+mythtv@…

It's been a while since I used that card (and the machine that has the card in it). The project I was working one when I submitted the ticket and patch was put on the back burner soon after, so I never booted the machine since.

I'll try to get back to you in the following days.

comment:4 Changed 10 years ago by radu.cx+mythtv@…

Yes, still an issue.

I get "Video frame buffering failed too many times" when switching channels. After that, I have to quit the frontend completely to watch the HVR-1300 again. Log scrolls with "Error: Invalid file descriptor in 'safe_read()' and the finishes with 'TV Error: LiveTV not successfully started'. So now it's even worse than it was in 0.21. Back then I could watch Live TV after the card failed to open.

I would update the patch, but I have no idea where to look right now, and things seem to be totally different, so it can take a while to bring the patch up to date.

comment:5 Changed 10 years ago by robertm

Status: infoneeded_newnew

comment:6 Changed 10 years ago by radu.cx+mythtv@…

The backend says this:

DevRdb?(/dev/video1) Error: Problem reading fd(40) eno: Input/output error (5) ... MPEGRec(/dev/video1) Error: Device error detected

Changed 10 years ago by radu.cx+mythtv@…

Attempted refresh of the original patch

comment:7 Changed 10 years ago by radu.cx+mythtv@…

I attempted to refresh the patch I posted when I opened the ticket, and ended up with the file I attached to this ticket just earlier. It seems to do what it's supposed to be doing, but I end up with something else:

playCtx, Error: Attempting to setup a player, but it already exists.

I get this each and every time I change channels after I apply the above patch, which is different from locking up. Any ideas on this one? I tried looking around code, but at a first glance I'm not sure why the player doesn't close when the myth state switches from WatchingLiveTV to None before switching the channel.

comment:8 Changed 10 years ago by radu.cx+mythtv@…

BTW, I'm seeing that playCtx error on DVB as well, without me making any changes, but I'm not sure how to consistently reproduce it there.

Changed 10 years ago by radu.cx+mythtv@…

Attachment: playback.log added

Log showing the channel switching sequence with -v playback

Changed 10 years ago by radu.cx+mythtv@…

Attempted refresh of the original patch (try 2)

comment:9 Changed 10 years ago by radu.cx+mythtv@…

Bouncing around code, I came up with this patch, but while channel changing now kinda works, after I exit live TV a dialog box shows up with this text: "Error opening jump program file buffer". This and the fact that I have to kill the NVP player mean that I'm missing something.

comment:10 Changed 10 years ago by robertm

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:11 Changed 10 years ago by danielk

Resolution: wontfix
Status: assignedclosed

Please report the problem opening the device file multiple times upstream to the LinuxTV project.

We will not apply workarounds until we hear from them that the problem has been addressed upstream first.

Note: See TracTickets for help on using tickets.