summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Hsuan Hsu <yuhsuan@chromium.org>2021-02-25 12:32:11 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-02 08:23:07 +0000
commit002cea28db763b00631444afdc27a2639ad15fdd (patch)
treed56dd94116b3098e00ce32e12fa8b201e8b258ec
parent11dd48a7555bb380406906101bc0e52e4d8dfa2b (diff)
downloadadhd-002cea28db763b00631444afdc27a2639ad15fdd.tar.gz
CRAS: Add comments for system state functions
Add comments for the system state functions in CRAS library. BUG=b:176570789 TEST=None Change-Id: Idf2f0c5eeb2153936754fc5b9573561b1436925d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2719400 Reviewed-by: Curtis Malainey <cujomalainey@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org> Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
-rw-r--r--cras/src/libcras/cras_client.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/cras/src/libcras/cras_client.h b/cras/src/libcras/cras_client.h
index 44a4ae1d..c0a214c8 100644
--- a/cras/src/libcras/cras_client.h
+++ b/cras/src/libcras/cras_client.h
@@ -1577,6 +1577,14 @@ inline int libcras_client_get_nodes(struct libcras_client *client,
return client->get_nodes(client->client_, direction, nodes, num);
}
+/*
+ * Gets the default output buffer size.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * size - The pointer to save the result.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int
libcras_client_get_default_output_buffer_size(struct libcras_client *client,
int *size)
@@ -1584,30 +1592,70 @@ libcras_client_get_default_output_buffer_size(struct libcras_client *client,
return client->get_default_output_buffer_size(client->client_, size);
}
+/*
+ * Gets the AEC group ID.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * id - The pointer to save the result.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int libcras_client_get_aec_group_id(struct libcras_client *client,
int *id)
{
return client->get_aec_group_id(client->client_, id);
}
+/*
+ * Gets whether AEC is supported.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * supported - The pointer to save the result.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int libcras_client_get_aec_supported(struct libcras_client *client,
int *supported)
{
return client->get_aec_supported(client->client_, supported);
}
+/*
+ * Gets whether the system is muted.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * muted - The pointer to save the result.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int libcras_client_get_system_muted(struct libcras_client *client,
int *muted)
{
return client->get_aec_group_id(client->client_, muted);
}
+/*
+ * Mutes or unmutes the system.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * mute - 1 is to mute and 0 is to unmute.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int libcras_client_set_system_mute(struct libcras_client *client,
int mute)
{
return client->set_system_mute(client->client_, mute);
}
+/*
+ * Gets the index of the loopback device.
+ * Args:
+ * client - Pointer returned from "libcras_client_create".
+ * idx - The pointer to save the result.
+ * Returns:
+ * 0 on success negative error code on failure (from errno.h).
+ */
inline int libcras_client_get_loopback_dev_idx(struct libcras_client *client,
int *idx)
{