summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorYanteng Si <siyanteng@loongson.cn>2023-06-07 11:21:50 +0200
committerTakashi Iwai <tiwai@suse.de>2023-06-07 12:37:25 +0200
commitcbc3e98acf802c8939e14103a059db60499d69eb (patch)
tree9bcd8532c0a0c66e964f664b3635e75e2de30a97 /sound/hda
parentALSA: hda: Add Loongson LS7A HD-Audio support (diff)
downloadlinux-cbc3e98acf802c8939e14103a059db60499d69eb.tar.xz
linux-cbc3e98acf802c8939e14103a059db60499d69eb.zip
ALSA: hda: Using polling mode for loongson controller by default
On loongson controller, RIRBSTS.RINTFL cannot be cleared, azx_interrupt() is called all the time. We disable RIRB interrupt, and use polling mode by default. Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn> Acked-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://lore.kernel.org/r/d309a75424d438b958d90d797b4f1ba45468e090.1686128807.git.siyanteng@loongson.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_controller.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
index 3c7af6558249..7f3a000fab0c 100644
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -79,7 +79,10 @@ void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus)
/* set N=1, get RIRB response interrupt for new entry */
snd_hdac_chip_writew(bus, RINTCNT, 1);
/* enable rirb dma and response irq */
- snd_hdac_chip_writeb(bus, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN);
+ if (bus->not_use_interrupts)
+ snd_hdac_chip_writeb(bus, RIRBCTL, AZX_RBCTL_DMA_EN);
+ else
+ snd_hdac_chip_writeb(bus, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN);
/* Accept unsolicited responses */
snd_hdac_chip_updatel(bus, GCTL, AZX_GCTL_UNSOL, AZX_GCTL_UNSOL);
spin_unlock_irq(&bus->reg_lock);