Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193240
b: refs/heads/master
c: 6458a54
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Apr 22, 2010
1 parent c440b69 commit 55f2cab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 719f82d3987aad4cc9f46d19c35f362672545cad
refs/heads/master: 6458a54423f9a4963e7e88ff62040117285e6b8c
9 changes: 9 additions & 0 deletions trunk/sound/pci/maestro3.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ struct snd_m3 {
struct snd_kcontrol *master_switch;
struct snd_kcontrol *master_volume;
struct tasklet_struct hwvol_tq;
unsigned int in_suspend;

#ifdef CONFIG_PM
u16 *suspend_mem;
Expand Down Expand Up @@ -884,6 +885,7 @@ static DEFINE_PCI_DEVICE_TABLE(snd_m3_ids) = {
MODULE_DEVICE_TABLE(pci, snd_m3_ids);

static struct snd_pci_quirk m3_amp_quirk_list[] __devinitdata = {
SND_PCI_QUIRK(0x0E11, 0x0094, "Compaq Evo N600c", 0x0c),
SND_PCI_QUIRK(0x10f7, 0x833e, "Panasonic CF-28", 0x0d),
SND_PCI_QUIRK(0x10f7, 0x833d, "Panasonic CF-72", 0x0d),
SND_PCI_QUIRK(0x1033, 0x80f1, "NEC LM800J/7", 0x03),
Expand Down Expand Up @@ -1613,6 +1615,11 @@ static void snd_m3_update_hw_volume(unsigned long private_data)
outb(0x88, chip->iobase + SHADOW_MIX_REG_MASTER);
outb(0x88, chip->iobase + HW_VOL_COUNTER_MASTER);

/* Ignore spurious HV interrupts during suspend / resume, this avoids
mistaking them for a mute button press. */
if (chip->in_suspend)
return;

if (!chip->master_switch || !chip->master_volume)
return;

Expand Down Expand Up @@ -2424,6 +2431,7 @@ static int m3_suspend(struct pci_dev *pci, pm_message_t state)
if (chip->suspend_mem == NULL)
return 0;

chip->in_suspend = 1;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(chip->pcm);
snd_ac97_suspend(chip->ac97);
Expand Down Expand Up @@ -2497,6 +2505,7 @@ static int m3_resume(struct pci_dev *pci)
snd_m3_hv_init(chip);

snd_power_change_state(card, SNDRV_CTL_POWER_D0);
chip->in_suspend = 0;
return 0;
}
#endif /* CONFIG_PM */
Expand Down

0 comments on commit 55f2cab

Please sign in to comment.