Switch audiod over to the buffer tree API.
[paraslash.git] / oss_write.c
index f8feb43a03e90ebba8f1bed2a1f5f0c292501d81..4e5f9b5626c2400f310647cf8805e141f98e983d 100644 (file)
@@ -61,7 +61,7 @@ static void oss_pre_select_btr(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;
-       int ret = btr_node_status(wn->btrn, wn->min_iqs);
+       int ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_LEAF);
 
        t->error = 0;
        if (ret < 0)
@@ -209,7 +209,7 @@ static void oss_post_select_btr(__a_unused struct sched *s,
        struct private_oss_write_data *powd = wn->private_data;
        struct btr_node *btrn = wn->btrn;
        size_t frames, bytes;
-       int ret = btr_node_status(btrn, wn->min_iqs);
+       int ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_LEAF);
        char *data;
 
        if (ret < 0)
@@ -282,6 +282,11 @@ err_out:
        return NULL;
 }
 
+static void oss_free_config(void *conf)
+{
+       oss_cmdline_parser_free(conf);
+}
+
 /**
  * The init function of the oss writer.
  *
@@ -301,6 +306,7 @@ void oss_write_init(struct writer *w)
        w->post_select = oss_post_select;
        w->post_select_btr = oss_post_select_btr;
        w->parse_config = oss_parse_config;
+       w->free_config = oss_free_config;
        w->shutdown = NULL;
        w->help = (struct ggo_help) {
                .short_help = oss_write_args_info_help,