diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-29 11:03:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-29 11:03:58 -0400 |
commit | 95a962c36f6e3c3edb438d1ba59e30964900d16a (patch) | |
tree | f3c12eab3e7196297f0114313f48134ceb2cea98 /sound/pci/hda/hda_beep.c | |
parent | a11e9b168646cfc5d3b8d605d430d7e4ff267d72 (diff) |
ALSA: hda - More kerneldoc comments
Put more kerneldoc comments to the exported functions.
Still the generic parser code and the HD-audio controller code aren't
covered yet, though.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_beep.c')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 8c6c50afc0b7..1e7de08e77cb 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -175,6 +175,11 @@ static int snd_hda_do_attach(struct hda_beep *beep) | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | /** | ||
179 | * snd_hda_enable_beep_device - Turn on/off beep sound | ||
180 | * @codec: the HDA codec | ||
181 | * @enable: flag to turn on/off | ||
182 | */ | ||
178 | int snd_hda_enable_beep_device(struct hda_codec *codec, int enable) | 183 | int snd_hda_enable_beep_device(struct hda_codec *codec, int enable) |
179 | { | 184 | { |
180 | struct hda_beep *beep = codec->beep; | 185 | struct hda_beep *beep = codec->beep; |
@@ -191,6 +196,20 @@ int snd_hda_enable_beep_device(struct hda_codec *codec, int enable) | |||
191 | } | 196 | } |
192 | EXPORT_SYMBOL_GPL(snd_hda_enable_beep_device); | 197 | EXPORT_SYMBOL_GPL(snd_hda_enable_beep_device); |
193 | 198 | ||
199 | /** | ||
200 | * snd_hda_attach_beep_device - Attach a beep input device | ||
201 | * @codec: the HDA codec | ||
202 | * @nid: beep NID | ||
203 | * | ||
204 | * Attach a beep object to the given widget. If beep hint is turned off | ||
205 | * explicitly or beep_mode of the codec is turned off, this doesn't nothing. | ||
206 | * | ||
207 | * The attached beep device has to be registered via | ||
208 | * snd_hda_register_beep_device() and released via snd_hda_detach_beep_device() | ||
209 | * appropriately. | ||
210 | * | ||
211 | * Currently, only one beep device is allowed to each codec. | ||
212 | */ | ||
194 | int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) | 213 | int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) |
195 | { | 214 | { |
196 | struct hda_beep *beep; | 215 | struct hda_beep *beep; |
@@ -228,6 +247,10 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) | |||
228 | } | 247 | } |
229 | EXPORT_SYMBOL_GPL(snd_hda_attach_beep_device); | 248 | EXPORT_SYMBOL_GPL(snd_hda_attach_beep_device); |
230 | 249 | ||
250 | /** | ||
251 | * snd_hda_detach_beep_device - Detach the beep device | ||
252 | * @codec: the HDA codec | ||
253 | */ | ||
231 | void snd_hda_detach_beep_device(struct hda_codec *codec) | 254 | void snd_hda_detach_beep_device(struct hda_codec *codec) |
232 | { | 255 | { |
233 | struct hda_beep *beep = codec->beep; | 256 | struct hda_beep *beep = codec->beep; |
@@ -240,6 +263,10 @@ void snd_hda_detach_beep_device(struct hda_codec *codec) | |||
240 | } | 263 | } |
241 | EXPORT_SYMBOL_GPL(snd_hda_detach_beep_device); | 264 | EXPORT_SYMBOL_GPL(snd_hda_detach_beep_device); |
242 | 265 | ||
266 | /** | ||
267 | * snd_hda_register_beep_device - Register the beep device | ||
268 | * @codec: the HDA codec | ||
269 | */ | ||
243 | int snd_hda_register_beep_device(struct hda_codec *codec) | 270 | int snd_hda_register_beep_device(struct hda_codec *codec) |
244 | { | 271 | { |
245 | struct hda_beep *beep = codec->beep; | 272 | struct hda_beep *beep = codec->beep; |
@@ -269,6 +296,12 @@ static bool ctl_has_mute(struct snd_kcontrol *kcontrol) | |||
269 | } | 296 | } |
270 | 297 | ||
271 | /* get/put callbacks for beep mute mixer switches */ | 298 | /* get/put callbacks for beep mute mixer switches */ |
299 | |||
300 | /** | ||
301 | * snd_hda_mixer_amp_switch_get_beep - Get callback for beep controls | ||
302 | * @kcontrol: ctl element | ||
303 | * @ucontrol: pointer to get/store the data | ||
304 | */ | ||
272 | int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, | 305 | int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, |
273 | struct snd_ctl_elem_value *ucontrol) | 306 | struct snd_ctl_elem_value *ucontrol) |
274 | { | 307 | { |
@@ -283,6 +316,11 @@ int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol, | |||
283 | } | 316 | } |
284 | EXPORT_SYMBOL_GPL(snd_hda_mixer_amp_switch_get_beep); | 317 | EXPORT_SYMBOL_GPL(snd_hda_mixer_amp_switch_get_beep); |
285 | 318 | ||
319 | /** | ||
320 | * snd_hda_mixer_amp_switch_put_beep - Put callback for beep controls | ||
321 | * @kcontrol: ctl element | ||
322 | * @ucontrol: pointer to get/store the data | ||
323 | */ | ||
286 | int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, | 324 | int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, |
287 | struct snd_ctl_elem_value *ucontrol) | 325 | struct snd_ctl_elem_value *ucontrol) |
288 | { | 326 | { |