cem-dt-885x: Publish driver options.
This commit is contained in:
parent
d6fa8ace94
commit
d7125bfa1e
|
@ -32,6 +32,9 @@ static const uint32_t devopts[] = {
|
|||
SR_CONF_SOUNDLEVELMETER,
|
||||
SR_CONF_CONTINUOUS,
|
||||
SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
|
||||
};
|
||||
|
||||
static const uint32_t devopts_global[] = {
|
||||
SR_CONF_SPL_WEIGHT_FREQ | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
|
||||
SR_CONF_SPL_WEIGHT_TIME | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
|
||||
SR_CONF_SPL_MEASUREMENT_RANGE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
|
||||
|
@ -335,10 +338,10 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
|||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
(void)sdi;
|
||||
(void)cg;
|
||||
|
||||
ret = SR_OK;
|
||||
if (!sdi) {
|
||||
switch (key) {
|
||||
case SR_CONF_SCAN_OPTIONS:
|
||||
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
|
||||
|
@ -348,6 +351,14 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
|||
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
|
||||
devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
|
||||
break;
|
||||
default:
|
||||
return SR_ERR_NA;
|
||||
}
|
||||
} else {
|
||||
switch (key) {
|
||||
case SR_CONF_DEVICE_OPTIONS:
|
||||
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
|
||||
devopts_global, ARRAY_SIZE(devopts_global), sizeof(uint32_t));
|
||||
case SR_CONF_SPL_WEIGHT_FREQ:
|
||||
*data = g_variant_new_strv(weight_freq, ARRAY_SIZE(weight_freq));
|
||||
break;
|
||||
|
@ -370,6 +381,7 @@ static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *
|
|||
default:
|
||||
return SR_ERR_NA;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue