diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-12-10 07:34:20 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-12-11 07:25:47 +0100 |
commit | f36da9406e6698a97ea643aeeab6307863094967 (patch) | |
tree | 5ed408dd4ecf7bbbabd5dd61b5b50b89014eb4d7 /sound/pci | |
parent | e41dbd20383d0dda8813ef6186b142be4de0ddb6 (diff) | |
download | linux-stable-f36da9406e6698a97ea643aeeab6307863094967.tar.gz linux-stable-f36da9406e6698a97ea643aeeab6307863094967.tar.bz2 linux-stable-f36da9406e6698a97ea643aeeab6307863094967.zip |
ALSA: hda: Support PCM sync_stop
The driver invokes snd_pcm_period_elapsed() simply from the interrupt
handler. Set card->sync_irq for enabling the missing sync_stop PCM
operation. It's cleared and reset dynamically at IRQ re-acquiring for
the PM resume, too.
Link: https://lore.kernel.org/r/20191210063454.31603-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_tegra.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b856b89378ac..c86539cdbd4b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -790,6 +790,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect) return -1; } bus->irq = chip->pci->irq; + chip->card->sync_irq = bus->irq; pci_intx(chip->pci, !chip->msi); return 0; } @@ -1028,6 +1029,7 @@ static int azx_suspend(struct device *dev) if (bus->irq >= 0) { free_irq(bus->irq, chip); bus->irq = -1; + chip->card->sync_irq = -1; } if (chip->msi) @@ -1883,7 +1885,6 @@ static int azx_first_init(struct azx *chip) } pci_set_master(pci); - synchronize_irq(bus->irq); gcap = azx_readw(chip, GCAP); dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap); @@ -2042,6 +2043,7 @@ static int disable_msi_reset_irq(struct azx *chip) free_irq(bus->irq, chip); bus->irq = -1; + chip->card->sync_irq = -1; pci_disable_msi(chip->pci); chip->msi = 0; err = azx_acquire_irq(chip, 1); diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 8350954b7986..fc2e0a294bc1 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -170,7 +170,6 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev) if (chip && chip->running) { azx_stop_chip(chip); - synchronize_irq(bus->irq); azx_enter_link_reset(chip); } hda_tegra_disable_clocks(hda); @@ -298,8 +297,7 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) return err; } bus->irq = irq_id; - - synchronize_irq(bus->irq); + card->sync_irq = bus->irq; gcap = azx_readw(chip, GCAP); dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap); |