codec_adapter: cadence: Fix API func search

Existing code returns every time the API function at index 0, which works
now because we support only a single API function. But, this will break
when patches adding multiple Cadence codec types will be merged.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2021-02-26 15:42:40 +02:00 committed by Daniel Baluta
parent 7712d96a18
commit 2b10b49a8e
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ int cadence_codec_init(struct comp_dev *dev)
/* Find and assign API function */
for (i = 0; i < no_of_api; i++) {
if (cadence_api_table[i].id == api_id) {
cd->api = cadence_api_table[0].api;
cd->api = cadence_api_table[i].api;
break;
}
}