aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-07-17 18:27:14 +0900
committer坂本 貴史 <o-takashi@sakamocchi.jp>2023-07-17 22:49:46 +0900
commitd185faa9e19cfe1c35e37b799141f93af0b92640 (patch)
treeac5557543835c45594e81bd4ccab284843ae5886
parenta32b1bff36e517184bcaa33bb51d9c8d88d38282 (diff)
downloadlibhinoko-d185faa9e19cfe1c35e37b799141f93af0b92640.tar.gz
fw_iso_ctx: drop Hinoko.FwIsoCtx.get_cycle_timer()
Hinoko.FwIsoCtx.read_cycle_time() is obsoleted by Hinoko.FwIsoCtx.get_cycle_timer(). Let us delete it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--src/fw_iso_ctx.c25
-rw-r--r--src/fw_iso_ctx.h21
-rw-r--r--src/fw_iso_ctx_private.c33
-rw-r--r--src/fw_iso_ctx_private.h3
-rw-r--r--src/fw_iso_ir_multiple.c15
-rw-r--r--src/fw_iso_ir_single.c15
-rw-r--r--src/fw_iso_it.c15
-rw-r--r--src/hinoko.map1
-rw-r--r--tests/fw-iso-ctx2
-rwxr-xr-xtests/fw-iso-ir-multiple2
-rwxr-xr-xtests/fw-iso-ir-single2
-rwxr-xr-xtests/fw-iso-it2
12 files changed, 0 insertions, 136 deletions
diff --git a/src/fw_iso_ctx.c b/src/fw_iso_ctx.c
index eef0c5e..42df6c9 100644
--- a/src/fw_iso_ctx.c
+++ b/src/fw_iso_ctx.c
@@ -135,31 +135,6 @@ gboolean hinoko_fw_iso_ctx_read_cycle_time(HinokoFwIsoCtx *self, gint clock_id,
}
/**
- * hinoko_fw_iso_ctx_get_cycle_timer:
- * @self: A [iface@FwIsoCtx].
- * @clock_id: The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0),
- * CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel.
- * @cycle_timer: (inout): A [struct@CycleTimer] to store data of cycle timer.
- * @error: A [struct@GLib.Error].
- *
- * Retrieve the value of cycle timer register. This method call is available
- * once any isochronous context is created.
- *
- * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE.
- *
- * Since: 0.7.
- */
-gboolean hinoko_fw_iso_ctx_get_cycle_timer(HinokoFwIsoCtx *self, gint clock_id,
- HinokoCycleTimer *const *cycle_timer, GError **error)
-{
- g_return_val_if_fail(HINOKO_IS_FW_ISO_CTX(self), FALSE);
- g_return_val_if_fail(cycle_timer != NULL, FALSE);
- g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
-
- return HINOKO_FW_ISO_CTX_GET_IFACE(self)->get_cycle_timer(self, clock_id, cycle_timer, error);
-}
-
-/**
* hinoko_fw_iso_ctx_create_source:
* @self: A [iface@FwIsoCtx].
* @source: (out): A [struct@GLib.Source].
diff --git a/src/fw_iso_ctx.h b/src/fw_iso_ctx.h
index 89604a8..1ea2e5b 100644
--- a/src/fw_iso_ctx.h
+++ b/src/fw_iso_ctx.h
@@ -67,24 +67,6 @@ struct _HinokoFwIsoCtxInterface {
HinawaCycleTime *const *cycle_time, GError **error);
/**
- * HinokoFwIsoCtxInterface::get_cycle_timer:
- * @self: A [iface@FwIsoCtx].
- * @clock_id: The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0),
- * CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel.
- * @cycle_timer: (inout): A [struct@CycleTimer] to store data of cycle timer.
- * @error: A [struct@GLib.Error].
- *
- * Virtual function to tetrieve the value of cycle timer register. This method call is
- * available once any isochronous context is created.
- *
- * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE.
- *
- * Since: 0.7.
- */
- gboolean (*get_cycle_timer)(HinokoFwIsoCtx *self, gint clock_id,
- HinokoCycleTimer *const *cycle_timer, GError **error);
-
- /**
* HinokoFwIsoCtxInterface::flush_completions:
* @self: A [iface@FwIsoCtx].
* @error: A [struct@GLib.Error].
@@ -134,9 +116,6 @@ void hinoko_fw_iso_ctx_release(HinokoFwIsoCtx *self);
gboolean hinoko_fw_iso_ctx_read_cycle_time(HinokoFwIsoCtx *self, gint clock_id,
HinawaCycleTime *const *cycle_time, GError **error);
-gboolean hinoko_fw_iso_ctx_get_cycle_timer(HinokoFwIsoCtx *self, gint clock_id,
- HinokoCycleTimer *const *cycle_timer, GError **error);
-
gboolean hinoko_fw_iso_ctx_create_source(HinokoFwIsoCtx *self, GSource **source, GError **error);
gboolean hinoko_fw_iso_ctx_flush_completions(HinokoFwIsoCtx *self, GError **error);
diff --git a/src/fw_iso_ctx_private.c b/src/fw_iso_ctx_private.c
index 61bb3ab..ded55e7 100644
--- a/src/fw_iso_ctx_private.c
+++ b/src/fw_iso_ctx_private.c
@@ -638,39 +638,6 @@ gboolean fw_iso_ctx_state_read_cycle_time(struct fw_iso_ctx_state *state, gint c
return TRUE;
}
-/**
- * fw_iso_ctx_state_get_cycle_timer:
- * @state: A [struct@FwIsoCtxState].
- * @clock_id: The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0),
- * CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel.
- * @cycle_timer: (inout): A [struct@CycleTimer] to store data of cycle timer.
- * @error: A [struct@GLib.Error].
- *
- * Retrieve the value of cycle timer register. This method call is available
- * once any isochronous context is created.
- *
- * Returns: TRUE if the overall operation finishes successfully, otherwise FALSE.
- */
-gboolean fw_iso_ctx_state_get_cycle_timer(struct fw_iso_ctx_state *state, gint clock_id,
- HinokoCycleTimer *const *cycle_timer, GError **error)
-{
- g_return_val_if_fail(cycle_timer != NULL, FALSE);
- g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
-
- if (state->fd < 0) {
- generate_fw_iso_ctx_error_coded(error, HINOKO_FW_ISO_CTX_ERROR_NOT_ALLOCATED);
- return FALSE;
- }
-
- (*cycle_timer)->clk_id = clock_id;
- if (ioctl(state->fd, FW_CDEV_IOC_GET_CYCLE_TIMER2, *cycle_timer) < 0) {
- generate_fw_iso_ctx_error_ioctl(error, errno, FW_CDEV_IOC_GET_CYCLE_TIMER2);
- return FALSE;
- }
-
- return TRUE;
-}
-
static gboolean check_src(GSource *source)
{
FwIsoCtxSource *src = (FwIsoCtxSource *)source;
diff --git a/src/fw_iso_ctx_private.h b/src/fw_iso_ctx_private.h
index 868e9d2..e1660c5 100644
--- a/src/fw_iso_ctx_private.h
+++ b/src/fw_iso_ctx_private.h
@@ -126,9 +126,6 @@ gboolean fw_iso_ctx_state_flush_completions(struct fw_iso_ctx_state *state, GErr
gboolean fw_iso_ctx_state_read_cycle_time(struct fw_iso_ctx_state *state, gint clock_id,
HinawaCycleTime *const *cycle_time, GError **error);
-gboolean fw_iso_ctx_state_get_cycle_timer(struct fw_iso_ctx_state *state, gint clock_id,
- HinokoCycleTimer *const *cycle_timer, GError **error);
-
gboolean fw_iso_ctx_state_create_source(struct fw_iso_ctx_state *state, HinokoFwIsoCtx *inst,
gboolean (*handle_event)(HinokoFwIsoCtx *inst,
const union fw_cdev_event *event,
diff --git a/src/fw_iso_ir_multiple.c b/src/fw_iso_ir_multiple.c
index e9d0805..2d3ec0e 100644
--- a/src/fw_iso_ir_multiple.c
+++ b/src/fw_iso_ir_multiple.c
@@ -186,20 +186,6 @@ static gboolean fw_iso_ir_multiple_read_cycle_time(HinokoFwIsoCtx *inst, gint cl
return fw_iso_ctx_state_read_cycle_time(&priv->state, clock_id, cycle_time, error);
}
-static gboolean fw_iso_ir_multiple_get_cycle_timer(HinokoFwIsoCtx *inst, gint clock_id,
- HinokoCycleTimer *const *cycle_timer,
- GError **error)
-{
- HinokoFwIsoIrMultiple *self;
- HinokoFwIsoIrMultiplePrivate *priv;
-
- g_return_val_if_fail(HINOKO_IS_FW_ISO_IR_MULTIPLE(inst), FALSE);
- self = HINOKO_FW_ISO_IR_MULTIPLE(inst);
- priv = hinoko_fw_iso_ir_multiple_get_instance_private(self);
-
- return fw_iso_ctx_state_get_cycle_timer(&priv->state, clock_id, cycle_timer, error);
-}
-
static gboolean fw_iso_ir_multiple_flush_completions(HinokoFwIsoCtx *inst, GError **error)
{
HinokoFwIsoIrMultiple *self;
@@ -338,7 +324,6 @@ static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface)
iface->unmap_buffer = fw_iso_ir_multiple_unmap_buffer;
iface->release = fw_iso_ir_multiple_release;
iface->read_cycle_time = fw_iso_ir_multiple_read_cycle_time;
- iface->get_cycle_timer = fw_iso_ir_multiple_get_cycle_timer;
iface->flush_completions = fw_iso_ir_multiple_flush_completions;
iface->create_source = fw_iso_ir_multiple_create_source;
}
diff --git a/src/fw_iso_ir_single.c b/src/fw_iso_ir_single.c
index 305063e..eeb9e7b 100644
--- a/src/fw_iso_ir_single.c
+++ b/src/fw_iso_ir_single.c
@@ -154,20 +154,6 @@ static gboolean fw_iso_ir_single_read_cycle_time(HinokoFwIsoCtx *inst, gint cloc
return fw_iso_ctx_state_read_cycle_time(&priv->state, clock_id, cycle_time, error);
}
-static gboolean fw_iso_ir_single_get_cycle_timer(HinokoFwIsoCtx *inst, gint clock_id,
- HinokoCycleTimer *const *cycle_timer,
- GError **error)
-{
- HinokoFwIsoIrSingle *self;
- HinokoFwIsoIrSinglePrivate *priv;
-
- g_return_val_if_fail(HINOKO_IS_FW_ISO_IR_SINGLE(inst), FALSE);
- self = HINOKO_FW_ISO_IR_SINGLE(inst);
- priv = hinoko_fw_iso_ir_single_get_instance_private(self);
-
- return fw_iso_ctx_state_get_cycle_timer(&priv->state, clock_id, cycle_timer, error);
-}
-
static gboolean fw_iso_ir_single_flush_completions(HinokoFwIsoCtx *inst, GError **error)
{
HinokoFwIsoIrSingle *self;
@@ -234,7 +220,6 @@ static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface)
iface->unmap_buffer = fw_iso_ir_single_unmap_buffer;
iface->release = fw_iso_ir_single_release;
iface->read_cycle_time = fw_iso_ir_single_read_cycle_time;
- iface->get_cycle_timer = fw_iso_ir_single_get_cycle_timer;
iface->flush_completions = fw_iso_ir_single_flush_completions;
iface->create_source = fw_iso_ir_single_create_source;
}
diff --git a/src/fw_iso_it.c b/src/fw_iso_it.c
index 5037f04..a609314 100644
--- a/src/fw_iso_it.c
+++ b/src/fw_iso_it.c
@@ -143,20 +143,6 @@ static gboolean fw_iso_it_read_cycle_time(HinokoFwIsoCtx *inst, gint clock_id,
return fw_iso_ctx_state_read_cycle_time(&priv->state, clock_id, cycle_time, error);
}
-static gboolean fw_iso_it_get_cycle_timer(HinokoFwIsoCtx *inst, gint clock_id,
- HinokoCycleTimer *const *cycle_timer,
- GError **error)
-{
- HinokoFwIsoIt *self;
- HinokoFwIsoItPrivate *priv;
-
- g_return_val_if_fail(HINOKO_IS_FW_ISO_IT(inst), FALSE);
- self = HINOKO_FW_ISO_IT(inst);
- priv = hinoko_fw_iso_it_get_instance_private(self);
-
- return fw_iso_ctx_state_get_cycle_timer(&priv->state, clock_id, cycle_timer, error);
-}
-
static gboolean fw_iso_it_flush_completions(HinokoFwIsoCtx *inst, GError **error)
{
HinokoFwIsoIt *self;
@@ -217,7 +203,6 @@ static void fw_iso_ctx_iface_init(HinokoFwIsoCtxInterface *iface)
iface->unmap_buffer = fw_iso_it_unmap_buffer;
iface->release = fw_iso_it_release;
iface->read_cycle_time = fw_iso_it_read_cycle_time;
- iface->get_cycle_timer = fw_iso_it_get_cycle_timer;
iface->flush_completions = fw_iso_it_flush_completions;
iface->create_source = fw_iso_it_create_source;
}
diff --git a/src/hinoko.map b/src/hinoko.map
index 3581892..253a4aa 100644
--- a/src/hinoko.map
+++ b/src/hinoko.map
@@ -41,7 +41,6 @@ HINOKO_0_7_0 {
"hinoko_fw_iso_ctx_stop";
"hinoko_fw_iso_ctx_unmap_buffer";
"hinoko_fw_iso_ctx_release";
- "hinoko_fw_iso_ctx_get_cycle_timer";
"hinoko_fw_iso_ctx_create_source";
"hinoko_fw_iso_ctx_flush_completions";
diff --git a/tests/fw-iso-ctx b/tests/fw-iso-ctx
index 7640f61..35bc31e 100644
--- a/tests/fw-iso-ctx
+++ b/tests/fw-iso-ctx
@@ -19,7 +19,6 @@ methods = (
'unmap_buffer',
'release',
'read_cycle_time',
- 'get_cycle_timer',
'create_source',
'flush_completions',
)
@@ -28,7 +27,6 @@ vmethods = (
'do_unmap_buffer',
'do_release',
'do_read_cycle_time',
- 'do_get_cycle_timer',
'do_flush_completions',
'do_create_source',
'do_stopped',
diff --git a/tests/fw-iso-ir-multiple b/tests/fw-iso-ir-multiple
index 0357638..07da395 100755
--- a/tests/fw-iso-ir-multiple
+++ b/tests/fw-iso-ir-multiple
@@ -27,7 +27,6 @@ methods = (
'unmap_buffer',
'release',
'read_cycle_time',
- 'get_cycle_timer',
'create_source',
'flush_completions',
)
@@ -38,7 +37,6 @@ vmethods = (
'do_unmap_buffer',
'do_release',
'do_read_cycle_time',
- 'do_get_cycle_timer',
'do_flush_completions',
'do_create_source',
'do_stopped',
diff --git a/tests/fw-iso-ir-single b/tests/fw-iso-ir-single
index 35a5448..7816e35 100755
--- a/tests/fw-iso-ir-single
+++ b/tests/fw-iso-ir-single
@@ -27,7 +27,6 @@ methods = (
'unmap_buffer',
'release',
'read_cycle_time',
- 'get_cycle_timer',
'create_source',
'flush_completions',
)
@@ -38,7 +37,6 @@ vmethods = (
'do_unmap_buffer',
'do_release',
'do_read_cycle_time',
- 'do_get_cycle_timer',
'do_flush_completions',
'do_create_source',
'do_stopped',
diff --git a/tests/fw-iso-it b/tests/fw-iso-it
index 319fbaf..8aae653 100755
--- a/tests/fw-iso-it
+++ b/tests/fw-iso-it
@@ -26,7 +26,6 @@ methods = (
'unmap_buffer',
'release',
'read_cycle_time',
- 'get_cycle_timer',
'create_source',
'flush_completions',
)
@@ -37,7 +36,6 @@ vmethods = (
'do_unmap_buffer',
'do_release',
'do_read_cycle_time',
- 'do_get_cycle_timer',
'do_flush_completions',
'do_create_source',
'do_stopped',