Skip to content

Commit

Permalink
ALSA: hda - Check "beep" hint
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jun 29, 2009
1 parent 28d0325 commit b7b5114
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/pci/hda/hda_beep.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/workqueue.h>
#include <sound/core.h>
#include "hda_beep.h"
#include "hda_local.h"

enum {
DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */
Expand Down Expand Up @@ -115,6 +116,9 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
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;
Expand Down

0 comments on commit b7b5114

Please sign in to comment.