aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-16 15:35:59 +0100
committerTakashi Iwai <tiwai@suse.de>2009-11-16 15:35:59 +0100
commit67d634c07afd8f70973d925463e775fdb89ad536 (patch)
tree21096af1e9253d6143b03fe3049578871059b6b9 /sound/pci/hda/patch_realtek.c
parent9bb1fe390de3e1def0dd162dbdaf62e0981105fa (diff)
ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=n
Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index eee3143eef7..ef7d21097ee 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2410,12 +2410,14 @@ static const char *alc_slave_sws[] = {
static void alc_free_kctls(struct hda_codec *codec);
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
/* additional beep mixers; the actual parameters are overwritten at build */
static struct snd_kcontrol_new alc_beep_mixer[] = {
HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT),
HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_INPUT),
{ } /* end */
};
+#endif
static int alc_build_controls(struct hda_codec *codec)
{
@@ -2452,6 +2454,7 @@ static int alc_build_controls(struct hda_codec *codec)
return err;
}
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
/* create beep controls if needed */
if (spec->beep_amp) {
struct snd_kcontrol_new *knew;
@@ -2467,6 +2470,7 @@ static int alc_build_controls(struct hda_codec *codec)
return err;
}
}
+#endif
/* if we have no master control, let's create it */
if (!spec->no_analog &&
@@ -4780,8 +4784,12 @@ static void set_capture_mixer(struct hda_codec *codec)
}
}
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
#define set_beep_amp(spec, nid, idx, dir) \
((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir))
+#else
+#define set_beep_amp(spec, nid, idx, dir) /* NOP */
+#endif
/*
* OK, here we have finally the patch for ALC880