char *name;
g_return_if_fail(sysname != NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
name = g_strdup(TIMER_SYSNAME_TEMPLATE);
const char *node;
g_return_if_fail(devnode != NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
ctx = udev_new();
if (ctx == NULL) {
int fd;
g_return_if_fail(entries != NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
alsatimer_get_devnode(&devnode, error);
if (*error != NULL)
int fd;
g_return_if_fail(device_id != NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
alsatimer_get_devnode(&devnode, error);
if (*error != NULL)
g_return_if_fail(device_id != NULL);
g_return_if_fail(ALSATIMER_IS_DEVICE_STATUS(*device_status));
+ g_return_if_fail(error == NULL || *error == NULL);
alsatimer_get_devnode(&devnode, error);
if (*error != NULL)
g_return_if_fail(device_id != NULL);
g_return_if_fail(device_params != NULL);
+ g_return_if_fail(error == NULL || *error == NULL);
alsatimer_get_devnode(&devnode, error);
if (*error != NULL)
gsize size;
char *buf;
+ g_return_if_fail(error == NULL || *error == NULL);
+
// Count required digits.
val = INT_MAX;
size = 0;
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
alsatimer_get_devnode(&devnode, error);
if (*error != NULL)
return;
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (priv->fd < 0) {
generate_error(error, ENXIO);
return;
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
tread = (int)event_data_type;
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_TREAD, &tread) < 0)
generate_error(error, errno);
g_return_if_fail(device_id != NULL);
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
sel.id = *device_id;
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_SELECT, &sel) < 0)
generate_error(error, errno);
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
sel.id.dev_class = SNDRV_TIMER_CLASS_SLAVE;
sel.id.dev_sclass = slave_class;
sel.id.device = slave_id;
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
*instance_info = g_object_new(ALSATIMER_TYPE_INSTANCE_INFO, NULL);
timer_instance_info_refer_private(*instance_info, &info);
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
timer_instance_params_refer_private(*instance_params, ¶ms);
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_PARAMS, params) < 0)
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
g_return_if_fail(ALSATIMER_IS_INSTANCE_STATUS(*instance_status));
timer_instance_status_refer_private(*instance_status, &status);
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (priv->fd < 0) {
generate_error(error, ENXIO);
return;
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_START) < 0)
generate_error(error, errno);
}
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_STOP) < 0)
generate_error(error, errno);
}
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_PAUSE) < 0)
generate_error(error, errno);
}
g_return_if_fail(ALSATIMER_IS_USER_INSTANCE(self));
priv = alsatimer_user_instance_get_instance_private(self);
+ g_return_if_fail(error == NULL || *error == NULL);
+
if (ioctl(priv->fd, SNDRV_TIMER_IOCTL_CONTINUE) < 0)
generate_error(error, errno);
}