Skip to content

Commit

Permalink
ALSA: hdac: ext: add wait for codec to respond after link reset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rakesh Ughreja authored and Takashi Iwai committed Jun 28, 2018
1 parent e1df931 commit f8a7fe1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sound/hda/ext/hdac_ext_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8a7fe1

Please sign in to comment.