hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_opts,
&num_opts, sizeof(int32_t));
for (unsigned int j = 0; j < num_opts; j++)
- if (hwopts[j] == SR_CONF_SAMPLERATE) {
+ if ((hwopts[j] & SR_CONF_MASK) == SR_CONF_SAMPLERATE) {
supported_device = true;
break;
}
gvar_opts, &num_opts, sizeof(int32_t));
for (unsigned int i = 0; i < num_opts; i++) {
const struct sr_config_info *const info =
- sr_config_info_get(options[i]);
+ sr_config_info_get(options[i] & SR_CONF_MASK);
if (!info)
continue;
gvar, &num_opts, sizeof(int32_t));
for (unsigned int i = 0; i < num_opts; i++)
{
- switch (options[i]) {
+ switch (options[i] & SR_CONF_MASK) {
case SR_CONF_LIMIT_SAMPLES:
- _sample_count_supported = true;
+ if (options[i] & SR_CONF_SET)
+ _sample_count_supported = true;
break;
case SR_CONF_LIMIT_FRAMES:
- dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES,
- g_variant_new_uint64(1));
+ if (options[i] & SR_CONF_SET)
+ dev_inst->set_config(NULL, SR_CONF_LIMIT_FRAMES,
+ g_variant_new_uint64(1));
break;
}
}