summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_beep.h
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-10-21 14:48:23 +0200
committerTakashi Iwai <tiwai@suse.de>2009-11-16 11:34:41 +0100
commit123c07aeddd71fbb295842a8c19866e780b9a100 (patch)
tree8b97495608cad55f9169a826fe4637f9ac2d21c3 /sound/pci/hda/hda_beep.h
parentfe705ab1526bc2c8b7756f3a855f040ab2060af2 (diff)
ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
Original implementation was keeping registered input device for SND_BEEP and SND_TONE events all time. This patch changes this behaviour: If digital PC Beep is turned off using universal control switch, the input device is unregistered. Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last registered device acceping those events. It means that the HDA Intel audio driver blocks also the internal PC Speaker device (pcspkr.c driver) even if the HDA Beep is muted. The user can easy disable all beeps using 'setterm -blength 0' or 'xset b off' command. Signed-off-by: Jaroslav Kysela <perex@perex.cz> 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.h b/sound/pci/hda/hda_beep.h
index 0c3de787c717..68465f679d8c 100644
--- a/sound/pci/hda/hda_beep.h
+++ b/sound/pci/hda/hda_beep.h
@@ -32,11 +32,15 @@ struct hda_beep {
int tone;
hda_nid_t nid;
unsigned int enabled:1;
+ unsigned int request_enable:1;
unsigned int linear_tone:1; /* linear tone for IDT/STAC codec */
+ struct work_struct register_work; /* scheduled task for beep event */
struct work_struct beep_work; /* scheduled task for beep event */
+ struct mutex mutex;
};
#ifdef CONFIG_SND_HDA_INPUT_BEEP
+int snd_hda_enable_beep_device(struct hda_codec *codec, int enable);
int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
void snd_hda_detach_beep_device(struct hda_codec *codec);
#else