[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    ALSA: hda - Don't register beep input device when no beep is available
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2010-07-29 22:59:03
Message-ID: 201007292259.o6TMx3Xv015527 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/8af2591d6342a9e4bb79b4f1236246a79d20ebee
Commit:     8af2591d6342a9e4bb79b4f1236246a79d20ebee
Parent:     38faddb1afdd37218c196ac3db1cb5fbe7fc9c75
Author:     Takashi Iwai <tiwai@suse.de>
AuthorDate: Wed Jul 28 17:37:16 2010 +0200
Committer:  Takashi Iwai <tiwai@suse.de>
CommitDate: Wed Jul 28 17:37:16 2010 +0200

    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>
---
 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 ff614dd..d7fd846 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)
 		}
 	}
 
-	err = snd_hda_attach_beep_device(codec, 0x1);
-	if (err < 0) {
-		alc_free(codec);
-		return err;
+	if (spec->cdefine.enable_pcbeep) {
+		err = snd_hda_attach_beep_device(codec, 0x1);
+		if (err < 0) {
+			alc_free(codec);
+			return err;
+		}
 	}
 
 	if (board_config != ALC882_AUTO)
@@ -12435,7 +12437,7 @@ static int patch_alc262(struct hda_codec *codec)
 		}
 	}
 
-	if (!spec->no_analog) {
+	if (!spec->no_analog && spec->cdefine.enable_pcbeep) {
 		err = snd_hda_attach_beep_device(codec, 0x1);
 		if (err < 0) {
 			alc_free(codec);
@@ -14458,10 +14460,12 @@ static int patch_alc269(struct hda_codec *codec)
 		}
 	}
 
-	err = snd_hda_attach_beep_device(codec, 0x1);
-	if (err < 0) {
-		alc_free(codec);
-		return err;
+	if (spec->cdefine.enable_pcbeep) {
+		err = snd_hda_attach_beep_device(codec, 0x1);
+		if (err < 0) {
+			alc_free(codec);
+			return err;
+		}
 	}
 
 	if (board_config != ALC269_AUTO)
@@ -18691,10 +18695,12 @@ static int patch_alc662(struct hda_codec *codec)
 		}
 	}
 
-	err = snd_hda_attach_beep_device(codec, 0x1);
-	if (err < 0) {
-		alc_free(codec);
-		return err;
+	if (spec->cdefine.enable_pcbeep) {
+		err = snd_hda_attach_beep_device(codec, 0x1);
+		if (err < 0) {
+			alc_free(codec);
+			return err;
+		}
 	}
 
 	if (board_config != ALC662_AUTO)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic