(void)sdi;
- if (hwcap == SR_HWCAP_PROBECONFIG) {
- /* Nothing to do, but must be supported */
- ret = SR_OK;
- } else if (hwcap == SR_HWCAP_SAMPLERATE) {
+ if (hwcap == SR_HWCAP_SAMPLERATE) {
cur_samplerate = *(const uint64_t *)value;
sr_dbg("demo: %s: setting samplerate to %" PRIu64, __func__,
cur_samplerate);
static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
void *cb_data)
{
+ struct dev_context *devc;
+
/* Avoid compiler warnings. */
- (void)sdi;
(void)cb_data;
+ devc = sdi->priv;
+
/* Stop generate thread. */
thread_running = 0;
+ sr_session_source_remove_channel(devc->channels[0]);
+
return SR_OK;
}