From: Takashi Sakamoto Date: Wed, 22 Jun 2022 03:05:26 +0000 (+0900) Subject: timer: query: rename to ALSATimer.get_real_time_clock_id() X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=a8e3ddf652a75558dc37ad424c817cae4650698f;p=alsa-gobject.git timer: query: rename to ALSATimer.get_real_time_clock_id() For friendly name. Signed-off-by: Takashi Sakamoto --- diff --git a/src/timer/alsatimer.map b/src/timer/alsatimer.map index 8526879..8ed662b 100644 --- a/src/timer/alsatimer.map +++ b/src/timer/alsatimer.map @@ -50,7 +50,7 @@ ALSA_GOBJECT_0_3_0 { "alsatimer_get_device_id_list"; "alsatimer_get_device_info"; "alsatimer_get_device_status"; - "alsatimer_get_tstamp_source"; + "alsatimer_get_real_time_clock_id"; "alsatimer_user_instance_open"; "alsatimer_user_instance_get_protocol_version"; diff --git a/src/timer/query.c b/src/timer/query.c index 8f24875..4298e7a 100644 --- a/src/timer/query.c +++ b/src/timer/query.c @@ -305,23 +305,23 @@ end: } /** - * alsatimer_get_tstamp_source: - * @clock_id: (out): The clock source for timestamp. The value of `CLOCK_XXX` in UAPI of Linux + * alsatimer_get_real_time_clock_id: + * @clock_id: (out): The clock_id for real time. The value of `CLOCK_XXX` in UAPI of Linux * kernel. * @error: A [struct@GLib.Error]. Error is generated with domain of `GLib.FileError`. * - * Get the clock source for timestamp when [class@UserInstance] is configured to receive event - * with timestamp. The source is selected according to parameter of `snd-timer` kernel module, - * and the call of function is just to refer to it. + * Get `clock_id` for real time. The `clock_id` governs real time retrieved by both + * [method@RealTimeEvent.get_time] and [method@InstanceStatus.get_time]. * - * `0` means `CLOCK_REALTIME` is used. `1` means `CLOCK_MONOTONIC` is used. + * The call of function is just to refer to parameter of `snd-timer` kernel module. `0` means + * `CLOCK_REALTIME` is used. `1` means `CLOCK_MONOTONIC` is used. * * The call of function executes `open(2)`, `read(2)`, `close(2)` system calls for the sysfs node - * corresponding to `snd-timer` kernel module. + * corresponding to the parameter. * * Returns: %TRUE when the overall operation finishes successfully, else %FALSE. */ -gboolean alsatimer_get_tstamp_source(int *clock_id, GError **error) +gboolean alsatimer_get_real_time_clock_id(int *clock_id, GError **error) { int val; gsize size; diff --git a/src/timer/query.h b/src/timer/query.h index 398a083..b84e77a 100644 --- a/src/timer/query.h +++ b/src/timer/query.h @@ -21,7 +21,7 @@ gboolean alsatimer_get_device_status(ALSATimerDeviceId *device_id, gboolean alsatimer_set_device_params(ALSATimerDeviceId *device_id, const ALSATimerDeviceParams *device_params, GError **error); -gboolean alsatimer_get_tstamp_source(int *clock_id, GError **error); +gboolean alsatimer_get_real_time_clock_id(int *clock_id, GError **error); G_END_DECLS diff --git a/tests/alsatimer-functions b/tests/alsatimer-functions index ae93513..dbe90fa 100644 --- a/tests/alsatimer-functions +++ b/tests/alsatimer-functions @@ -17,7 +17,7 @@ entries = { 'get_device_info', 'get_device_status', 'set_device_params', - 'get_tstamp_source', + 'get_real_time_clock_id', ), ALSATimer.UserInstanceError: ( 'quark',