From patchwork Thu Oct 29 19:52:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 7520551 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4037BEEA4 for ; Thu, 29 Oct 2015 19:52:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 078F620822 for ; Thu, 29 Oct 2015 19:52:53 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DC5A820813 for ; Thu, 29 Oct 2015 19:52:51 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 25230265736; Thu, 29 Oct 2015 20:52:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2008E2651A5; Thu, 29 Oct 2015 20:52:42 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 207A1265249; Thu, 29 Oct 2015 20:52:41 +0100 (CET) Received: from gsystem.sk (ns.gsystem.sk [62.176.172.50]) by alsa0.perex.cz (Postfix) with ESMTP id 08DEC264F34 for ; Thu, 29 Oct 2015 20:52:33 +0100 (CET) Received: from stip-static-68.213-81-217.telecom.sk ([213.81.217.68] helo=gsql.ggedos.sk) by gsystem.sk with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZrtFQ-0005xj-Ji; Thu, 29 Oct 2015 20:52:32 +0100 From: Ondrej Zary To: alsa-devel@alsa-project.org Date: Thu, 29 Oct 2015 20:52:24 +0100 Message-Id: <1446148344-1209-1-git-send-email-linux@rainbow-software.org> X-Mailer: git-send-email 1.7.10.4 Cc: Takashi Iwai , Kernel development list Subject: [alsa-devel] [PATCH] snd-cs46xx: Fix suspend for all channels X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP snd_cs46xx_suspend() is missing snd_pcm_suspend_all calls for pcm_rear, pcm_center_lfe and pcm_iec958. There's also a copy/paste bug in snd_cs46xx_pcm_iec958(), overwriting pcm_rear in struct snd_cs46xx, leaving pcm_iec958 unused. Fix all this to allow all channels to survive suspend/resume. Signed-off-by: Ondrej Zary --- sound/pci/cs46xx/cs46xx_lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index e62c841..2706f27 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -1864,7 +1864,7 @@ int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device) /* global setup */ pcm->info_flags = 0; strcpy(pcm->name, "CS46xx - IEC958"); - chip->pcm_rear = pcm; + chip->pcm_iec958 = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), 64*1024, 256*1024); @@ -3780,6 +3780,11 @@ static int snd_cs46xx_suspend(struct device *dev) snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); chip->in_suspend = 1; snd_pcm_suspend_all(chip->pcm); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_pcm_suspend_all(chip->pcm_rear); + snd_pcm_suspend_all(chip->pcm_center_lfe); + snd_pcm_suspend_all(chip->pcm_iec958); +#endif // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE);