diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-11-22 11:18:49 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-22 11:48:11 -0500 |
commit | 4f86f120d9d65b3a8f17e48dca1f991d861b5cd7 (patch) | |
tree | de69ce66dfbc6b4c0671782c975e7e1817da369a /sound/pci/emu10k1 | |
parent | b209c4dfcd960ab176d4746ab7dc442a3edb4575 (diff) |
ALSA: emu10k1: don't update firmware during suspend/resume
Add a flag to suppress the update in emu1010_firmware_thread() during
suspend/resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r-- | sound/pci/emu10k1/emu10k1.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index b7c1875ba90e..a168138efc5e 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -215,6 +215,8 @@ static int snd_emu10k1_suspend(struct device *dev) | |||
215 | 215 | ||
216 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); | 216 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
217 | 217 | ||
218 | emu->suspend = 1; | ||
219 | |||
218 | snd_pcm_suspend_all(emu->pcm); | 220 | snd_pcm_suspend_all(emu->pcm); |
219 | snd_pcm_suspend_all(emu->pcm_mic); | 221 | snd_pcm_suspend_all(emu->pcm_mic); |
220 | snd_pcm_suspend_all(emu->pcm_efx); | 222 | snd_pcm_suspend_all(emu->pcm_efx); |
@@ -260,6 +262,8 @@ static int snd_emu10k1_resume(struct device *dev) | |||
260 | if (emu->card_capabilities->ca0151_chip) | 262 | if (emu->card_capabilities->ca0151_chip) |
261 | snd_p16v_resume(emu); | 263 | snd_p16v_resume(emu); |
262 | 264 | ||
265 | emu->suspend = 0; | ||
266 | |||
263 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 267 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
264 | return 0; | 268 | return 0; |
265 | } | 269 | } |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 1dfb94d16b8b..cfd6cf952d44 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -714,6 +714,8 @@ static int emu1010_firmware_thread(void *data) | |||
714 | msleep_interruptible(1000); | 714 | msleep_interruptible(1000); |
715 | if (kthread_should_stop()) | 715 | if (kthread_should_stop()) |
716 | break; | 716 | break; |
717 | if (emu->suspend) | ||
718 | continue; | ||
717 | snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); /* IRQ Status */ | 719 | snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); /* IRQ Status */ |
718 | snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); /* OPTIONS: Which cards are attached to the EMU */ | 720 | snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); /* OPTIONS: Which cards are attached to the EMU */ |
719 | if (reg & EMU_HANA_OPTION_DOCK_OFFLINE) { | 721 | if (reg & EMU_HANA_OPTION_DOCK_OFFLINE) { |