]> sigrok.org Git - libsigrok.git/blobdiff - hardware/alsa/api.c
Deprecate SR_DI_HWCAPS.
[libsigrok.git] / hardware / alsa / api.c
index 86ab6a7c9bee0aa35c8f1b7d62016372e7f8c72b..67773f60582e5977f0daa2a3faf528d400bf7df0 100644 (file)
@@ -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;