Commit b7b51141 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 28d0325c
......@@ -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 */
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment