diff options
author | Rakesh Ughreja <rakesh.a.ughreja@intel.com> | 2018-06-01 22:54:00 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-28 07:33:29 +0200 |
commit | f8a7fe1aea215e25eaf3bf04dff66fc7621ec9d7 (patch) | |
tree | 3eaa0ae6b3cc8314ae413aeb299b092f4b7a282f /sound/hda | |
parent | e1df9317cbb192582ed7aa88c5f294c2336a3c75 (diff) | |
download | linux-f8a7fe1aea215e25eaf3bf04dff66fc7621ec9d7.tar.bz2 |
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>
Diffstat (limited to 'sound/hda')
-rw-r--r-- | sound/hda/ext/hdac_ext_controller.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/hda/ext/hdac_ext_controller.c b/sound/hda/ext/hdac_ext_controller.c index 72774119dd11..5bc4a1d587d4 100644 --- a/sound/hda/ext/hdac_ext_controller.c +++ b/sound/hda/ext/hdac_ext_controller.c @@ -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); |