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>
This commit is contained in:
parent
7c0a69394c
commit
2722b53533
|
@ -2848,7 +2848,8 @@ static int patch_alc268(struct hda_codec *codec)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
spec = codec->spec;
|
spec = codec->spec;
|
||||||
spec->gen.beep_nid = 0x01;
|
if (has_cdefine_beep(codec))
|
||||||
|
spec->gen.beep_nid = 0x01;
|
||||||
|
|
||||||
spec->shutup = alc_eapd_shutup;
|
spec->shutup = alc_eapd_shutup;
|
||||||
|
|
||||||
|
@ -8102,7 +8103,8 @@ static int patch_alc861(struct hda_codec *codec)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
spec = codec->spec;
|
spec = codec->spec;
|
||||||
spec->gen.beep_nid = 0x23;
|
if (has_cdefine_beep(codec))
|
||||||
|
spec->gen.beep_nid = 0x23;
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
spec->power_hook = alc_power_eapd;
|
spec->power_hook = alc_power_eapd;
|
||||||
|
@ -8203,7 +8205,8 @@ static int patch_alc861vd(struct hda_codec *codec)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
spec = codec->spec;
|
spec = codec->spec;
|
||||||
spec->gen.beep_nid = 0x23;
|
if (has_cdefine_beep(codec))
|
||||||
|
spec->gen.beep_nid = 0x23;
|
||||||
|
|
||||||
spec->shutup = alc_eapd_shutup;
|
spec->shutup = alc_eapd_shutup;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue