summaryrefslogtreecommitdiffstats
path: root/src/dispatch.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add raw1394_read_cycle_timer_and_clock() APIGravatar Stefan Richter 2012-06-181-0/+16
| | | | | | | | | | | | | | | | | | | This is an extension relative to raw1394_read_cycle_timer(). It lets the client choose a system clock other than CLOCK_REALTIME. Use case: http://subversion.ffado.org/ticket/242 The underlying ioctl supports reading the system clock with nanoseconds resolution. The new libraw1394 call sticks with microseconds resolution though. This makes transition from (or parallel use with) raw1394_read_cycle_timer() easier. Besides, the call itself takes longer than a microsecond, primarily due to a costly MMIO read (on many controllers even three or more MMIO reads). Unit tests with CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW are added to testlibraw as well. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Tweak raw1394_add_config_rom_descriptor() API, add documentation and test caseGravatar Stefan Richter 2012-06-181-11/+8
| | | | | | | | | | | | | | | | | | | | To conform with 'size' arguments of other libraw1394 calls, change the one in raw1394_add_config_rom_descriptor() from quadlets to bytes. This breaks runtime compatibility with potential clients that were written against B.J.'s original patch, hence reorder arguments just to break compatibility also at compile time. Change errno to ENOSYS (function not implemented) when called while running on top of raw1394. Allow &token to be NULL for convenience of clients which don't require raw1394_remove_config_rom_descriptor(). Add exhaustive documentation. Much of it is copied from the documentation of the underlying ioctl. Add example code which doubles as unit test in testlibraw. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add raw1394_add_config_rom_descriptor() and ↵Gravatar B.J. Buchalter 2012-06-171-0/+34
| | | | | | | | | | | raw1394_remove_config_rom_descriptor() API This adds support of the firewire-core (juju) ABI to add and remove config ROM directories or descriptors. The raw1394 ABI supports similar requests, but for now we leave the two functions unimplemented when running on top of raw1394. Signed-off-by: Benjamin Buchalter <bj@mhlabs.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace changes)
* Implement raw1394_(start_)phy_packet_write() on firewire-coreGravatar Stefan Richter 2010-09-071-1/+1
| | | | | | | Requires kernel 2.6.36 or newer at runtime and linux-headers 2.6.36 or newer at build time. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Use new async stream ioctlGravatar Stefan Richter 2009-05-301-1/+1
| | | | | | | | This implements asynchronous streams on juju, i.e. enables raw1394_async_stream() and raw1394_start_async_stream() to work with the new firewire kernel stack. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Use new iso resource allocation ioctlsGravatar Stefan Richter 2009-05-301-2/+8
| | | | | | | | | | | This allows raw1394_bandwidth_modify() and raw1394_channel_modify() to work on juju without write access to the IRM's character device file. If either the build-time requirement of firewire-cdev header ABI >= v.2 or the runtime requirement of firewire-core ABI >= v.2 is not satisfied, the code falls back to transactions to the IRM as before. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* [libraw1394 patch] Unify {ieee1394,fw}_bandwidth_modify()Gravatar Stefan Richter 2008-12-031-4/+1
| | | | | | | | | | | | because they do the same. We only may want a separate fw_bandwidth_modify() in the future when firewire-core gains a special ioctl() for that. (Not runtime-tested, but it looks good to me.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* [libraw1394 patch] Fix raw1394_channel_modify() on firewire-coreGravatar Stefan Richter 2008-12-031-4/+1
| | | | | | | | | | | | | | | | | | | (juju) Reported by Adrian Knoth: fw_channel_modify() was unable to allocate some channels which were actually free. http://marc.info/?l=linux1394-devel&t=122818128900002 This can be easily fixed by replacing fw_channel_modify() by ieee1394_channel_modify() because this is highlevel enough to work with Juju as well. We only may want a separate fw_channel_modify() in the future when firewire-core gains a special ioctl() for that. Also fix a documentation typo: raw1394_channel_modify() did not show up in extracted API documentation due to a cut'n'paste typo in raw1394.h. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Reduce nesting depth in new_handle dispatchersGravatar Stefan Richter 2008-10-281-47/+49
| | | | Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Address some compiler warningsGravatar Stefan Richter 2008-10-281-2/+2
| | | | | | 7x unused variable, 1x assignment used as truth value, 1x pointer signedness Signed-off-by: Dan Dennedy <dan@dennedy.org>
* Protect against resource leaks.Gravatar Erik Hovland 2008-10-281-3/+8
| | | | | Signed-off-by: Erik Hovland <erik@hovland.org> Signed-off-by: Dan Dennedy <dan@dennedy.org>
* dispatch.c: fix a memory leak on not deleting the raw1394 wrapper handle.Gravatar Dan Dennedy 2008-07-211-1/+2
|
* Change handle validation to prevent segfault and be more informative.Gravatar Dan Dennedy 2008-07-061-50/+248
|
* Fix raw1394_read_cycle_timer after juju integrationGravatar Stefan Richter 2008-07-051-0/+11
| | | | | | | | The ieee1394 version of raw1394_read_cycle_timer() fell over the cliff in "First cut at integrating juju". This brings it back and adds a juju version of it. Also correct a typo in the inline documentation: s/get/read/
* Move the source code files in the juju directory into the src directory andGravatar Dan Dennedy 2008-04-301-1/+1
| | | | give them 'fw' names instead of 'juju.'
* First cut at integrating jujuGravatar Dan Dennedy 2008-04-231-0/+545
This is currently working with legacy ieee1394 and tools/testlibraw.