diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-07-28 11:37:16 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-28 11:37:16 -0400 |
commit | 8af2591d6342a9e4bb79b4f1236246a79d20ebee (patch) | |
tree | 7b7beb1ee2aa2e933c73b417a4347d3457dce381 /sound | |
parent | 38faddb1afdd37218c196ac3db1cb5fbe7fc9c75 (diff) |
ALSA: hda - Don't register beep input device when no beep is available
We check now the availability of PC beep and skip the build of beep
mixers, but the driver still registers the input device. This should
be checked as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 32 |
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) |