tools: Update eqctl tool and sample configurations for new user ABI

The ext bytes read response parsing needs a fix since it now includes
the ABI header. A warning is printed if max control size is reached.
The example configurations are also updated to contain the header.

The patch also includes new IIR and FIR setup for pass-through
configuration (for testing) that configures the EQ component to totally
pass the filter computation.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2018-11-29 18:22:28 +02:00
parent 2e4b435302
commit d27de3a671
10 changed files with 26 additions and 11 deletions

View File

@ -1 +1 @@
24,65538,0,4294901764,16384,0, 4607827,0,56,33554432,0,0,0,0,56,65538,0,0,0,0,0,4294901764,0,0,0,0,16384,0,

View File

@ -1 +1 @@
248,131076,65537,65537,4294901764,16384,0,108,3558500271,114559883,47710217,28574198,28836345,29032901,28180917,26280352,24510851,23200107,21954905,20578629,19136814,17891610,16843017,16122107,15335663,14549220,13762777,12976332,12124351,11337907,10551463,9896092,9175185,8585352,7995518,7405685,6815852,6291556,5767260,5308500,4849741,4456519,4063297,3735612,3473463,3145778,2883630,2687018,2424871,2228260,2031648,1835037,1638427,1507352,1376278,1179667,1048593,983056,851982,786444,720907,393225, 4607827,0,264,33554432,0,0,0,0,264,131076,0,0,0,0,65537,65537,4294901764,0,0,0,0,16384,0,92,0,0,0,0,3539495552,118229985,49545235,29884941,30081550,30212568,29229509,27132334,25297295,23789941,22413665,20840778,19267889,17826075,16711943,15794424,14876905,13959388,13041870,12058816,11141297,10289315,9437334,8650890,7929983,7274612,6619242,5963872,5374039,4849742,4325446,3866687,3473464,3080242,2752556,2424871,2162723,1900575,1638427,1441816,1245205,1114130,917520,851982,655372,7,

View File

@ -1 +1 @@
192,65538,0,65624,1213426791,4254606209,3887459083,4018203428,4105564850,4147181068,4183947337,4217764461,4245486661,4267048379,4283170521,4294836140,7602239,12320925,14745811,15466729,14942442,13697244,11993285,10092713,8257676,6488176,4915287,3604544,2490414,1572895,917523,458762,65540,4294901759,4294770685,4294705147,4294639611,4294705146,4294705147,4294770683,4294836220,4294836221,4294901758,4294901758,4294967295,4294967295,65535,0, 4607827,0,224,33554432,0,0,0,0,224,65538,0,0,0,0,0,65624,0,0,0,0,1213426791,4254606209,3887459083,4018203428,4105564850,4147181068,4183947337,4217764461,4245486661,4267048379,4283170521,4294836140,7602239,12320925,14745811,15466729,14942442,13697244,11993285,10092713,8257676,6488176,4915287,3604544,2490414,1572895,917523,458762,65540,4294901759,4294770685,4294705147,4294639611,4294705146,4294705147,4294770683,4294836220,4294836221,4294901758,4294901758,4294967295,4294967295,65535,0,

View File

@ -0,0 +1 @@
4607827,0,56,33554432,0,0,0,0,56,65538,0,0,0,0,4294967295,4294901764,0,0,0,0,16384,0,

View File

@ -1 +1 @@
84,2,1,0,0,2,2,3316150158,2048164275,513807534,3267352229,513807534,0,16384,3867454526,1191025347,38870735,77741469,38870735,4294967294,16458, 4607827,0,116,33554432,0,0,0,0,116,2,1,0,0,0,0,0,0,2,2,0,0,0,0,3316150158,2048164275,513807534,3267352229,513807534,0,16384,3867454526,1191025347,38870735,77741469,38870735,4294967292,24197,

View File

