sr: Fix some samplerate fields.

This commit is contained in:
Uwe Hermann 2012-03-24 22:32:47 +01:00
parent 85a77720c6
commit 590b9f9a91
5 changed files with 20 additions and 20 deletions

View File

@ -83,9 +83,9 @@ static const char *probe_names[NUM_PROBES + 1] = {
}; };
static struct sr_samplerates samplerates = { static struct sr_samplerates samplerates = {
SR_KHZ(200), 0,
SR_MHZ(200), 0,
SR_HZ(0), 0,
supported_samplerates, supported_samplerates,
}; };

View File

@ -72,7 +72,7 @@ static const char *fx2lafw_probe_names[] = {
NULL, NULL,
}; };
static uint64_t fx2lafw_supported_samplerates[] = { static uint64_t supported_samplerates[] = {
SR_MHZ(1), SR_MHZ(1),
SR_MHZ(2), SR_MHZ(2),
SR_MHZ(3), SR_MHZ(3),
@ -84,11 +84,11 @@ static uint64_t fx2lafw_supported_samplerates[] = {
SR_MHZ(24), SR_MHZ(24),
}; };
static struct sr_samplerates fx2lafw_samplerates = { static struct sr_samplerates samplerates = {
SR_MHZ(1), 0,
SR_MHZ(24), 0,
SR_HZ(0), 0,
fx2lafw_supported_samplerates, supported_samplerates,
}; };
static GSList *dev_insts = NULL; static GSList *dev_insts = NULL;
@ -431,7 +431,7 @@ static int hw_dev_open(int dev_index)
if (ctx->cur_samplerate == 0) { if (ctx->cur_samplerate == 0) {
/* Samplerate hasn't been set; default to the slowest one. */ /* Samplerate hasn't been set; default to the slowest one. */
if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE, if (hw_dev_config_set(dev_index, SR_HWCAP_SAMPLERATE,
&fx2lafw_supported_samplerates[0]) == SR_ERR) &supported_samplerates[0]) == SR_ERR)
return SR_ERR; return SR_ERR;
} }
@ -506,7 +506,7 @@ static void *hw_dev_info_get(int dev_index, int dev_info_id)
case SR_DI_PROBE_NAMES: case SR_DI_PROBE_NAMES:
return fx2lafw_probe_names; return fx2lafw_probe_names;
case SR_DI_SAMPLERATES: case SR_DI_SAMPLERATES:
return &fx2lafw_samplerates; return &samplerates;
case SR_DI_TRIGGER_TYPES: case SR_DI_TRIGGER_TYPES:
return TRIGGER_TYPES; return TRIGGER_TYPES;
case SR_DI_CUR_SAMPLERATE: case SR_DI_CUR_SAMPLERATE:

View File

@ -90,9 +90,9 @@ static uint64_t supported_samplerates[] = {
}; };
static struct sr_samplerates samplerates = { static struct sr_samplerates samplerates = {
SR_HZ(100), 0,
SR_MHZ(200), 0,
SR_HZ(0), 0,
supported_samplerates, supported_samplerates,
}; };

View File

@ -87,9 +87,9 @@ static uint64_t supported_samplerates[] = {
}; };
static struct sr_samplerates samplerates = { static struct sr_samplerates samplerates = {
SR_KHZ(200), 0,
SR_MHZ(24), 0,
SR_HZ(0), 0,
supported_samplerates, supported_samplerates,
}; };

View File

@ -135,9 +135,9 @@ static uint64_t supported_samplerates[] = {
}; };
static struct sr_samplerates samplerates = { static struct sr_samplerates samplerates = {
SR_HZ(0), 0,
SR_HZ(0), 0,
SR_HZ(0), 0,
supported_samplerates, supported_samplerates,
}; };