Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1258969 > unrolled thread

[PATCH] snd-cs46xx: Fix suspend for all channels

Started byOndrej Zary <linux@rainbow-software.org>
First post2015-10-29 21:00 +0100
Last post2015-10-30 12:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] snd-cs46xx: Fix suspend for all channels Ondrej Zary <linux@rainbow-software.org> - 2015-10-29 21:00 +0100
    Re: [PATCH] snd-cs46xx: Fix suspend for all channels Takashi Iwai <tiwai@suse.de> - 2015-10-30 12:40 +0100

#1258969 — [PATCH] snd-cs46xx: Fix suspend for all channels

FromOndrej Zary <linux@rainbow-software.org>
Date2015-10-29 21:00 +0100
Subject[PATCH] snd-cs46xx: Fix suspend for all channels
Message-ID<qp1wC-4vT-5@gated-at.bofh.it>
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 <linux@rainbow-software.org>
---
 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);
 
-- 
Ondrej Zary

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1259424

FromTakashi Iwai <tiwai@suse.de>
Date2015-10-30 12:40 +0100
Message-ID<qpgci-5f8-39@gated-at.bofh.it>
In reply to#1258969
On Thu, 29 Oct 2015 20:52:24 +0100,
Ondrej Zary wrote:
> 
> 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 <linux@rainbow-software.org>

Applied, thanks.


Takashi

> ---
>  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);
>  
> -- 
> Ondrej Zary
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web