summaryrefslogtreecommitdiffstats
path: root/src/fw.h
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2012-06-18 01:19:54 +0200
committerGravatar Stefan Richter 2012-06-18 01:53:32 +0200
commit5b4cffe9d7b515d807874da48c6a149edc37a99b (patch)
tree07aa5bc3df3617e8caeaae59ba2f68fa35e0619e /src/fw.h
parentTweak raw1394_add_config_rom_descriptor() API, add documentation and test case (diff)
Add raw1394_read_cycle_timer_and_clock() API
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>
Diffstat (limited to 'src/fw.h')
-rw-r--r--src/fw.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fw.h b/src/fw.h
index cb1df01..4fd660f 100644
--- a/src/fw.h
+++ b/src/fw.h
@@ -251,7 +251,9 @@ int fw_iso_recv_unlisten_channel(fw_handle_t handle,
int fw_iso_recv_set_channel_mask(fw_handle_t handle, u_int64_t mask);
void fw_iso_stop(fw_handle_t handle);
void fw_iso_shutdown(fw_handle_t handle);
-int fw_read_cycle_timer(fw_handle_t handle,
- u_int32_t *cycle_timer, u_int64_t *local_time);
+int fw_read_cycle_timer(fw_handle_t handle, u_int32_t *cycle_timer,
+ u_int64_t *local_time);
+int fw_read_cycle_timer_and_clock(fw_handle_t handle, u_int32_t *cycle_timer,
+ u_int64_t *local_time, clockid_t clk_id);
#endif