Commit 2722b535 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 7c0a6939
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2848,6 +2848,7 @@ static int patch_alc268(struct hda_codec *codec)
		return err;

	spec = codec->spec;
	if (has_cdefine_beep(codec))
		spec->gen.beep_nid = 0x01;

	spec->shutup = alc_eapd_shutup;
@@ -8102,6 +8103,7 @@ static int patch_alc861(struct hda_codec *codec)
		return err;

	spec = codec->spec;
	if (has_cdefine_beep(codec))
		spec->gen.beep_nid = 0x23;

#ifdef CONFIG_PM
@@ -8203,6 +8205,7 @@ static int patch_alc861vd(struct hda_codec *codec)
		return err;

	spec = codec->spec;
	if (has_cdefine_beep(codec))
		spec->gen.beep_nid = 0x23;

	spec->shutup = alc_eapd_shutup;