mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:15:43 +01:00
topology: nhlt: Intel: Add check for DMIC version
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>
This commit is contained in:
parent
3ad48bd0f8
commit
9efbf459fb
1 changed files with 6 additions and 1 deletions
|
@ -1232,7 +1232,12 @@ int dmic_set_params(struct intel_nhlt_params *nhlt, int dai_index, int driver_ve
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue