Everything uses btr now, so there's no need for a suffix any more.
Update the documentation a bit.
return 1;
}
-static void alsa_write_pre_select_btr(struct sched *s, struct task *t)
+static void alsa_write_pre_select(struct sched *s, struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
struct private_alsa_write_data *pad = wn->private_data;
free(pad);
}
-static void alsa_write_post_select_btr(__a_unused struct sched *s,
+static void alsa_write_post_select(__a_unused struct sched *s,
struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
alsa_cmdline_parser_init(&dummy);
w->open = alsa_open;
w->close = alsa_close;
- w->pre_select_btr = alsa_write_pre_select_btr;
- w->post_select_btr = alsa_write_post_select_btr;
+ w->pre_select = alsa_write_pre_select;
+ w->post_select = alsa_write_post_select;
w->parse_config = alsa_parse_config;
w->shutdown = NULL; /* nothing to do */
w->free_config = alsa_free_config;
return -E_FW_OPEN;
}
-static void file_write_pre_select_btr(struct sched *s, struct task *t)
+static void file_write_pre_select(struct sched *s, struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
struct private_file_write_data *pfwd = wn->private_data;
free(pfwd);
}
-static void file_write_post_select_btr(__a_unused struct sched *s,
+static void file_write_post_select(__a_unused struct sched *s,
struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
file_cmdline_parser_init(&dummy);
w->open = file_write_open;
- w->pre_select_btr = file_write_pre_select_btr;
- w->post_select_btr = file_write_post_select_btr;
+ w->pre_select = file_write_pre_select;
+ w->post_select = file_write_post_select;
w->parse_config = file_write_parse_config;
w->free_config = file_write_free_config;
w->close = file_write_close;
int bytes_per_frame;
};
-static void oss_pre_select_btr(struct sched *s, struct task *t)
+static void oss_pre_select(struct sched *s, struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
struct private_oss_write_data *powd = wn->private_data;
return ret;
}
-static void oss_post_select_btr(__a_unused struct sched *s,
+static void oss_post_select(__a_unused struct sched *s,
struct task *t)
{
struct writer_node *wn = container_of(t, struct writer_node, task);
oss_cmdline_parser_init(&dummy);
w->open = oss_open;
w->close = oss_close;
- w->pre_select_btr = oss_pre_select_btr;
- w->post_select_btr = oss_post_select_btr;
+ w->pre_select = oss_pre_select;
+ w->post_select = oss_post_select;
w->parse_config = oss_parse_config;
w->free_config = oss_free_config;
w->shutdown = NULL;
/**
* Prepare the fd sets for select.
*
- * This is called from the writer node group task's pre_select(). It
- * may use the sched pointer to add any file descriptors or to decrease
- * the select timeout. It must return positive on success and negative
- * on errors.
+ * This is called from scheduler. It may use the sched pointer to add
+ * any file descriptors or to decrease the select timeout.
*/
- int (*pre_select)(struct sched *s, struct writer_node *wn);
- void (*pre_select_btr)(struct sched *s, struct task *t);
+ void (*pre_select)(struct sched *s, struct task *t);
/**
* Write audio data.
*
- * Called from the post_select function of the wng task. It must keep
- * track of the number of bytes consumed from the wng's buffer via
- * the \p wn->written variable (which may be modified by the wng handling
- * functions). This function must return positive on success and
- * negative on errors.
+ * Called from the post_select function of the writer node's task.
*/
- int (*post_select)(struct sched *s, struct writer_node *wn);
- void (*post_select_btr)(struct sched *s, struct task *t);
+ void (*post_select)(struct sched *s, struct task *t);
/**
* Close one instance of the writer.
*
strcpy(wn->task.status, name);
free(name);
ret = w->open(wn);
- wn->task.post_select = w->post_select_btr;
- wn->task.pre_select = w->pre_select_btr;
+ wn->task.post_select = w->post_select;
+ wn->task.pre_select = w->pre_select;
register_task(&wn->task);
}