aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/fm801.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-12-21 19:09:54 +0200
committerTakashi Iwai <tiwai@suse.de>2015-12-21 19:53:51 +0100
commit14da04b5ff8e1e70b53f9f927e915e32a56651e1 (patch)
tree57b27125d8c643489fcf18ac6006355d9166362c /sound/pci/fm801.c
parentALSA: fm801: detect FM-only card earlier (diff)
downloadlinux-dev-14da04b5ff8e1e70b53f9f927e915e32a56651e1.tar.xz
linux-dev-14da04b5ff8e1e70b53f9f927e915e32a56651e1.zip
ALSA: fm801: no need to suspend absent codec
In case of tuner only card there is no need to take care of the codec which is anyway absent. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r--sound/pci/fm801.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 294fc131aee0..9e870884c02c 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1393,12 +1393,17 @@ static int snd_fm801_suspend(struct device *dev)
int i;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
- snd_pcm_suspend_all(chip->pcm);
- snd_ac97_suspend(chip->ac97);
- snd_ac97_suspend(chip->ac97_sec);
+
+ if (chip->tea575x_tuner & TUNER_ONLY) {
+ /* FIXME: tea575x suspend */
+ } else {
+ snd_pcm_suspend_all(chip->pcm);
+ snd_ac97_suspend(chip->ac97);
+ snd_ac97_suspend(chip->ac97_sec);
+ }
+
for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
chip->saved_regs[i] = fm801_ioread16(chip, saved_regs[i]);
- /* FIXME: tea575x suspend */
return 0;
}
@@ -1414,9 +1419,10 @@ static int snd_fm801_resume(struct device *dev)
reset_codec(chip);
snd_fm801_chip_multichannel_init(chip);
snd_fm801_chip_init(chip);
+ snd_ac97_resume(chip->ac97);
+ snd_ac97_resume(chip->ac97_sec);
}
- snd_ac97_resume(chip->ac97);
- snd_ac97_resume(chip->ac97_sec);
+
for (i = 0; i < ARRAY_SIZE(saved_regs); i++)
fm801_iowrite16(chip, saved_regs[i], chip->saved_regs[i]);