ALSA: hdac: ext: add wait for codec to respond after link reset

As per HDA spec section 4.3 - Codec Discovery, the software shall wait
for atleast 521usec for codec to respond after link reset.
With the multi-link capability each link is turned ON/OFF individually.
Link controller drives reset signal when it is turned ON.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Rakesh Ughreja 2018-06-01 22:54:00 -05:00 коммит произвёл Takashi Iwai
Родитель e1df9317cb
Коммит f8a7fe1aea
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -271,6 +271,15 @@ int snd_hdac_ext_bus_link_get(struct hdac_bus *bus,
}
ret = snd_hdac_ext_bus_link_power_up(link);
/*
* wait for 521usec for codec to report status
* HDA spec section 4.3 - Codec Discovery
*/
udelay(521);
bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS);
dev_dbg(bus->dev, "codec_mask = 0x%lx\n", bus->codec_mask);
snd_hdac_chip_writew(bus, STATESTS, bus->codec_mask);
}
mutex_unlock(&bus->lock);