(void)options;
drvc = di->priv;
+
devices = NULL;
/* Allocate memory for our private device context. */
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
- sr_spew("Device init successful.");
-
/* Close device. We'll reopen it again when we need it. */
(void) la8_close(devc); /* Log, but ignore errors. */
struct dev_context *devc;
switch (id) {
- case SR_DI_HWCAPS:
- *data = hwcaps;
- break;
- case SR_DI_SAMPLERATES:
- fill_supported_samplerates_if_needed();
- *data = &samplerates;
- sr_spew("%s: Returning samplerates.", __func__);
- break;
- case SR_DI_TRIGGER_TYPES:
- *data = (char *)TRIGGER_TYPES;
- sr_spew("%s: Returning trigger types: %s.", __func__,
- TRIGGER_TYPES);
- break;
- case SR_DI_CUR_SAMPLERATE:
+ case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
*data = &devc->cur_samplerate;
(void)sdi;
switch (key) {
+ case SR_CONF_DEVICE_OPTIONS:
+ *data = hwcaps;
+ break;
case SR_CONF_SAMPLERATE:
fill_supported_samplerates_if_needed();
*data = &samplerates;
break;
+ case SR_CONF_TRIGGER_TYPE:
+ *data = (char *)TRIGGER_TYPE;
+ break;
default:
return SR_ERR_ARG;
}