+static int cleanup(struct sr_input *in)
+{
+ struct sr_datafeed_packet packet;
+ struct context *inc;
+
+ inc = in->priv;
+
+ if (inc->started) {
+ packet.type = SR_DF_END;
+ sr_session_send(in->sdi, &packet);
+ }
+ g_free(in->priv);
+ in->priv = NULL;
+
+ return SR_OK;
+}
+
+static struct sr_option options[] = {
+ { "numchannels", "Number of channels", "Number of channels", NULL, NULL },
+ { "samplerate", "Sample rate", "Sample rate", NULL, NULL },
+ ALL_ZERO
+};
+
+static struct sr_option *get_options(void)
+{
+ if (!options[0].def) {
+ options[0].def = g_variant_ref_sink(g_variant_new_int32(DEFAULT_NUM_CHANNELS));
+ options[1].def = g_variant_ref_sink(g_variant_new_uint64(DEFAULT_SAMPLERATE));
+ }
+
+ return options;
+}
+