Error if the version passed from topology is not known. Also fix the
dmic_set_params() error prints for to show the correct function name.
Closes: https://github.com/alsa-project/alsa-utils/pull/254
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
return -EINVAL;
if (dai_index >= DMIC_HW_FIFOS) {
- fprintf(stderr, "set_dmic_data illegal dai index\n");
+ fprintf(stderr, "%s: illegal dai index %d \n", __func__, dai_index);
+ return -EINVAL;
+ }
+
+ if (driver_version < 1 || driver_version > 5) {
+ fprintf(stderr, "%s: illegal driver version %d\n", __func__, driver_version);
return -EINVAL;
}