Skip to content
Commit 9e498089 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown
Browse files

ASoC: skip legacy dai naming if dai driver has all the information



Original issue is that the id field in the dai is not same as the id
in dai_driver when dai driver count == 1. This is due to the legacy
dai naming check, which could possibly cause issues if the audio drivers
written in assumption that dai->id would be always equal to dai_driver->id.
This assumption is true only if the dai driver count is greater than 1,
and false if dai driver count is 1. On Qcom Lpass driver we hit such
issue while adding support to apq8016.

The code path which falls back to legacy naming for cases where num_dai
== 1 does not check if there is any valid information in the dai_driver.
This patch fixes that by checking if the dai_driver has valid id and
name before falling back to legacy dai naming
Although the drivers can work around this issue by only using
dai->driver->id, but this patch attempts to fix the actual issue.

Suggested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: default avatarKenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b787f68c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment