summaryrefslogtreecommitdiffstats
path: root/src/kernel-raw1394.h
diff options
context:
space:
mode:
authorGravatar ddennedy 2002-11-18 07:40:21 +0000
committerGravatar ddennedy 2002-11-18 07:40:21 +0000
commitb9de121a85abef26f07da8d55530964eb9797f17 (patch)
tree7321424534f5afcc1cf3671a9afff9dc567aa443 /src/kernel-raw1394.h
parentadded missing arm.c from weihs branch (diff)
merged rawiso branch
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@93 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src/kernel-raw1394.h')
-rw-r--r--src/kernel-raw1394.h70
1 files changed, 69 insertions, 1 deletions
diff --git a/src/kernel-raw1394.h b/src/kernel-raw1394.h
index 1fe55d0..c6e5c59 100644
--- a/src/kernel-raw1394.h
+++ b/src/kernel-raw1394.h
@@ -40,6 +40,7 @@
#define RAW1394_REQ_ISO_RECEIVE 10001
#define RAW1394_REQ_FCP_REQUEST 10002
#define RAW1394_REQ_ARM 10003
+#define RAW1394_REQ_RAWISO_ACTIVITY 10004
/* error codes */
#define RAW1394_ERROR_NONE 0
@@ -118,6 +119,64 @@ typedef struct arm_request_response {
*/
+/* rawiso API */
+
+/* ioctls */
+#define RAW1394_ISO_XMIT_INIT 1 /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_RECV_INIT 2 /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_RECV_START 3 /* arg: int, starting cycle */
+#define RAW1394_ISO_XMIT_START 8 /* arg: int[2], { starting cycle, prebuffer } */
+#define RAW1394_ISO_STOP 4
+#define RAW1394_ISO_GET_STATUS 5 /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_PRODUCE_CONSUME 6 /* arg: int, # of packets */
+#define RAW1394_ISO_SHUTDOWN 7
+
+/* per-packet metadata embedded in the ringbuffer */
+/* must be identical to hpsb_iso_packet_info in iso.h! */
+struct raw1394_iso_packet_info {
+ unsigned short len;
+ unsigned short cycle;
+ unsigned char channel; /* recv only */
+ unsigned char tag;
+ unsigned char sy;
+};
+
+struct raw1394_iso_config {
+ unsigned int buf_packets;
+ unsigned int max_packet_size;
+ int channel;
+ int speed; /* xmit only */
+ int irq_interval;
+};
+
+/* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */
+struct raw1394_iso_status {
+ /* current settings */
+ struct raw1394_iso_config config;
+
+ /* byte offset between successive packets in the buffer */
+ int buf_stride;
+
+ /* byte offset of data payload within each packet */
+ int packet_data_offset;
+
+ /* byte offset of struct iso_packet_info within each packet */
+ int packet_info_offset;
+
+ /* index of next packet to fill with data (ISO transmission)
+ or next packet containing data recieved (ISO reception) */
+ unsigned int first_packet;
+
+ /* number of packets waiting to be filled with data (ISO transmission)
+ or containing data received (ISO reception) */
+ unsigned int n_packets;
+
+ /* approximate number of packets dropped due to overflow or
+ underflow of the packet buffer (a value of zero guarantees
+ that no packets have been dropped) */
+ unsigned int overflows;
+};
+
#ifdef __KERNEL__
struct iso_block_store {
@@ -126,6 +185,10 @@ struct iso_block_store {
quadlet_t data[0];
};
+enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0,
+ RAW1394_ISO_RECV = 1,
+ RAW1394_ISO_XMIT = 2 };
+
struct file_info {
struct list_head list;
@@ -144,11 +207,16 @@ struct file_info {
u8 *fcp_buffer;
+ /* old ISO API */
u64 listen_channels;
quadlet_t *iso_buffer;
size_t iso_buffer_length;
u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
+
+ /* new rawiso API */
+ enum raw1394_iso_state iso_state;
+ struct hpsb_iso *iso_handle;
};
struct arm_addr {
@@ -166,7 +234,7 @@ struct pending_request {
struct list_head list;
struct file_info *file_info;
struct hpsb_packet *packet;
- struct tq_struct tq;
+/* struct tq_struct tq; */
struct iso_block_store *ibs;
quadlet_t *data;
int free_data;