Opened 9 years ago

Closed 2 years ago

#12522 closed Bug Report - General (Trac EOL)

v4l2 recorders incorrectly call VIDIOC_STREAMON when not using streaming mode

Reported by: Stuart Auchterlonie Owned by: Stuart Auchterlonie
Priority: minor Milestone: 29.2
Component: MythTV - General Version: 0.27.5
Severity: medium Keywords:
Cc: Ticket locked: no

Description

As per discussion on irc

http://irc.mythtv.org/ircLog/channel/4/2015-10-05

if V4LChannel::SetInputAndFormat?(int inputNum, QString newFmt) needs to swap to a different input in order to record from the tuner, it ends up blindly calling VIDIOC_STREAMON (the V4L2 streaming API) on the tuner, when it has not been correctly setup for streaming mode.

The V4L2 recording has no support for the streaming API, so this could never have worked

Attachments (1)

ticket-12522-disable-streaming-mode.diff (958 bytes) - added by Stuart Auchterlonie 9 years ago.
Disable streaming mode for all tuners

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by Stuart Auchterlonie

So some further analysis yields that this is a bit deeper.

Previous tickets #9825, #10519 and #12336 have added code to forcefully remove the streaming capability from MythTV's view of the device.

The real problem is that we are blindly calling either VIDIOC_STREAMON or VIDIOC_STREAMOFF when we aren't even using the device in streaming mode.

Some of the drivers will allow a STREAMOFF even when the device isn't setup for streaming, others will throw "Invalid argument" when trying to disable streaming when it's not active.

When the driver allows STREAMOFF, it will normally fail with an "Invalid argument" to the VIDIOC_STREAMON ioctl, because we never setup the require buffers in the v4lrecorder to use that mode.

See the V4L2 API: http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-streamon.html

comment:2 Changed 9 years ago by jpoet

Devin mentioned there was this kind of cruft in there. I was planning on working with him to figure it out, but have not had the time yet.

Changed 9 years ago by Stuart Auchterlonie

Disable streaming mode for all tuners

comment:3 Changed 9 years ago by Stuart Auchterlonie

See also discussion with Devin on this issue ircLogs

comment:4 Changed 8 years ago by Karl Egly

Milestone: 0.27.60.27.7

Reschedule all tickets planned for, but not solved in time for, 0.27.6 to 0.27.7.

comment:5 Changed 8 years ago by Stuart Auchterlonie

Milestone: 0.27.70.29

Bumping this to 0.29, as it requires a rethink of our device handling

comment:6 Changed 8 years ago by Stuart Auchterlonie

Milestone: 0.2929.0

Milestone renamed

comment:7 Changed 6 years ago by Stuart Auchterlonie

Milestone: 29.029.1

comment:8 Changed 6 years ago by Stuart Auchterlonie

Milestone: 29.10.28.2

Moving remaining open tickets to 0.28.2 milestone

comment:9 Changed 6 years ago by Stuart Auchterlonie

Milestone: 0.28.229.2

Moving remaining open tickets to 29.2 milestone

comment:10 Changed 2 years ago by Stuart Auchterlonie

Resolution: Trac EOL
Status: newclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] - https://github.com/MythTV/mythtv/issues

Note: See TracTickets for help on using tickets.