X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Falsa%2Fapi.c;h=67773f60582e5977f0daa2a3faf528d400bf7df0;hb=9a6517d14b1248855cde0d88ec9519f99184cc77;hp=86ab6a7c9bee0aa35c8f1b7d62016372e7f8c72b;hpb=c50277a6ec09fb35de3a6e0f2ae3401bc72a1526;p=libsigrok.git diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index 86ab6a7c..67773f60 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -144,14 +144,9 @@ static int config_get(int id, const void **data, const struct sr_dev_inst *sdi) { struct dev_context *devc; - if (id != SR_DI_HWCAPS) /* For SR_DI_HWCAPS sdi will be NULL. */ - devc = sdi->priv; - switch (id) { - case SR_DI_HWCAPS: - *data = hwcaps; - break; case SR_CONF_SAMPLERATE: + devc = sdi->priv; *data = &devc->cur_samplerate; break; default: @@ -189,6 +184,9 @@ static int config_list(int key, const void **data, const struct sr_dev_inst *sdi (void)sdi; switch (key) { + case SR_CONF_DEVICE_OPTIONS: + *data = hwcaps; + break; case SR_CONF_SAMPLERATE: if (!sdi || !sdi->priv) return SR_ERR_ARG;