Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [alsa-devel] [PATCH 21/55] ALSA: hda: Support PCM sync_stop
Date: Tue, 10 Dec 2019 07:34:20 +0100
Message-ID: <20191210063454.31603-22-tiwai@suse.de> (raw)
In-Reply-To: <20191210063454.31603-1-tiwai@suse.de>

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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_intel.c | 4 +++-
 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 35b4526f0d28..d225d4baba9e 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)
@@ -1884,7 +1886,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);
@@ -2043,6 +2044,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);
-- 
2.16.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply index

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  6:33 [alsa-devel] [PATCH 00/55] ALSA: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 01/55] ALSA: ad1889: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 02/55] ALSA: ali5451: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 03/55] ALSA: als300: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 04/55] ALSA: atiixp: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 05/55] ALSA: au88x0: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 06/55] ALSA: aw2: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 07/55] ALSA: azt3328: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 08/55] ALSA: bt87x: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 09/55] ALSA: ca0106: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 10/55] ALSA: cmipci: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 11/55] ALSA: cs4281: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 12/55] ALSA: cs46xx: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 13/55] ALSA: cs5535audio: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 14/55] ALSA: ctxfi: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 15/55] ALSA: echoaudio: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 16/55] ALSA: emu10k1: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 17/55] ALSA: ens137x: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 18/55] ALSA: es1938: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 19/55] ALSA: es1968: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 20/55] ALSA: fm801: " Takashi Iwai
2019-12-10  6:34 ` Takashi Iwai [this message]
2019-12-10  6:34 ` [alsa-devel] [PATCH 22/55] ALSA: ice1712: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 23/55] ALSA: ice1724: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 24/55] ALSA: intel8x0: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 25/55] ALSA: korg1212: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 26/55] ALSA: lola: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 27/55] ALSA: maestro3: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 28/55] ALSA: nm256: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 29/55] ALSA: oxygen: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 30/55] ALSA: riptide: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 31/55] ALSA: rme32: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 32/55] ALSA: rme96: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 33/55] ALSA: rme9652: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 34/55] ALSA: sis7019: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 35/55] ALSA: sonicvibes: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 36/55] ALSA: trident: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 37/55] ALSA: via82xx: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 38/55] ALSA: ymfpci: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 39/55] ALSA: ad1816a: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 40/55] ALSA: es1688: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 41/55] ALSA: es18xx: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 42/55] ALSA: gus: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 43/55] ALSA: msnd: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 44/55] ALSA: opl3sa2: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 45/55] ALSA: opti9xx: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 46/55] ALSA: sb: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 47/55] ALSA: wavefront: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 48/55] ALSA: wss: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 49/55] ALSA: lx6464es: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 50/55] ALSA: mixart: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 51/55] ALSA: pcxhr: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 52/55] ALSA: vx222: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 53/55] ALSA: pdaudiocf: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 54/55] ALSA: vxpocket: " Takashi Iwai
2019-12-10  6:34 ` [alsa-devel] [PATCH 55/55] ALSA: usb-audio: " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191210063454.31603-22-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git