Add checks for codec DAI number during match-up
PATCH v2 1/1 Add checks for codec DAI number during match-up
Update the Codec DAI matching scheme to take the DAI number into account, and not just the name. This is necessary for systems with multiple codecs that use the Codec ID number to differentiate them.
Signed-off-by Timur Tabi <[email protected]>
--- sound/soc/soc-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/soc-core.c +2 -0
@@ -801,6 +801,7 @@ codec_dai:/* yes, then check the codec_dai list */ list_for_each_entry (codec_dai, &codec_dai_list, list) {if (!strcmp (config->codec_dai, codec_dai->name) && + (codec_dai->id == config->codec_num) &&try_module_get (codec_dai->dev->driver->owner)) { dbg("ASoC %s %s: Match for %s %s\n", soc_card->name, config->name,
@@ -1767,6 +1768,7 @@ struct snd_soc_dai *snd_soc_register_codec_dai( dai->playback = template->playback; dai->capture = template->capture; dai->name = template->name; + dai->id = template->id; dai->ac97_control = template->ac97_control;mutex_lock (&client_mutex);list_add (&dai->list, &codec_dai_list);
Signature · 1 line
1.5.5
Mark Brown
AppliedQuoted 3 lines · Timur Tabi
Update the Codec DAI matching scheme to take the DAI number into account, and not just the name. This is necessary for systems with multiple codecs that use the Codec ID number to differentiate them.
Applied, thanks.