@ -1 +1 @@
84,2,1,0,0,2,2,3227172081,2141520527,536653443,3221660410,536653443,0,16384,3260252783,2107733822,161646111,3961037800,172645501,4294967294,27910, 4607827,0,116,33554432,0,0,0,0,116,2,1,0,0,0,0,0,0,2,2,0,0,0,0,3227172081,2141520527,536653443,3221660410,536653443,0,16384,3260252783,2107733822,161646111,3961037800,172645501,4294967294,27910,

View File

@ -1 +1 @@
56,2,1,0,0,1,1,0,0,0,0,538145694,0,32690, 4607827,0,88,33554432,0,0,0,0,88,2,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,538145694,0,32690,

View File

@ -1 +1 @@
156,4,2,1,1,1,1,1,1,0,0,0,0,538145694,0,32690,3,3,3237960220,2130690484,297056159,3694463533,303476880,0,16384,3302357025,2064935920,245217319,3776455865,274003881,0,16384,4106268671,4130185751,69182517,4179658584,365641401,4294967292,25468, 4607827,0,204,33554432,0,0,0,0,204,4,2,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,538145694,0,32690,3,3,0,0,0,0,3237960220,2130690484,297056159,3694463533,303476880,0,16384,3302357025,2064935920,245217319,3776455865,274003881,0,16384,4106268671,4130185751,69182517,4179658584,365641401,4294967292,25468,

View File

@ -0,0 +1 @@
4607827,0,88,33554432,0,0,0,0,88,2,1,0,0,0,0,4294967295,4294967295,1,1,0,0,0,0,0,0,0,0,538145694,0,32690,

View File

@ -61,6 +61,7 @@ static void usage(char *name)
static int read_setup(unsigned int *data, char setup[], size_t smax) static int read_setup(unsigned int *data, char setup[], size_t smax)
{ {
FILE *fh; FILE *fh;
unsigned int x;
int n = 0; int n = 0;
int n_max = smax / sizeof(unsigned int); int n_max = smax / sizeof(unsigned int);
int separator; int separator;
@ -72,18 +73,29 @@ static int read_setup(unsigned int *data, char setup[], size_t smax)
return -errno; return -errno;
} }
while (fscanf(fh, "%u", &data[n]) != EOF && n < n_max) { while (fscanf(fh, "%u", &x) != EOF) {
if (n < n_max)
data[n] = x;
if (n > 0) if (n > 0)
fprintf(stdout, ","); fprintf(stdout, ",");
fprintf(stdout, "%u", data[n]);
fprintf(stdout, "%u", x);
separator = fgetc(fh); separator = fgetc(fh);
while (separator != ',' && separator != EOF) while (separator != ',' && separator != EOF)
separator = fgetc(fh); separator = fgetc(fh);
n++; n++;
} }
fclose(fh);
fprintf(stdout, "\n"); fprintf(stdout, "\n");
if (n > n_max) {
fprintf(stderr, "Warning: Read of %d exceeded control size. ",
4 * n);
fprintf(stderr, "Please check the data file.\n");
}
fclose(fh);
return n; return n;
} }
@ -175,6 +187,7 @@ int main(int argc, char *argv[])
/* Get control attributes from info. */ /* Get control attributes from info. */
ctrl_size = snd_ctl_elem_info_get_count(info); ctrl_size = snd_ctl_elem_info_get_count(info);
fprintf(stderr, "Control size is %d.\n", ctrl_size);
read = snd_ctl_elem_info_is_tlv_readable(info); read = snd_ctl_elem_info_is_tlv_readable(info);
write = snd_ctl_elem_info_is_tlv_writable(info); write = snd_ctl_elem_info_is_tlv_writable(info);
type = snd_ctl_elem_info_get_type(info); type = snd_ctl_elem_info_get_type(info);
@ -239,7 +252,7 @@ int main(int argc, char *argv[])
* as the input file format. * as the input file format.
*/ */
config = (uint32_t *) (user_data + 2); config = (uint32_t *) (user_data + 2);
n = config[0] / sizeof(uint32_t); n = user_data[1] / sizeof(uint32_t);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (i == n - 1) if (i == n - 1)
fprintf(stdout, "%u\n", config[i]); fprintf(stdout, "%u\n", config[i]);