summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_beep.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-03-18 14:29:56 +0400
committerTakashi Iwai <tiwai@suse.de>2013-03-18 15:58:47 +0400
commite914b25e370a3a55a839ff507ed779f54431ace5 (patch)
tree73779f18794bd94de2974cf3bd4530f21c4cbd8e /sound/pci/hda/hda_beep.h
parent7504b6cd220a3dd8104abe3d0f985c6957dc3e17 (diff)
downloadlinux-e914b25e370a3a55a839ff507ed779f54431ace5.tar.xz
ALSA: hda - Fix power-saving during playing beep sound
While playing the digital beep tone, the codec shouldn't be turned off. This patch adds proper snd_hda_power_up()/down() calls at each time when the beep is played or off. Also, this fixes automatically an unnecessary codec power-up at detaching the beep device when the beep isn't being played. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_beep.h')
-rw-r--r--sound/pci/hda/hda_beep.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.h b/sound/pci/hda/hda_beep.h
index 4dc6933bc655..cb88464676b6 100644
--- a/sound/pci/hda/hda_beep.h
+++ b/sound/pci/hda/hda_beep.h
@@ -36,6 +36,7 @@ struct hda_beep {
hda_nid_t nid;
unsigned int enabled:1;
unsigned int linear_tone:1; /* linear tone for IDT/STAC codec */
+ unsigned int playing:1;
struct work_struct beep_work; /* scheduled task for beep event */
struct mutex mutex;
};