diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-29 02:34:06 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-29 02:37:00 -0400 |
commit | b7b51141b4fb6f9059a20c03dd2a5bf77c466c7e (patch) | |
tree | 8241fd430f62feb19745ce49948484d8dfd4d40c /sound/pci | |
parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) |
ALSA: hda - Check "beep" hint
Check the hint "beep" in snd_hda_attach_beep_device() to avoid the beep
device creation if user doesn't want.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 29272f2e95a0..08fe6592ad44 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <sound/core.h> | 25 | #include <sound/core.h> |
26 | #include "hda_beep.h" | 26 | #include "hda_beep.h" |
27 | #include "hda_local.h" | ||
27 | 28 | ||
28 | enum { | 29 | enum { |
29 | DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */ | 30 | DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */ |
@@ -115,6 +116,9 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) | |||
115 | struct hda_beep *beep; | 116 | struct hda_beep *beep; |
116 | int err; | 117 | int err; |
117 | 118 | ||
119 | if (!snd_hda_get_bool_hint(codec, "beep")) | ||
120 | return 0; /* disabled explicitly */ | ||
121 | |||
118 | beep = kzalloc(sizeof(*beep), GFP_KERNEL); | 122 | beep = kzalloc(sizeof(*beep), GFP_KERNEL); |
119 | if (beep == NULL) | 123 | if (beep == NULL) |
120 | return -ENOMEM; | 124 | return -ENOMEM; |