diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-10-29 15:52:24 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-30 07:33:21 -0400 |
commit | b43ddca4a8d8c9b5439898bd3077736091696ceb (patch) | |
tree | 172b1b2e87f502fff3f1c5031ba8548a6fe2b71c | |
parent | eed273b785c531ced49adca87efcee2d96bdb2ef (diff) |
ALSA: cs46xx: Fix suspend for all channels
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index e62c8416ddfd..2706f271a83b 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) | |||
1864 | /* global setup */ | 1864 | /* global setup */ |
1865 | pcm->info_flags = 0; | 1865 | pcm->info_flags = 0; |
1866 | strcpy(pcm->name, "CS46xx - IEC958"); | 1866 | strcpy(pcm->name, "CS46xx - IEC958"); |
1867 | chip->pcm_rear = pcm; | 1867 | chip->pcm_iec958 = pcm; |
1868 | 1868 | ||
1869 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | 1869 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
1870 | snd_dma_pci_data(chip->pci), 64*1024, 256*1024); | 1870 | snd_dma_pci_data(chip->pci), 64*1024, 256*1024); |
@@ -3780,6 +3780,11 @@ static int snd_cs46xx_suspend(struct device *dev) | |||
3780 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 3780 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
3781 | chip->in_suspend = 1; | 3781 | chip->in_suspend = 1; |
3782 | snd_pcm_suspend_all(chip->pcm); | 3782 | snd_pcm_suspend_all(chip->pcm); |
3783 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | ||
3784 | snd_pcm_suspend_all(chip->pcm_rear); | ||
3785 | snd_pcm_suspend_all(chip->pcm_center_lfe); | ||
3786 | snd_pcm_suspend_all(chip->pcm_iec958); | ||
3787 | #endif | ||
3783 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); | 3788 | // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); |
3784 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); | 3789 | // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); |
3785 | 3790 | ||