Opened 12 years ago

Closed 12 years ago

#10519 closed Bug Report - General (Fixed)

cx8800 and V4L driver issue

Reported by: bernhart2002@… Owned by: danielk
Priority: minor Milestone: 0.25
Component: MythTV - Recording Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The cx8800 driver does not accept ioctl command VIDIOC_STREAMOFF and this causes the card to fail with eno: Invalid argument (22) . I guess the same problem exist with the bttv driver in file mythtv/mythtv/libs/libmythtv/v4lchannel.cpp

line 102

if (driver_name == "bttv")

should be

if (driver_name == "bttv"
driver_name == "cx8800")

sorry I do not know how to make a patch

Attachments (7)

10519-v1.patch (11.9 KB) - added by danielk 12 years ago.
10519-v2.patch (6.2 KB) - added by danielk 12 years ago.
Updated for latest master
mjpeg_card_setup.txt (7.3 KB) - added by bernhart2002@… 12 years ago.
mjpeg backend log
mpg2_card_setup.txt (4.2 KB) - added by bernhart2002@… 12 years ago.
mpeg 2 card setup
mpg2-vrc.txt (35.2 KB) - added by bernhart2002@… 12 years ago.
MPG2 card test with -v record,channel
grep_cx88.txt (15.3 KB) - added by bernhart2002@… 12 years ago.
grep cx88 /var/log/syslog
grep_dmesg.txt (2.0 KB) - added by bernhart2002@… 12 years ago.
grep cx88 /var/log/dmesg

Download all attachments as: .zip

Change History (21)

comment:1 Changed 12 years ago by bernhart2002@…

sorry the wiki formating changed the or

 if (driver_name == "bttv" || driver_name == "cx8800")

comment:2 Changed 12 years ago by danielk

Resolution: Fixed
Status: newclosed

Fixes #10519. Adds workaround for cx8800 driver. This card reports V4L2_CAP_STREAMING but doesn't support streaming. The bug has been reported on the #linuxtv IRC channel.

comment:3 Changed 12 years ago by danielk

Changed 12 years ago by danielk

Attachment: 10519-v1.patch added

comment:4 Changed 12 years ago by danielk

Resolution: Fixed
Status: closednew

Any chance you can test 10519-v1.patch ?

in the mythtv directory just do a

   cat 10519-v1.patch | patch -p2
   make && sudo make install

I got some clarification from mchehab in #linuxtv. Streaming is supported with the cx8800 driver, but it only works if you close the data streaming file descriptor first. This patch attempts to do that but I don't have any way to test it.

Changed 12 years ago by danielk

Attachment: 10519-v2.patch added

Updated for latest master

Changed 12 years ago by bernhart2002@…

Attachment: mjpeg_card_setup.txt added

mjpeg backend log

Changed 12 years ago by bernhart2002@…

Attachment: mpg2_card_setup.txt added

mpeg 2 card setup

comment:5 Changed 12 years ago by danielk

Thanks Bernhart, can you rerun the mpeg2 card test with "-v record,channel"

The patch doesn't address the same problem with NuppelVideoRecorder?, it only does the close/reopen in the MPEGRecorder so there is no need to test that right now.

comment:6 Changed 12 years ago by Simon Kenyon <simon@…>

10519-v2.patch fixes #9830 for me!

Happy days are here again

The skies above are clear again

So let's sing a song of cheer again

Happy days are here again

Changed 12 years ago by bernhart2002@…

Attachment: mpg2-vrc.txt added

MPG2 card test with -v record,channel

comment:7 Changed 12 years ago by bernhart2002@…

Hey I ran the test with the options you requested and have attached the log file (mpg2-vrc.txt). Please let me know if you would like to try something else

Thanks for all the help

Eric

comment:8 Changed 12 years ago by beirdo

Priority: criticalblocker

comment:9 Changed 12 years ago by danielk

Milestone: 0.25unknown
Priority: blockerminor
Status: newinfoneeded_new

Eric, from the log it looks like cx8800 doesn't advertise that it supports V4L2_CAP_STREAMING so the original patch would be unnecessary.

From what I can tell this card may not actually support MPEG-2 encoding in hardware. If you can attach the output of "grep cx88 /var/log/syslog" I can confirm this, basically when cx88-blackbird is loaded it should print a message saying that mpeg is supported.

Note: I've lowered the priority and cleared the milestone because this looks like it could simply be an unsupported device or miss-configuration based on the latest info. This doesn't mean I won't try to help if I can.

Changed 12 years ago by bernhart2002@…

Attachment: grep_cx88.txt added

grep cx88 /var/log/syslog

comment:10 Changed 12 years ago by bernhart2002@…

Hey, I've uploaded the output of grep cx88 /var/log/syslog

Also I'm good if you want to close this bug since you applied the changes to the v4l analog code that I requested which makes the card work with mythtv and the WAF is good again. However if you want to keep trying different things I don't mind helping out.

regards Eric

Changed 12 years ago by bernhart2002@…

Attachment: grep_dmesg.txt added

grep cx88 /var/log/dmesg

comment:11 Changed 12 years ago by bernhart2002@…

hey, also included the dmesg log as well.

regards,

eric

comment:12 Changed 12 years ago by Jonathan <henbit28441@…>

I am getting the same error as the original reporter with the cx23885 driver which does support V4L2_CAP_STREAMING.

Mythbackend log:http://pastebin.com/K2hLu36k

comment:13 in reply to:  12 Changed 12 years ago by Jonathan <henbit28441@…>

I just found out the cx23885 driver falsely reports V4L2_CAP_STREAMING capability. However, the workaround at the top of this ticket does not resolve the issue.

Replying to Jonathan <henbit28441@…>:

I am getting the same error as the original reporter with the cx23885 driver which does support V4L2_CAP_STREAMING.

Mythbackend log:http://pastebin.com/K2hLu36k

comment:14 Changed 12 years ago by danielk

Milestone: unknown0.25
Resolution: Fixed
Status: infoneeded_newclosed

It looks like the original issue was resolved by the V4L usage changes so I'm closing this as fixed.

Eric, the IRQ loop reported in the first syslog would seem to indicate a driver issue.

Jonathan, there is little we can do if the driver falsely reports capabilities. Please report that to the V4L devs so they can address the problem.

Note: See TracTickets for help on using tickets.