summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar bencollins 2003-07-17 17:33:39 +0000
committerGravatar bencollins 2003-07-17 17:33:39 +0000
commitce14ef3b9e73da3ddc62c286d1ef41637d798c6b (patch)
tree0350e9bf96858926099206134dd541374521f534
parentpkg-config support from Kristian Hogsberg. (diff)
Patch from Dan Maas to add raw1394_iso_recv_flush() call to API, using the
RAW1394_IOC_ISO_RECV_FLUSH ioctl. Updated the ieee1394-ioctl.h file aswell. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@127 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to '')
-rw-r--r--src/ieee1394-ioctl.h2
-rw-r--r--src/iso.c26
2 files changed, 25 insertions, 3 deletions
diff --git a/src/ieee1394-ioctl.h b/src/ieee1394-ioctl.h
index 1091bdf..24ef3b3 100644
--- a/src/ieee1394-ioctl.h
+++ b/src/ieee1394-ioctl.h
@@ -100,6 +100,8 @@
_IOW ('#', 0x27, struct raw1394_iso_packets)
#define RAW1394_IOC_ISO_XMIT_SYNC \
_IO ('#', 0x28)
+#define RAW1394_IOC_ISO_RECV_FLUSH \
+ _IO ('#', 0x29)
#endif /* __IEEE1394_IOCTL_H */
diff --git a/src/iso.c b/src/iso.c
index 32c0fa5..f6f18c7 100644
--- a/src/iso.c
+++ b/src/iso.c
@@ -256,7 +256,7 @@ int raw1394_iso_multichannel_recv_init(raw1394handle_t handle,
**/
int raw1394_iso_recv_listen_channel(raw1394handle_t handle, unsigned char channel)
{
- if(handle->iso_mode != ISO_RECV) {
+ if (handle->iso_mode != ISO_RECV) {
errno = EINVAL;
return -1;
}
@@ -269,7 +269,7 @@ int raw1394_iso_recv_listen_channel(raw1394handle_t handle, unsigned char channe
**/
int raw1394_iso_recv_unlisten_channel(raw1394handle_t handle, unsigned char channel)
{
- if(handle->iso_mode != ISO_RECV) {
+ if (handle->iso_mode != ISO_RECV) {
errno = EINVAL;
return -1;
}
@@ -278,6 +278,26 @@ int raw1394_iso_recv_unlisten_channel(raw1394handle_t handle, unsigned char chan
}
/**
+ * raw1394_iso_recv_flush - if you specified an irq_interval > 1 in
+ * iso_recv_init, you won't be notified for every single iso packet, but
+ * for groups of them. Now e.g. if irq_interval is 100, and you were just
+ * notified about iso packets and after them only 20 more packets arrived,
+ * no notification will be generated (20 < 100). In the case that you know
+ * that there should be more packets at this moment, you can call this
+ * function and all iso packets which are already received by the kernel
+ * will be flushed out to user space.
+ */
+int raw1394_iso_recv_flush(raw1394handle_t handle)
+{
+ if (handle->iso_mode != ISO_RECV) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(handle->fd, RAW1394_IOC_ISO_RECV_FLUSH, 0);
+}
+
+/**
* raw1394_iso_recv_set_channel_mask - listen or unlisten to a whole bunch of channels at once
* @mask: 64-bit mask of channels, 1 means listen, 0 means unlisten,
* channel 0 is LSB, channel 63 is MSB
@@ -286,7 +306,7 @@ int raw1394_iso_recv_unlisten_channel(raw1394handle_t handle, unsigned char chan
**/
int raw1394_iso_recv_set_channel_mask(raw1394handle_t handle, u_int64_t mask)
{
- if(handle->iso_mode != ISO_RECV) {
+ if (handle->iso_mode != ISO_RECV) {
errno = EINVAL;
return -1;
}
estlibraw.c?h=v2.0.1&id=22487936468d60ee02b3f7ad83506dc3a903cb2e&follow=1'>Fix compiler warnings.Gravatar bencollins 4-12/+22 2003-07-13Updates from 0.10.0 release.Gravatar bencollins 4-5/+14 2003-04-23add libtoolize to bootstrapGravatar ddennedy 1-1/+10 2003-04-21added Dan Maas' rawiso docsGravatar ddennedy 1-32/+295 2003-04-07new_handle_on_port() error path fix from Jim RadfordGravatar dmaas 1-1/+3 2003-03-26add raw1394_new_handle_on_port() convenience functionGravatar dmaas 2-1/+41 2003-02-22Updates for new rawiso ioctl interface.Gravatar bencollins 3-37/+125 2003-01-15add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 5-39/+161 2003-01-15implement tag matching for rawiso receptionGravatar dmaas 3-4/+12 2003-01-06back out previous commit - don't drop the legacy API just yetGravatar dmaas 6-173/+130 2003-01-05emulate legacy ISO reception API on top of new rawiso APIGravatar dmaas 7-131/+174 2002-12-24update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 4-123/+236 2002-12-20oops, irq_interval needs to be signedGravatar anonymous 1-1/+1 2002-12-20dmaas - renamed exported arm definitions into the raw1394_ namespace; brought...Gravatar anonymous 3-124/+48 2002-12-16rawiso updates:Gravatar dmaas 3-18/+25 2002-11-18fix cplusplus extern C blockGravatar ddennedy 1-4/+4 2002-11-18merged rawiso branchGravatar ddennedy 7-6/+488