asix-sigma: Publish capture ratio correctly.

This commit is contained in:
Bert Vermeulen 2014-05-04 00:34:24 -07:00
parent b9a53103cf
commit fb2e6de774
1 changed files with 11 additions and 5 deletions

View File

@ -809,13 +809,19 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
(void)cg; (void)cg;
if (!sdi)
return SR_ERR;
devc = sdi->priv;
switch (id) { switch (id) {
case SR_CONF_SAMPLERATE: case SR_CONF_SAMPLERATE:
if (sdi) { *data = g_variant_new_uint64(devc->cur_samplerate);
devc = sdi->priv; break;
*data = g_variant_new_uint64(devc->cur_samplerate); case SR_CONF_LIMIT_MSEC:
} else *data = g_variant_new_uint64(devc->limit_msec);
return SR_ERR; break;
case SR_CONF_CAPTURE_RATIO:
*data = g_variant_new_uint64(devc->capture_ratio);
break; break;
default: default:
return SR_ERR_NA; return SR_ERR_NA;