diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-16 14:33:49 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 14:33:49 (GMT) |
commit | 9bb1fe390de3e1def0dd162dbdaf62e0981105fa (patch) | |
tree | 6e0ae2081e0125030ead15c8d53b40dc14e93af9 /sound/pci | |
parent | d5191e50b251594bdde10d4839a952ff1646ef62 (diff) | |
download | linux-fsl-qoriq-9bb1fe390de3e1def0dd162dbdaf62e0981105fa.tar.xz |
ALSA: hda - Fix beep_mode option value
The beep_mode option value was wrongly defined: it must be 0 = off and
1 = on.
Also, evaluate the beep_mode value at snd_hda_attach_beep_device()
properly so that no device is created when beep_mode=0 is given.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_beep.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 9e48798..5fe34a8 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c @@ -215,7 +215,9 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) struct hda_beep *beep; if (!snd_hda_get_bool_hint(codec, "beep")) - return 0; /* disabled explicitly */ + return 0; /* disabled explicitly by hints */ + if (codec->beep_mode == HDA_BEEP_MODE_OFF) + return 0; /* disabled by module option */ beep = kzalloc(sizeof(*beep), GFP_KERNEL); if (beep == NULL) diff --git a/sound/pci/hda/hda_beep.h b/sound/pci/hda/hda_beep.h index 17dd1c3..f1de1ba 100644 --- a/sound/pci/hda/hda_beep.h +++ b/sound/pci/hda/hda_beep.h @@ -24,8 +24,8 @@ #include "hda_codec.h" -#define HDA_BEEP_MODE_ON 0 -#define HDA_BEEP_MODE_OFF 1 +#define HDA_BEEP_MODE_OFF 0 +#define HDA_BEEP_MODE_ON 1 #define HDA_BEEP_MODE_SWREG 2 /* beep information */ |