aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-22 09:55:37 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-22 09:55:37 +0200
commit2722b535337b35a9c0be50de687cccda4ab9468d (patch)
treebd91fb217914bbf45f6e95c533d7f0fe433b2b86 /sound/pci/hda/patch_realtek.c
parentALSA: hda - Define a fallback_pin_fixup_tbl for alc269 family (diff)
downloadlinux-dev-2722b535337b35a9c0be50de687cccda4ab9468d.tar.xz
linux-dev-2722b535337b35a9c0be50de687cccda4ab9468d.zip
ALSA: hda/realtek - Check beep whitelist before assigning in all codecs
Some Realtek codec parsers didn't check the availability of PC beep. Add has_cdefine_beep() check appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b6ae452a1d8f..19831521bd95 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2848,7 +2848,8 @@ static int patch_alc268(struct hda_codec *codec)
return err;
spec = codec->spec;
- spec->gen.beep_nid = 0x01;
+ if (has_cdefine_beep(codec))
+ spec->gen.beep_nid = 0x01;
spec->shutup = alc_eapd_shutup;
@@ -8102,7 +8103,8 @@ static int patch_alc861(struct hda_codec *codec)
return err;
spec = codec->spec;
- spec->gen.beep_nid = 0x23;
+ if (has_cdefine_beep(codec))
+ spec->gen.beep_nid = 0x23;
#ifdef CONFIG_PM
spec->power_hook = alc_power_eapd;
@@ -8203,7 +8205,8 @@ static int patch_alc861vd(struct hda_codec *codec)
return err;
spec = codec->spec;
- spec->gen.beep_nid = 0x23;
+ if (has_cdefine_beep(codec))
+ spec->gen.beep_nid = 0x23;
spec->shutup = alc_eapd_shutup;