Bug 345221 - [firewire] dvgrab unable to capture any video on powerpc
Summary: [firewire] dvgrab unable to capture any video on powerpc
Alias: None
Product: Fedora
Classification: Fedora
Component: libraw1394
Version: rawhide
Hardware: powerpc
OS: Linux
Target Milestone: ---
Assignee: Jarod Wilson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-10-22 14:09 UTC by Jarod Wilson
Modified: 2007-11-30 22:12 UTC (History)
6 users (show)

Fixed In Version: libraw1394-1.3.0-3.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-10-25 01:19:44 UTC
Type: ---

Attachments (Terms of Use)

Description Jarod Wilson 2007-10-22 14:09:04 UTC
dvgrab is unable to capture any video with the new juju firewire stack, even
when run on a system with an ohci 1.1 controller that does support isochronous
I/O under this driver.

# dmesg |grep firewire
firewire_ohci: Added fw-ohci device 0002:24:0e.0, OHCI version 1.10
firewire_core: created new fw device fw0 (0 config rom retries, S800)
firewire_core: phy config: card 0, new root=ffc1, gap_count=5
firewire_core: created new fw device fw1 (0 config rom retries, S100)

# dvgrab
Found AV/C device with GUID 0x0000850000961567
""     0.00 MB 0 frames
Capture Stopped
Error: no DV

The camera does actually respond correctly to the avc start and stop commands,
and its playing video for a few seconds before dvgrab gives up.

The camera in question is ~4 year old Canon ZR45 that worked just fine with the
old firewire stack, as well as under OS X on the same machine.

Comment 1 Jarod Wilson 2007-10-22 17:13:26 UTC
Okay, I found an OHCI 1.1 PCI card. dvgrab is able to get video off it just fine
with this card in an i686 tower, so I'm wondering if this might be an endian
issue in the juju stack.

Comment 2 Jarod Wilson 2007-10-22 17:22:08 UTC
Just noticed that I do have a problem at the conclusion of the capture, which I
recall seeing reported elsewhere, in that dvgrab segfaults:

# dvgrab
Found AV/C device with GUID 0x0000850000961567
Capture Started                                                                 
"dvgrab-001.avi":    62.45 MB 518 frames timecode 00:01:22.19 date 2007.02.02
Capture Stopped                                                                 
Segmentation fault

The captured file plays back just fine though.

Comment 3 Jarod Wilson 2007-10-22 17:37:31 UTC
I was thinking of bug 331271. I'm getting a variant of the same. Differences may
be attributed to either a newer libraw1394 or dvgrab.

Comment 4 Jarod Wilson 2007-10-24 18:17:10 UTC
Definitely looking like an endian issue. I've traced the problem down into
ioctl_queue_iso() in fw-dev.c returning -EINVAL because 'u.packet.header_length
% ctx->header_size != 0' is true.

On i686, control = 0x4000200, resulting in a payload_length of 512 and a
header_length of 4. On powerpc, I'm seeing control = 0x2000004, resulting in a
payload_length of 4 and a header_length of 2 (and ctx->header_size is 4, so 2 %
4 != 0 is certainly true).

Comment 5 Stefan Richter 2007-10-24 19:32:00 UTC
Don't the kernel driver and libraw1394's juju backend agree that
include/linux/firewire-cdev.h::struct fw_cdev_iso_packet.control is CPU endian?
 Or is there an alignment problem rather than an endianess problem?

Comment 6 Jarod Wilson 2007-10-24 20:58:36 UTC
This turned out to be a problem due to an outdated juju libraw1394 that was
still using bitfields in fw_cdev_iso_packet. After updating that, I can now
capture dv on my powerbook just fine. I'll get an update together shortly...

Comment 7 Fedora Update System 2007-10-29 19:04:20 UTC
libraw1394-1.2.1-11.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.