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;
if (!sdi)
return SR_ERR;
devc = sdi->priv;
switch (id) {
case SR_CONF_SAMPLERATE:
if (sdi) {
devc = sdi->priv;
*data = g_variant_new_uint64(devc->cur_samplerate);
} else
return SR_ERR;
*data = g_variant_new_uint64(devc->cur_samplerate);
break;
case SR_CONF_LIMIT_MSEC:
*data = g_variant_new_uint64(devc->limit_msec);
break;
case SR_CONF_CAPTURE_RATIO:
*data = g_variant_new_uint64(devc->capture_ratio);
break;
default:
return SR_ERR_NA;