Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8af2591d authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 38faddb1
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
@@ -10566,11 +10566,13 @@ static int patch_alc882(struct hda_codec *codec)
		}
	}
	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)
		setup_preset(codec, &alc882_presets[board_config]);
@@ -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,11 +14460,13 @@ static int patch_alc269(struct hda_codec *codec)
		}
	}
	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)
		setup_preset(codec, &alc269_presets[board_config]);
@@ -18691,11 +18695,13 @@ static int patch_alc662(struct hda_codec *codec)
		}
	}
	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)
		setup_preset(codec, &alc662_presets[board_config]);