git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: hda - Check "beep" hint
[pandora-kernel.git]
/
sound
/
pci
/
hda
/
hda_beep.c
diff --git
a/sound/pci/hda/hda_beep.c
b/sound/pci/hda/hda_beep.c
index
29272f2
..
08fe659
100644
(file)
--- a/
sound/pci/hda/hda_beep.c
+++ b/
sound/pci/hda/hda_beep.c
@@
-24,6
+24,7
@@
#include <linux/workqueue.h>
#include <sound/core.h>
#include "hda_beep.h"
#include <linux/workqueue.h>
#include <sound/core.h>
#include "hda_beep.h"
+#include "hda_local.h"
enum {
DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */
enum {
DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */
@@
-115,6
+116,9
@@
int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
struct hda_beep *beep;
int err;
struct hda_beep *beep;
int err;
+ if (!snd_hda_get_bool_hint(codec, "beep"))
+ return 0; /* disabled explicitly */
+
beep = kzalloc(sizeof(*beep), GFP_KERNEL);
if (beep == NULL)
return -ENOMEM;
beep = kzalloc(sizeof(*beep), GFP_KERNEL);
if (beep == NULL)
return -ENOMEM;