From patchwork Tue Dec 10 06:34:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 11281475 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 107FC13B6 for ; Tue, 10 Dec 2019 06:45:34 +0000 (UTC) Received: from alsa0.perex.cz (unknown [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97CF3206E0 for ; Tue, 10 Dec 2019 06:45:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97CF3206E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E2933843; Tue, 10 Dec 2019 07:44:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E2933843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575960332; bh=k7+2iLxhb1CLiWZIXYGAvxPSaJEQqCB3DxyLwxJJgEo=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aasQ3uwa4iaHIk6Dwfp/190MZwlIBMN9LYTq+cwpozhO6zF1f5uaK/ltOsgAtGbzu yIeIsveGJwrvTjHRmf0rnGh1Zm36w3rNuNQ0iYhiFH8cl/cYbHpAU2BX5dxzuL1ihW j09PuVjDnzpvTMzijHR1pDeFtJV/snn4IJ8+VLZk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B4B85F80334; Tue, 10 Dec 2019 07:36:10 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id AD41CF802F9; Tue, 10 Dec 2019 07:35:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CB9F1F8025E for ; Tue, 10 Dec 2019 07:35:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CB9F1F8025E X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F0CC7B1F9 for ; Tue, 10 Dec 2019 06:34:59 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Tue, 10 Dec 2019 07:34:17 +0100 Message-Id: <20191210063454.31603-19-tiwai@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191210063454.31603-1-tiwai@suse.de> References: <20191210063454.31603-1-tiwai@suse.de> Subject: [alsa-devel] [PATCH 18/55] ALSA: es1938: Support PCM sync_stop X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- sound/pci/es1938.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index ae405bc38c65..d9fba07d36d0 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c @@ -1444,6 +1444,7 @@ static int es1938_suspend(struct device *dev) if (chip->irq >= 0) { free_irq(chip->irq, chip); chip->irq = -1; + card->sync_irq = -1; } return 0; } @@ -1463,6 +1464,7 @@ static int es1938_resume(struct device *dev) return -EIO; } chip->irq = pci->irq; + card->sync_irq = chip->irq; snd_es1938_chip_init(chip); /* restore mixer-related registers */ @@ -1591,6 +1593,7 @@ static int snd_es1938_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; dev_dbg(card->dev, "create: io: 0x%lx, sb: 0x%lx, vc: 0x%lx, mpu: 0x%lx, game: 0x%lx\n", chip->io_port, chip->sb_port, chip->vc_port, chip->mpu_port, chip->game_port);