From: Bard Liao Date: Sun, 26 May 2019 16:58:35 +0000 (+0800) Subject: ALSA: hda: add polling mode in snd_hdac_bus_get_response X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5e13cf6cd64c6a4c15a4426e6f1683093a495d9a;p=linux.git ALSA: hda: add polling mode in snd_hdac_bus_get_response Polling mode is useful if a machine somehow missed an expected IRQ. Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai --- diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index b2e9454f5816a..a16ac31bda835 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -239,6 +239,8 @@ int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr, timeout = jiffies + msecs_to_jiffies(1000); for (loopcounter = 0;; loopcounter++) { + if (bus->polling_mode) + snd_hdac_bus_update_rirb(bus); spin_lock_irq(&bus->reg_lock); if (!bus->rirb.cmds[addr]) { if (res)