aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ff614dd824c1..d7fd846e6c49 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10566,10 +10566,12 @@ static int patch_alc882(struct hda_codec *codec)
10566 } 10566 }
10567 } 10567 }
10568 10568
10569 err = snd_hda_attach_beep_device(codec, 0x1); 10569 if (spec->cdefine.enable_pcbeep) {
10570 if (err < 0) { 10570 err = snd_hda_attach_beep_device(codec, 0x1);
10571 alc_free(codec); 10571 if (err < 0) {
10572 return err; 10572 alc_free(codec);
10573 return err;
10574 }
10573 } 10575 }
10574 10576
10575 if (board_config != ALC882_AUTO) 10577 if (board_config != ALC882_AUTO)
@@ -12435,7 +12437,7 @@ static int patch_alc262(struct hda_codec *codec)
12435 } 12437 }
12436 } 12438 }
12437 12439
12438 if (!spec->no_analog) { 12440 if (!spec->no_analog && spec->cdefine.enable_pcbeep) {
12439 err = snd_hda_attach_beep_device(codec, 0x1); 12441 err = snd_hda_attach_beep_device(codec, 0x1);
12440 if (err < 0) { 12442 if (err < 0) {
12441 alc_free(codec); 12443 alc_free(codec);
@@ -14458,10 +14460,12 @@ static int patch_alc269(struct hda_codec *codec)
14458 } 14460 }
14459 } 14461 }
14460 14462
14461 err = snd_hda_attach_beep_device(codec, 0x1); 14463 if (spec->cdefine.enable_pcbeep) {
14462 if (err < 0) { 14464 err = snd_hda_attach_beep_device(codec, 0x1);
14463 alc_free(codec); 14465 if (err < 0) {
14464 return err; 14466 alc_free(codec);
14467 return err;
14468 }
14465 } 14469 }
14466 14470
14467 if (board_config != ALC269_AUTO) 14471 if (board_config != ALC269_AUTO)
@@ -18691,10 +18695,12 @@ static int patch_alc662(struct hda_codec *codec)
18691 } 18695 }
18692 } 18696 }
18693 18697
18694 err = snd_hda_attach_beep_device(codec, 0x1); 18698 if (spec->cdefine.enable_pcbeep) {
18695 if (err < 0) { 18699 err = snd_hda_attach_beep_device(codec, 0x1);
18696 alc_free(codec); 18700 if (err < 0) {
18697 return err; 18701 alc_free(codec);
18702 return err;
18703 }
18698 } 18704 }
18699 18705
18700 if (board_config != ALC662_AUTO) 18706 if (board_config != ALC662_AUTO)