diff options
Diffstat (limited to 'sound/pci/hda/hda_beep.c')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 662de6e58b6f..336b4b3a80b9 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -231,3 +231,31 @@ void snd_hda_detach_beep_device(struct hda_codec *codec) | |||
231 | } | 231 | } |
232 | } | 232 | } |
233 | EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device); | 233 | EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device); |
234 | |||
235 | /* get/put callbacks for beep mute mixer switches */ | ||
236 | int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, | ||
237 | struct snd_ctl_elem_value *ucontrol) | ||
238 | { | ||
239 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
240 | struct hda_beep *beep = codec->beep; | ||
241 | if (beep) { | ||
242 | ucontrol->value.integer.value[0] = | ||
243 | ucontrol->value.integer.value[1] = | ||
244 | beep->enabled; | ||
245 | return 0; | ||
246 | } | ||
247 | return snd_hda_mixer_amp_switch_get(kcontrol, ucontrol); | ||
248 | } | ||
249 | EXPORT_SYMBOL_HDA(snd_hda_mixer_amp_switch_get_beep); | ||
250 | |||
251 | int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, | ||
252 | struct snd_ctl_elem_value *ucontrol) | ||
253 | { | ||
254 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
255 | struct hda_beep *beep = codec->beep; | ||
256 | if (beep) | ||
257 | snd_hda_enable_beep_device(codec, | ||
258 | *ucontrol->value.integer.value); | ||
259 | return snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | ||
260 | } | ||
261 | EXPORT_SYMBOL_HDA(snd_hda_mixer_amp_switch_put_beep); | ||