asoc: sdm660: fix tasha lite detection issue

Defer probe of soundcard registration until codec
driver registration is complete to fix detection of
codec version by machine driver.

Change-Id: Ia93404a85c98bd50e63015073284d5bf290a3f9f
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
This commit is contained in:
Rohit kumar 2017-12-15 15:33:57 +05:30 committed by Gerrit - the friendly Code Review server
parent da56c67bc4
commit dd08b3db40

View file

@ -2052,8 +2052,13 @@ struct snd_soc_card *populate_snd_card_dailinks(struct device *dev,
if (strnstr(card->name, "tasha", strlen(card->name))) {
codec_ver = tasha_codec_ver();
if (codec_ver == WCD9326)
card->name = "sdm660-tashalite-snd-card";
if (codec_ver == WCD9326) {
card->name = "sdm670-tashalite-snd-card";
} else if (codec_ver == WCD9XXX) {
dev_err(dev, "%s: Invalid codec version %d\n",
__func__, codec_ver);
return NULL;
}
len1 = ARRAY_SIZE(msm_ext_common_fe_dai);
len2 = len1 + ARRAY_SIZE(msm_ext_tasha_fe_dai);