/*
- * Copyright (C) 2012-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2012 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
btr_log_tree(btr_parent(btr_parent(btrn)), LL_INFO);
}
-static void resample_pre_select(struct sched *s, struct task *t)
+static void resample_pre_select(struct sched *s, void *context)
{
- struct filter_node *fn = container_of(t, struct filter_node, task);
+ struct filter_node *fn = context;
struct resample_context *ctx = fn->private_data;
int ret = btr_node_status(fn->btrn, fn->min_iqs, BTR_NT_INTERNAL);
int ret, converter;
struct resample_context *ctx = fn->private_data;
struct resample_filter_args_info *conf = fn->conf;
- struct btr_node *btrn = fn->btrn;
- ret = -E_RESAMPLE_EOF;
- if (btr_no_parent(btrn))
- return ret;
- if (btr_get_input_queue_size(btrn) == 0)
- return 0;
ret = resample_set_params(fn);
if (ret < 0)
return ret;
return data.input_frames_used;
}
-static int resample_post_select(__a_unused struct sched *s, struct task *t)
+static int resample_post_select(__a_unused struct sched *s, void *context)
{
int ret;
- struct filter_node *fn = container_of(t, struct filter_node, task);
+ struct filter_node *fn = context;
struct resample_context *ctx = fn->private_data;
struct resample_filter_args_info *conf = fn->conf;
struct btr_node *btrn = fn->btrn;
ret = check_wav_post_select(ctx->cwc);
if (ret < 0)
goto out;
+ ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
+ if (ret <= 0)
+ goto out;
if (!ctx->src_state) {
ret = resample_init(fn);
if (ret <= 0)
goto out;
}
- ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
- if (ret <= 0)
- goto out;
if (ctx->source_sample_rate == conf->dest_sample_rate_arg) {
/*
* No resampling necessary. We do not splice ourselves out