From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 16 11:08:18 2006 Return-Path: X-Original-To: freebsd-firewire@FreeBSD.org Delivered-To: freebsd-firewire@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19A1F16A403 for ; Mon, 16 Oct 2006 11:08:18 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BADD043D5D for ; Mon, 16 Oct 2006 11:08:17 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9GB8HaM028119 for ; Mon, 16 Oct 2006 11:08:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9GB8Gu3028115 for freebsd-firewire@FreeBSD.org; Mon, 16 Oct 2006 11:08:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 16 Oct 2006 11:08:16 GMT Message-Id: <200610161108.k9GB8Gu3028115@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-firewire@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2006 11:08:18 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/74238 firewire [firewire] fw_rcv: unknown response; firewire ad-hoc w o kern/85434 firewire [fwip] fwip (IP over firewire) doesn't work with polli 2 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/95077 firewire [firewire] fatal trap 19 at fwohci_pci_init 1 problem total. From owner-freebsd-firewire@FreeBSD.ORG Mon Oct 16 18:29:21 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC35D16A4AB for ; Mon, 16 Oct 2006 18:29:21 +0000 (UTC) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62F4543E9C for ; Mon, 16 Oct 2006 18:25:21 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from [172.21.130.86] (mx-broadway [38.98.68.18]) by corbulon.video-collage.com (8.13.6/8.13.6) with ESMTP id k9GIP837087367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Oct 2006 14:25:08 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Buzz Slye Date: Mon, 16 Oct 2006 14:25:02 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200610161425.03096.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV 0.88.4/2036/Mon Oct 16 10:21:32 2006 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: firewire@freebsd.org Subject: Re: Libraw1394 on FreeBSD X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2006 18:29:22 -0000 середа 11 жовтень 2006 12:57, Buzz Slye написав: > However, the Linux libraw1394 should be completely scrapped as the ioctl's > and underlying support are completely different. Main.c, iso.c, and > readwrite.c must be rewritten. Hi, Buzz! So, do I need to wait for your reimplementations of main.c and readwrite.c (in addition to the iso.c, which you already sent), or is iso.c the only thing that needs to be replaced for the port? Also, would you have a sample client-application to do some basic testing? Thanks! -mi From owner-freebsd-firewire@FreeBSD.ORG Tue Oct 17 04:34:09 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA88816A407 for ; Tue, 17 Oct 2006 04:34:09 +0000 (UTC) (envelope-from mi+kde@aldan.algebra.com) Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EFBB43D5A for ; Tue, 17 Oct 2006 04:33:57 +0000 (GMT) (envelope-from mi+kde@aldan.algebra.com) Received: from aldan.algebra.com (aldan [127.0.0.1]) by aldan.algebra.com (8.13.8/8.13.7) with ESMTP id k9H4XvGK021252 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Oct 2006 00:33:57 -0400 (EDT) (envelope-from mi+kde@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by aldan.algebra.com (8.13.8/8.13.7/Submit) id k9H4XuJQ021251; Tue, 17 Oct 2006 00:33:56 -0400 (EDT) (envelope-from mi+kde@aldan.algebra.com) From: Mikhail Teterin To: Buzz Slye Date: Tue, 17 Oct 2006 00:33:56 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7whJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" Cc: firewire@freebsd.org Subject: Re: Libraw1394 on FreeBSD X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2006 04:34:09 -0000 --Boundary-00=_00FNF57AcVBly5v Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 11 October 2006 12:57, Buzz Slye wrote: = Following is an example of iso.c. Unfortunately, the example is not enough even for the libraw's own testlibraw utility: cc -O2 -fno-strict-aliasing -pipe -march=opteron -o .libs/testlibraw testlibraw.o ../src/.libs/libraw1394.so -Wl,--rpath -Wl,/opt/lib ../src/.libs/libraw1394.so: undefined reference to `_raw1394_iso_iterate' ../src/.libs/libraw1394.so: undefined reference to `raw1394_iso_shutdown' ../src/.libs/libraw1394.so: undefined reference to `_dc1394_video_iso_handler' gmake: *** [testlibraw] Error 1 Other tools, that come with the library complain about more symbols: cc -O2 -fno-strict-aliasing -pipe -march=opteron -o .libs/sendiso sendiso.o ../src/.libs/libraw1394.so -Wl,--rpath -Wl,/opt/lib sendiso.o(.text+0x38e): In function `send_file_once': : undefined reference to `raw1394_iso_xmit_write' sendiso.o(.text+0x3c2): In function `send_file_once': : undefined reference to `raw1394_iso_xmit_init' sendiso.o(.text+0x3d5): In function `send_file_once': : undefined reference to `raw1394_iso_xmit_start' sendiso.o(.text+0x62e): In function `main': : undefined reference to `raw1394_iso_shutdown' ../src/.libs/libraw1394.so: undefined reference to `_raw1394_iso_iterate' ../src/.libs/libraw1394.so: undefined reference to `_dc1394_video_iso_handler' gmake: *** [sendiso] Error 1 and cc -O2 -fno-strict-aliasing -pipe -march=opteron -o .libs/dumpiso dumpiso.o ../src/.libs/libraw1394.so -Wl,--rpath -Wl,/opt/lib dumpiso.o(.text+0x615): In function `main': : undefined reference to `raw1394_iso_recv_init' dumpiso.o(.text+0x62b): In function `main': : undefined reference to `raw1394_iso_recv_start' dumpiso.o(.text+0x651): In function `main': : undefined reference to `raw1394_iso_shutdown' dumpiso.o(.text+0x67e): In function `main': : undefined reference to `raw1394_iso_multichannel_recv_init' dumpiso.o(.text+0x68d): In function `main': : undefined reference to `raw1394_iso_recv_set_channel_mask' ../src/.libs/libraw1394.so: undefined reference to `_raw1394_iso_iterate' ../src/.libs/libraw1394.so: undefined reference to `_dc1394_video_iso_handler' gmake: *** [dumpiso] Error 1 Robert, if you plan to complete the functionality any time soon, you can use the attached port-skeleton -- just put your version of iso.c into files/. I'll be happy to finish off the port, once the library is complete enough for its own tools to link and (even if "almost") work, and take care of PLIST, etc. If you can't get to this, please, state so. I'm afraid, there is a misconception, that there is nothing left to do here... :-) Thanks a lot! Yours, -mi --Boundary-00=_00FNF57AcVBly5v Content-Type: text/plain; charset="koi8-u"; name="libraw1394.shar" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libraw1394.shar" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # libraw1394 # libraw1394/Makefile # libraw1394/distinfo # libraw1394/files # libraw1394/files/patch-types # libraw1394/files/patch-eventloop # libraw1394/files/patch-errors # libraw1394/files/patch-iso # libraw1394/files/iso.c # echo c - libraw1394 mkdir -p libraw1394 > /dev/null 2>&1 echo x - libraw1394/Makefile sed 's/^X//' >libraw1394/Makefile << 'END-of-libraw1394/Makefile' XPORTNAME= libraw1394 XPORTVERSION= 1.2.1 XMASTER_SITES= http://www.linux1394.org/dl/ XCATEGORIES= devel multimedia X XCOMMENT= Linux' API for direct access to the IEEE 1394 bus X XGNU_CONFIGURE= yes X Xpost-patch: X ${MV} ${WRKSRC}/src/ieee1394-ioctl.h ${WRKSRC}/src/ieee1394-ioctl.h.org X ${ECHO_MSG} '/* Meow-meow */' > ${WRKSRC}/src/ieee1394-ioctl.h X Xpost-configure: X ${MV} ${WRKSRC}/src/iso.c ${WRKSRC}/src/iso.c.orig X ${LN} -s ${FILESDIR}/iso.c ${WRKSRC}/src/ X X.include END-of-libraw1394/Makefile echo x - libraw1394/distinfo sed 's/^X//' >libraw1394/distinfo << 'END-of-libraw1394/distinfo' XMD5 (libraw1394-1.2.1.tar.gz) = e6210ff05b7f4ec0401ad3d11f493e1a XSHA256 (libraw1394-1.2.1.tar.gz) = 13381fb2ea63e6ee428d49c7f6679755a2c331f82afc19522794d11943bcab52 XSIZE (libraw1394-1.2.1.tar.gz) = 382992 END-of-libraw1394/distinfo echo c - libraw1394/files mkdir -p libraw1394/files > /dev/null 2>&1 echo x - libraw1394/files/patch-types sed 's/^X//' >libraw1394/files/patch-types << 'END-of-libraw1394/files/patch-types' X--- src/kernel-raw1394.h Fri Nov 5 19:26:44 2004 X+++ src/kernel-raw1394.h Mon Oct 9 13:40:37 2006 X@@ -73,43 +73,43 @@ X #define RAW1394_NOTIFY_ON 1 X X-#include X+#include X X struct raw1394_request { X- __u32 type; X- __s32 error; X- __u32 misc; X+ uint32_t type; X+ int32_t error; X+ uint32_t misc; X X- __u32 generation; X- __u32 length; X+ uint32_t generation; X+ uint32_t length; X X- __u64 address; X+ uint64_t address; X X- __u64 tag; X+ uint64_t tag; X X- __u64 sendb; X- __u64 recvb; X+ uint64_t sendb; X+ uint64_t recvb; X }; X X struct raw1394_khost_list { X- __u32 nodes; X- __u8 name[32]; X+ uint32_t nodes; X+ uint8_t name[32]; X }; X X typedef struct arm_request { X- __u16 destination_nodeid; X- __u16 source_nodeid; X- __u64 destination_offset; X- __u8 tlabel; X- __u8 tcode; X- __u8 extended_transaction_code; X- __u32 generation; X- __u16 buffer_length; X- __u8 *buffer; X+ uint16_t destination_nodeid; X+ uint16_t source_nodeid; X+ uint64_t destination_offset; X+ uint8_t tlabel; X+ uint8_t tcode; X+ uint8_t extended_transaction_code; X+ uint32_t generation; X+ uint16_t buffer_length; X+ uint8_t *buffer; X } *arm_request_t; X X typedef struct arm_response { X- __s32 response_code; X- __u16 buffer_length; X- __u8 *buffer; X+ int32_t response_code; X+ uint16_t buffer_length; X+ uint8_t *buffer; X } *arm_response_t; X X@@ -125,15 +125,15 @@ X /* must be identical to hpsb_iso_packet_info in iso.h! */ X struct raw1394_iso_packet_info { X- __u32 offset; X- __u16 len; X- __u16 cycle; /* recv only */ X- __u8 channel; /* recv only */ X- __u8 tag; X- __u8 sy; X+ uint32_t offset; X+ uint16_t len; X+ uint16_t cycle; /* recv only */ X+ uint8_t channel; /* recv only */ X+ uint8_t tag; X+ uint8_t sy; X }; X X /* argument for RAW1394_ISO_RECV/XMIT_PACKETS ioctls */ X struct raw1394_iso_packets { X- __u32 n_packets; X+ uint32_t n_packets; X struct raw1394_iso_packet_info *infos; X }; X@@ -141,20 +141,20 @@ X struct raw1394_iso_config { X /* size of packet data buffer, in bytes (will be rounded up to PAGE_SIZE) */ X- __u32 data_buf_size; X+ uint32_t data_buf_size; X X /* # of packets to buffer */ X- __u32 buf_packets; X+ uint32_t buf_packets; X X /* iso channel (set to -1 for multi-channel recv) */ X- __s32 channel; X+ int32_t channel; X X /* xmit only - iso transmission speed */ X- __u8 speed; X+ uint8_t speed; X X /* The mode of the dma when receiving iso data. Must be supported by chip */ X- __u8 dma_mode; X+ uint8_t dma_mode; X X /* max. latency of buffer, in packets (-1 if you don't care) */ X- __s32 irq_interval; X+ int32_t irq_interval; X }; X X@@ -166,14 +166,14 @@ X /* number of packets waiting to be filled with data (ISO transmission) X or containing data received (ISO reception) */ X- __u32 n_packets; X+ uint32_t n_packets; X X /* approximate number of packets dropped due to overflow or X underflow of the packet buffer (a value of zero guarantees X that no packets have been dropped) */ X- __u32 overflows; X+ uint32_t overflows; X X /* cycle number at which next packet will be transmitted; X -1 if not known */ X- __s16 xmit_cycle; X+ int16_t xmit_cycle; X }; X X--- src/raw1394_private.h Wed Feb 16 10:49:49 2005 X+++ src/raw1394_private.h Mon Oct 9 13:44:29 2006 X@@ -57,11 +57,6 @@ X #define CLEAR_REQ(reqp) memset((reqp), 0, sizeof(struct raw1394_request)) X X-#if SIZEOF_VOID_P == 4 X-#define int2ptr(x) ((void *)(__u32)x) X-#define ptr2int(x) ((__u64)(__u32)x) X-#else X-#define int2ptr(x) ((void *)x) X-#define ptr2int(x) ((__u64)x) X-#endif X+#define int2ptr(x) ((void *)(uintptr_t)x) X+#define ptr2int(x) ((uintptr_t)x) X X #endif /* _RAW1394_PRIVATE_H */ X--- src/readwrite.c Wed Nov 10 18:39:00 2004 X+++ src/readwrite.c Mon Oct 9 14:01:28 2006 X@@ -44,5 +44,5 @@ X req.tag = tag; X X- req.address = ((__u64)node << 48) | addr; X+ req.address = ((uint64_t)node << 48) | addr; X req.length = length; X req.recvb = ptr2int(buffer); X@@ -64,5 +64,5 @@ X req.tag = tag; X X- req.address = ((__u64)node << 48) | addr; X+ req.address = ((uint64_t)node << 48) | addr; X req.length = length; X req.sendb = ptr2int(data); X@@ -90,5 +90,5 @@ X req.tag = tag; X X- req.address = ((__u64)node << 48) | addr; X+ req.address = ((uint64_t)node << 48) | addr; X req.sendb = ptr2int(sendbuf); X req.recvb = ptr2int(result); X@@ -128,5 +128,5 @@ X req.tag = tag; X X- req.address = ((__u64)node << 48) | addr; X+ req.address = ((uint64_t)node << 48) | addr; X req.sendb = ptr2int(sendbuf); X req.recvb = ptr2int(result); X@@ -163,5 +163,5 @@ X req.tag = rawtag; X X- req.address = ((__u64)channel << 48) | speed; X+ req.address = ((uint64_t)channel << 48) | speed; X req.misc = (tag << 16) | sy; X req.length = length; X@@ -185,5 +185,5 @@ X req.tag = rawtag; X X- req.address = ((__u64)channel << 48) | speed; X+ req.address = ((uint64_t)channel << 48) | speed; X req.misc = (tag << 16) | sy; X req.length = length; END-of-libraw1394/files/patch-types echo x - libraw1394/files/patch-eventloop sed 's/^X//' >libraw1394/files/patch-eventloop << 'END-of-libraw1394/files/patch-eventloop' X--- src/eventloop.c Sat Apr 8 22:29:54 2006 X+++ src/eventloop.c Mon Oct 9 13:54:59 2006 X@@ -21,5 +21,5 @@ X #include X #include X-#include X+#include X X #include "raw1394.h" X@@ -57,5 +57,5 @@ X channel = (handle->buffer[0] >> 8) & 0x3f; X #ifndef WORDS_BIGENDIAN X- handle->buffer[0] = bswap_32(handle->buffer[0]); X+ handle->buffer[0] = bswap32(handle->buffer[0]); X #endif X END-of-libraw1394/files/patch-eventloop echo x - libraw1394/files/patch-errors sed 's/^X//' >libraw1394/files/patch-errors << 'END-of-libraw1394/files/patch-errors' X--- src/errors.c Wed Nov 10 18:53:05 2004 X+++ src/errors.c Mon Oct 9 14:00:19 2006 X@@ -39,5 +39,9 @@ X 0xdead, X 0xdead, X+#ifdef EREMOTEIO X EREMOTEIO, /* ack_data_error */ X+#else X+ EIO, X+#endif X EPERM, /* ack_type_error */ X 0xdead /* invalid ack code */ X@@ -49,5 +53,9 @@ X 0xdead, X EAGAIN, /* rcode_conflict_error */ X+#ifdef EREMOTEIO X EREMOTEIO, /* rcode_data_error */ X+#else X+ EIO, X+#endif X EPERM, /* rcode_type_error */ X EINVAL, /* rcode_address_error */ END-of-libraw1394/files/patch-errors echo x - libraw1394/files/patch-iso sed 's/^X//' >libraw1394/files/patch-iso << 'END-of-libraw1394/files/patch-iso' X--- src/iso.c Sat Apr 8 22:02:31 2006 X+++ src/iso.c Mon Oct 9 14:17:43 2006 X@@ -17,5 +17,5 @@ X #include X #include X-#include X+#include X X #include "raw1394.h" END-of-libraw1394/files/patch-iso echo x - libraw1394/files/iso.c sed 's/^X//' >libraw1394/files/iso.c << 'END-of-libraw1394/files/iso.c' X/* X * libraw1394 - library for raw access to the 1394 bus with the Linux subsystem. X * X * Copyright (C) 1999,2000,2001,2002 Andreas Bombe X * new ISO API by Dan Maas X * X * This library is licensed under the GNU Lesser General Public License (LGPL), X * version 2.1 or later. See the file COPYING.LIB in the distribution for X * details. X * X * Rewritten for FreeBSD - R E Slye - 6/23/04 X * Most of the original code for Linux is not supported and is deleted. X * This code may be used for receiving the iso stream download of a single X * image from a digital camera. Stream xmit is not supported. X */ X X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X X#include "raw1394.h" X#include "kernel-raw1394.h" X#include "raw1394_private.h" X Xextern int X_dc1394_video_iso_handler(raw1394handle_t handle, X int channel, size_t length, quadlet_t *data); X X/** X * raw1394_start_iso_rcv - enable isochronous receiving X * @channel: channel number to start receiving on X * X * Enables the reception of isochronous packets in @channel on @handle. X * Isochronous packets are then passed to the callback specified with X * _dc1394_video_iso_handler(). X **/ Xint Xraw1394_start_iso_rcv(struct raw1394_handle *handle, unsigned int channel) X{ X int size, rc; X quadlet_t fwbuf[1026]; X X while (1) X { X if ((size = read(handle->fd, fwbuf, sizeof(fwbuf))) < 0) X { X printf(" rv = %d errno = %d\n", size, errno); X return (-1); X } X rc = _dc1394_video_iso_handler(handle, channel, size, fwbuf); X if (rc < 0) X return (-1); X else if (rc > 0) X break; X } X X return 0; X} X X/** X * raw1394_stop_iso_rcv - stop isochronous receiving X * @channel: channel to stop receiving on X * X * Stops the reception of isochronous packets in @channel on @handle. X **/ Xint Xraw1394_stop_iso_rcv(struct raw1394_handle *handle, unsigned int channel) X{ X /* I don't know how to stop receiving on channel */ X X return 0; X} END-of-libraw1394/files/iso.c exit --Boundary-00=_00FNF57AcVBly5v-- From owner-freebsd-firewire@FreeBSD.ORG Wed Oct 18 20:10:32 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A93C16A4EF for ; Wed, 18 Oct 2006 20:10:32 +0000 (UTC) (envelope-from buzz@gaia.arc.nasa.gov) Received: from gaia.arc.nasa.gov (gaia.arc.nasa.gov [143.232.155.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id A406243DBC for ; Wed, 18 Oct 2006 20:08:43 +0000 (GMT) (envelope-from buzz@gaia.arc.nasa.gov) Received: from tioga.arc.nasa.gov (tioga.arc.nasa.gov [143.232.155.66]) by gaia.arc.nasa.gov (8.13.8/8.12.10) with ESMTP id k9IK8Hup003268; Wed, 18 Oct 2006 13:08:17 -0700 (PDT) Date: Wed, 18 Oct 2006 13:08:10 -0700 (PDT) From: Buzz Slye X-X-Sender: buzz@tioga.arc.nasa.gov To: bms@incunabulum.net Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: firewire@freebsd.org, mi+kde@aldan.algebra.com Subject: libraw1394 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 20:10:32 -0000 Hello I'm not sure if or when I can release the FreeBSD version of libraw1394. Since it was written at government expense, it must be cleared through NASA Export control. Meanwhile please note the following: This library was written to conform to an older version of libdc1394. The latest version of libdc1394, I have discovered, has many routine name changes so there will require some reallignment and cleanup. You don't need references to raw1394_iso_recv_init, etc., etc., they don't exist. All the setup stuff is handled by the Firewire Kernel module which was written by Kobayashi and Shinokawa (Copyright 1998-2002). I suggest you forget the API and use a simpler makefile, e.g., # Makefile for libraw1394 # all: main.o readwrite.o iso.o rm -f libfraw.a ar -r libfraw.a main.o readwrite.o iso.o ranlib libfraw.a .c.o: gcc -c -O2 -Wall $< This code does not support multiple cameras. Asychronous tramsmissions only support quadlet (4 byte) read/write for reading and writing camera registers. Our applications mostly use cameras to take single images at timed intervals. If you will be using stream transfer, you may want to change the buffering setup. Buzz Slye NASA/Ames Research Center Moffett Field CA 94035 From owner-freebsd-firewire@FreeBSD.ORG Wed Oct 18 20:43:42 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2BFF16A40F for ; Wed, 18 Oct 2006 20:43:42 +0000 (UTC) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 602FE43D72 for ; Wed, 18 Oct 2006 20:43:41 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from [172.21.130.86] (mx-broadway [38.98.68.18]) by corbulon.video-collage.com (8.13.6/8.13.6) with ESMTP id k9IKhd19025706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Oct 2006 16:43:39 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Buzz Slye Date: Wed, 18 Oct 2006 16:36:11 -0400 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200610181636.12516.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV 0.88.4/2041/Wed Oct 18 02:29:52 2006 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: bms@incunabulum.net, firewire@freebsd.org Subject: Re: libraw1394 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 20:43:43 -0000 середа 18 жовтень 2006 16:08, Buzz Slye написав: > I'm not sure if or when I can release the FreeBSD version of libraw1394. > Since it was written at government expense, it must be cleared through > NASA Export control. Wow... Well, if you need a Freedom Of Information request filed for that, let me know :-) > Meanwhile please note the following: > > This library was written to conform to an older version of libdc1394. > The latest version of libdc1394, I have discovered, has many routine > name changes so there will require some reallignment and cleanup. Yeah, I figured that out... It seems, however, you understand how Linux' ioctls should be translated to FreeBSD's ioctls and other system calls (read, write?). Would you be able to help with the reallignments and cleanups? > You don't need references to raw1394_iso_recv_init, etc., etc., they > don't exist. All the setup stuff is handled by the Firewire Kernel > module which was written by Kobayashi and Shinokawa (Copyright 1998-2002). Right, they don't exist. But libraw1394's own little client utilities call them, and so, likely, will some other clients of the library. This means, our port will need to provide these functions, even if they are going to be simple wrappers around system calls... > I suggest you forget the API and use a simpler makefile, e.g., > > # Makefile for libraw1394 > # > all: main.o readwrite.o iso.o > rm -f libfraw.a > ar -r libfraw.a main.o readwrite.o iso.o > ranlib libfraw.a > > .c.o: > gcc -c -O2 -Wall $< Thanks, I'm thinking about it too. My Makefile will be using bsd.lib.mk, of course :-) > This code does not support multiple cameras. If the Linux code does, and the FreeBSD kernel code does, the port will have to as well... > Asychronous tramsmissions only support quadlet (4 byte) read/write for > reading and writing camera registers. > > Our applications mostly use cameras to take single images at timed > intervals. If you will be using stream transfer, you may want to > change the buffering setup. Buzz, I have NO IDEA how to do this :-( I can put the port together, but the firewire details are not my thing. I just want it to work, so I can: a) transfer my own videos from Sony's HDV camera; b) get back to porting cinelerra, which uses libraw1394. This is why I contacted the FreeBSD firewire module authors and this mailing list -- looking for help... Thanks! -mi From owner-freebsd-firewire@FreeBSD.ORG Wed Oct 18 21:31:38 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C2F716A407 for ; Wed, 18 Oct 2006 21:31:38 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 074DD43D92 for ; Wed, 18 Oct 2006 21:31:23 +0000 (GMT) (envelope-from bms@incunabulum.net) Received: from db2.internal (db2.internal [10.202.2.12]) by frontend1.messagingengine.com (Postfix) with ESMTP id 6B5F5DB5D77; Wed, 18 Oct 2006 17:31:22 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by db2.internal (MEProxy); Wed, 18 Oct 2006 17:31:25 -0400 X-Sasl-enc: 4YXCpfnrfieyllt+fcJErys7S8AwVDvLqCaNQ0vi91QT 1161207084 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id 3AE817532; Wed, 18 Oct 2006 17:31:22 -0400 (EDT) Message-ID: <45369D26.6060807@incunabulum.net> Date: Wed, 18 Oct 2006 22:31:18 +0100 From: Bruce M Simpson User-Agent: Thunderbird 1.5.0.5 (X11/20060825) MIME-Version: 1.0 To: Mikhail Teterin References: <200610181636.12516.mi+mx@aldan.algebra.com> In-Reply-To: <200610181636.12516.mi+mx@aldan.algebra.com> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: quoted-printable Cc: firewire@freebsd.org Subject: Re: libraw1394 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 21:31:38 -0000 Hi all, Mikhail Teterin wrote: > =D3=C5=D2=C5=C4=C1 18 =D6=CF=D7=D4=C5=CE=D8 2006 16:08, Buzz Slye =CE=C1= =D0=C9=D3=C1=D7: > =20 >> This library was written to conform to an older version of libdc1394. >> The latest version of libdc1394, I have discovered, has many routine >> name changes so there will require some reallignment and cleanup. >> =20 > > Yeah, I figured that out... It seems, however, you understand how Linux= '=20 > ioctls should be translated to FreeBSD's ioctls and other system calls = (read,=20 > write?). Would you be able to help with the reallignments and cleanups?= > =20 From what I understand, Buzz's port does not deal with isochronous=20 streams. There is a rough mapping of Linux raw1394 APIs to=20 firewire(4)'s, based on code inspection, although they are not=20 documented in the FreeBSD man pages. > Right, they don't exist. But libraw1394's own little client utilities c= all=20 > them, and so, likely, will some other clients of the library. This mean= s, our=20 > port will need to provide these functions, even if they are going to be= =20 > simple wrappers around system calls... > =20 It looks like a kqueue event pump will be needed to emulate libraw1394's = callback semantics. > =20 > Thanks, I'm thinking about it too. My Makefile will be using bsd.lib.mk= , of=20 > course :-) > =20 That would reduce the chances of having the patches taken upstream given = the makefile churn. > =20 >> This code does not support multiple cameras. >> =20 > > If the Linux code does, and the FreeBSD kernel code does, the port will= have=20 > to as well... > =20 It looks like a mapping of /dev/raw1394 -> /dev/fwN.N should work; vlc=20 in particular allows you to specify the device used, though I'm not sure = if this is passed down to libraw1394 -- haven't looked that far yet. >> Asychronous tramsmissions only support quadlet (4 byte) read/write for= >> reading and writing camera registers. >> >> Our applications mostly use cameras to take single images at timed >> intervals. If you will be using stream transfer, you may want to >> change the buffering setup. >> =20 spook is going to require isochronous streaming. > > Buzz, I have NO IDEA how to do this :-( I can put the port together, bu= t the=20 > firewire details are not my thing. I just want it to work, so I can: > > a) transfer my own videos from Sony's HDV camera; > =20 This is going to need libavc1394. libraw1394 is certainly a prerequisite.= Regards, BMS From owner-freebsd-firewire@FreeBSD.ORG Wed Oct 18 21:58:09 2006 Return-Path: X-Original-To: firewire@freebsd.org Delivered-To: freebsd-firewire@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D57B16A403 for ; Wed, 18 Oct 2006 21:58:09 +0000 (UTC) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC30C43D4C for ; Wed, 18 Oct 2006 21:58:08 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from [172.21.130.86] (mx-broadway [38.98.68.18]) by corbulon.video-collage.com (8.13.6/8.13.6) with ESMTP id k9ILw76Z027509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Oct 2006 17:58:07 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Bruce M Simpson Date: Wed, 18 Oct 2006 17:58:01 -0400 User-Agent: KMail/1.9.1 References: <200610181636.12516.mi+mx@aldan.algebra.com> <45369D26.6060807@incunabulum.net> In-Reply-To: <45369D26.6060807@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200610181758.01905.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV 0.88.4/2041/Wed Oct 18 02:29:52 2006 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: firewire@freebsd.org Subject: Re: libraw1394 X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 21:58:09 -0000 середа 18 жовтень 2006 17:31, Bruce M Simpson написав: > From what I understand, Buzz's port does not deal with isochronous > streams. There is a rough mapping of Linux raw1394 APIs to > firewire(4)'s, based on code inspection, although they are not > documented in the FreeBSD man pages. BTW, we would, eventually, need to support Linux' ioctls as well, to allow Linux executables to access firewire directly. We already do this for some hardware (RAID storage-controllers, for example)... > > Thanks, I'm thinking about it too. My Makefile will be using bsd.lib.mk, > > of course :-) > That would reduce the chances of having the patches taken upstream given > the makefile churn. I'm willing to maintain our Makefile, if that means, the port can be built cleanly and without libtool. I don't think, we'll be bothering upstream with the patches to Makefile one way or the other :-) Thanks again to both of you! I look forward to the usable libraw1394... -mi