aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/control.h5
-rw-r--r--include/sound/core.h2
-rw-r--r--include/sound/pcm.h23
-rw-r--r--sound/core/control.c41
-rw-r--r--sound/core/device.c8
-rw-r--r--sound/core/hwdep.c2
-rw-r--r--sound/core/info.c16
-rw-r--r--sound/core/init.c16
-rw-r--r--sound/core/isadma.c2
-rw-r--r--sound/core/jack.c6
-rw-r--r--sound/core/memalloc.c20
-rw-r--r--sound/core/memory.c4
-rw-r--r--sound/core/pcm.c6
-rw-r--r--sound/core/pcm_lib.c54
-rw-r--r--sound/core/pcm_memory.c19
-rw-r--r--sound/core/pcm_misc.c28
-rw-r--r--sound/core/pcm_native.c13
-rw-r--r--sound/core/rawmidi.c14
-rw-r--r--sound/core/sound.c7
-rw-r--r--sound/core/vmaster.c7
-rw-r--r--sound/drivers/mpu401/mpu401_uart.c6
-rw-r--r--sound/pci/ac97/ac97_codec.c16
-rw-r--r--sound/pci/ac97/ac97_pcm.c10
-rw-r--r--sound/sound_core.c22
24 files changed, 221 insertions, 126 deletions
diff --git a/include/sound/control.h b/include/sound/control.h
index 8332e865c759..34bc93d80d55 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -189,7 +189,6 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
189 * 189 *
190 * Add a virtual slave control to the given master element created via 190 * Add a virtual slave control to the given master element created via
191 * snd_ctl_create_virtual_master() beforehand. 191 * snd_ctl_create_virtual_master() beforehand.
192 * Returns zero if successful or a negative error code.
193 * 192 *
194 * All slaves must be the same type (returning the same information 193 * All slaves must be the same type (returning the same information
195 * via info callback). The function doesn't check it, so it's your 194 * via info callback). The function doesn't check it, so it's your
@@ -199,6 +198,8 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
199 * at most two channels, 198 * at most two channels,
200 * logarithmic volume control (dB level) thus no linear volume, 199 * logarithmic volume control (dB level) thus no linear volume,
201 * master can only attenuate the volume without gain 200 * master can only attenuate the volume without gain
201 *
202 * Return: Zero if successful or a negative error code.
202 */ 203 */
203static inline int 204static inline int
204snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) 205snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
@@ -219,6 +220,8 @@ snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
219 * When the control peeks the hardware values directly and the value 220 * When the control peeks the hardware values directly and the value
220 * can be changed by other means than the put callback of the element, 221 * can be changed by other means than the put callback of the element,
221 * this function should be used to keep the value always up-to-date. 222 * this function should be used to keep the value always up-to-date.
223 *
224 * Return: Zero if successful or a negative error code.
222 */ 225 */
223static inline int 226static inline int
224snd_ctl_add_slave_uncached(struct snd_kcontrol *master, 227snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
diff --git a/include/sound/core.h b/include/sound/core.h
index a63680b9819d..5bfe5136441c 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -229,7 +229,7 @@ int snd_register_device_for_dev(int type, struct snd_card *card,
229 * This function uses the card's device pointer to link to the 229 * This function uses the card's device pointer to link to the
230 * correct &struct device. 230 * correct &struct device.
231 * 231 *
232 * Returns zero if successful, or a negative error code on failure. 232 * Return: Zero if successful, or a negative error code on failure.
233 */ 233 */
234static inline int snd_register_device(int type, struct snd_card *card, int dev, 234static inline int snd_register_device(int type, struct snd_card *card, int dev,
235 const struct file_operations *f_ops, 235 const struct file_operations *f_ops,
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 45c1981c9ca2..aa7b0a8385cb 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -659,7 +659,7 @@ static inline snd_pcm_sframes_t snd_pcm_capture_hw_avail(struct snd_pcm_runtime
659 * 659 *
660 * Checks whether enough free space is available on the playback buffer. 660 * Checks whether enough free space is available on the playback buffer.
661 * 661 *
662 * Returns non-zero if available, or zero if not. 662 * Return: Non-zero if available, or zero if not.
663 */ 663 */
664static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream) 664static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
665{ 665{
@@ -673,7 +673,7 @@ static inline int snd_pcm_playback_ready(struct snd_pcm_substream *substream)
673 * 673 *
674 * Checks whether enough capture data is available on the capture buffer. 674 * Checks whether enough capture data is available on the capture buffer.
675 * 675 *
676 * Returns non-zero if available, or zero if not. 676 * Return: Non-zero if available, or zero if not.
677 */ 677 */
678static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream) 678static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
679{ 679{
@@ -685,10 +685,10 @@ static inline int snd_pcm_capture_ready(struct snd_pcm_substream *substream)
685 * snd_pcm_playback_data - check whether any data exists on the playback buffer 685 * snd_pcm_playback_data - check whether any data exists on the playback buffer
686 * @substream: the pcm substream instance 686 * @substream: the pcm substream instance
687 * 687 *
688 * Checks whether any data exists on the playback buffer. If stop_threshold 688 * Checks whether any data exists on the playback buffer.
689 * is bigger or equal to boundary, then this function returns always non-zero.
690 * 689 *
691 * Returns non-zero if exists, or zero if not. 690 * Return: Non-zero if any data exists, or zero if not. If stop_threshold
691 * is bigger or equal to boundary, then this function returns always non-zero.
692 */ 692 */
693static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream) 693static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
694{ 694{
@@ -705,7 +705,7 @@ static inline int snd_pcm_playback_data(struct snd_pcm_substream *substream)
705 * 705 *
706 * Checks whether the playback buffer is empty. 706 * Checks whether the playback buffer is empty.
707 * 707 *
708 * Returns non-zero if empty, or zero if not. 708 * Return: Non-zero if empty, or zero if not.
709 */ 709 */
710static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream) 710static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
711{ 711{
@@ -719,7 +719,7 @@ static inline int snd_pcm_playback_empty(struct snd_pcm_substream *substream)
719 * 719 *
720 * Checks whether the capture buffer is empty. 720 * Checks whether the capture buffer is empty.
721 * 721 *
722 * Returns non-zero if empty, or zero if not. 722 * Return: Non-zero if empty, or zero if not.
723 */ 723 */
724static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream) 724static inline int snd_pcm_capture_empty(struct snd_pcm_substream *substream)
725{ 725{
@@ -852,7 +852,7 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format);
852 * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian 852 * snd_pcm_format_cpu_endian - Check the PCM format is CPU-endian
853 * @format: the format to check 853 * @format: the format to check
854 * 854 *
855 * Returns 1 if the given PCM format is CPU-endian, 0 if 855 * Return: 1 if the given PCM format is CPU-endian, 0 if
856 * opposite, or a negative error code if endian not specified. 856 * opposite, or a negative error code if endian not specified.
857 */ 857 */
858int snd_pcm_format_cpu_endian(snd_pcm_format_t format); 858int snd_pcm_format_cpu_endian(snd_pcm_format_t format);
@@ -963,7 +963,7 @@ struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
963 * contiguous in kernel virtual space, but not in physical memory. Use this 963 * contiguous in kernel virtual space, but not in physical memory. Use this
964 * if the buffer is accessed by kernel code but not by device DMA. 964 * if the buffer is accessed by kernel code but not by device DMA.
965 * 965 *
966 * Returns 1 if the buffer was changed, 0 if not changed, or a negative error 966 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
967 * code. 967 * code.
968 */ 968 */
969static int snd_pcm_lib_alloc_vmalloc_buffer 969static int snd_pcm_lib_alloc_vmalloc_buffer
@@ -975,6 +975,9 @@ static int snd_pcm_lib_alloc_vmalloc_buffer
975 * 975 *
976 * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses 976 * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses
977 * vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory. 977 * vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory.
978 *
979 * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
980 * code.
978 */ 981 */
979static int snd_pcm_lib_alloc_vmalloc_32_buffer 982static int snd_pcm_lib_alloc_vmalloc_32_buffer
980 (struct snd_pcm_substream *substream, size_t size); 983 (struct snd_pcm_substream *substream, size_t size);
@@ -1070,6 +1073,8 @@ const char *snd_pcm_format_name(snd_pcm_format_t format);
1070/** 1073/**
1071 * snd_pcm_stream_str - Get a string naming the direction of a stream 1074 * snd_pcm_stream_str - Get a string naming the direction of a stream
1072 * @substream: the pcm substream instance 1075 * @substream: the pcm substream instance
1076 *
1077 * Return: A string naming the direction of the stream.
1073 */ 1078 */
1074static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) 1079static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
1075{ 1080{
diff --git a/sound/core/control.c b/sound/core/control.c
index 8c7c2c9bba61..d8aa206e8bde 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -190,7 +190,7 @@ EXPORT_SYMBOL(snd_ctl_notify);
190 * Allocates a new struct snd_kcontrol instance and copies the given template 190 * Allocates a new struct snd_kcontrol instance and copies the given template
191 * to the new instance. It does not copy volatile data (access). 191 * to the new instance. It does not copy volatile data (access).
192 * 192 *
193 * Returns the pointer of the new instance, or NULL on failure. 193 * Return: The pointer of the new instance, or %NULL on failure.
194 */ 194 */
195static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, 195static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
196 unsigned int access) 196 unsigned int access)
@@ -224,7 +224,7 @@ static struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control,
224 * template. When the access field of ncontrol is 0, it's assumed as 224 * template. When the access field of ncontrol is 0, it's assumed as
225 * READWRITE access. When the count field is 0, it's assumes as one. 225 * READWRITE access. When the count field is 0, it's assumes as one.
226 * 226 *
227 * Returns the pointer of the newly generated instance, or NULL on failure. 227 * Return: The pointer of the newly generated instance, or %NULL on failure.
228 */ 228 */
229struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, 229struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
230 void *private_data) 230 void *private_data)
@@ -322,9 +322,10 @@ static int snd_ctl_find_hole(struct snd_card *card, unsigned int count)
322 * snd_ctl_new1() to the given card. Assigns also an unique 322 * snd_ctl_new1() to the given card. Assigns also an unique
323 * numid used for fast search. 323 * numid used for fast search.
324 * 324 *
325 * Returns zero if successful, or a negative error code on failure.
326 *
327 * It frees automatically the control which cannot be added. 325 * It frees automatically the control which cannot be added.
326 *
327 * Return: Zero if successful, or a negative error code on failure.
328 *
328 */ 329 */
329int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) 330int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
330{ 331{
@@ -380,9 +381,9 @@ EXPORT_SYMBOL(snd_ctl_add);
380 * and the add_on_replace flag is set, the control is added. If the 381 * and the add_on_replace flag is set, the control is added. If the
381 * control exists, it is destroyed first. 382 * control exists, it is destroyed first.
382 * 383 *
383 * Returns zero if successful, or a negative error code on failure.
384 *
385 * It frees automatically the control which cannot be added or replaced. 384 * It frees automatically the control which cannot be added or replaced.
385 *
386 * Return: Zero if successful, or a negative error code on failure.
386 */ 387 */
387int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol, 388int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol,
388 bool add_on_replace) 389 bool add_on_replace)
@@ -442,8 +443,8 @@ EXPORT_SYMBOL(snd_ctl_replace);
442 * Removes the control from the card and then releases the instance. 443 * Removes the control from the card and then releases the instance.
443 * You don't need to call snd_ctl_free_one(). You must be in 444 * You don't need to call snd_ctl_free_one(). You must be in
444 * the write lock - down_write(&card->controls_rwsem). 445 * the write lock - down_write(&card->controls_rwsem).
445 * 446 *
446 * Returns 0 if successful, or a negative error code on failure. 447 * Return: 0 if successful, or a negative error code on failure.
447 */ 448 */
448int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol) 449int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol)
449{ 450{
@@ -470,8 +471,8 @@ EXPORT_SYMBOL(snd_ctl_remove);
470 * 471 *
471 * Finds the control instance with the given id, removes it from the 472 * Finds the control instance with the given id, removes it from the
472 * card list and releases it. 473 * card list and releases it.
473 * 474 *
474 * Returns 0 if successful, or a negative error code on failure. 475 * Return: 0 if successful, or a negative error code on failure.
475 */ 476 */
476int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id) 477int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id)
477{ 478{
@@ -498,8 +499,8 @@ EXPORT_SYMBOL(snd_ctl_remove_id);
498 * 499 *
499 * Finds the control instance with the given id, removes it from the 500 * Finds the control instance with the given id, removes it from the
500 * card list and releases it. 501 * card list and releases it.
501 * 502 *
502 * Returns 0 if successful, or a negative error code on failure. 503 * Return: 0 if successful, or a negative error code on failure.
503 */ 504 */
504static int snd_ctl_remove_user_ctl(struct snd_ctl_file * file, 505static int snd_ctl_remove_user_ctl(struct snd_ctl_file * file,
505 struct snd_ctl_elem_id *id) 506 struct snd_ctl_elem_id *id)
@@ -541,7 +542,7 @@ error:
541 * Finds the control instance with the given id, and activate or 542 * Finds the control instance with the given id, and activate or
542 * inactivate the control together with notification, if changed. 543 * inactivate the control together with notification, if changed.
543 * 544 *
544 * Returns 0 if unchanged, 1 if changed, or a negative error code on failure. 545 * Return: 0 if unchanged, 1 if changed, or a negative error code on failure.
545 */ 546 */
546int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, 547int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
547 int active) 548 int active)
@@ -587,7 +588,7 @@ EXPORT_SYMBOL_GPL(snd_ctl_activate_id);
587 * Finds the control with the old id from the card, and replaces the 588 * Finds the control with the old id from the card, and replaces the
588 * id with the new one. 589 * id with the new one.
589 * 590 *
590 * Returns zero if successful, or a negative error code on failure. 591 * Return: Zero if successful, or a negative error code on failure.
591 */ 592 */
592int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id, 593int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id,
593 struct snd_ctl_elem_id *dst_id) 594 struct snd_ctl_elem_id *dst_id)
@@ -616,10 +617,11 @@ EXPORT_SYMBOL(snd_ctl_rename_id);
616 * 617 *
617 * Finds the control instance with the given number-id from the card. 618 * Finds the control instance with the given number-id from the card.
618 * 619 *
619 * Returns the pointer of the instance if found, or NULL if not.
620 *
621 * The caller must down card->controls_rwsem before calling this function 620 * The caller must down card->controls_rwsem before calling this function
622 * (if the race condition can happen). 621 * (if the race condition can happen).
622 *
623 * Return: The pointer of the instance if found, or %NULL if not.
624 *
623 */ 625 */
624struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid) 626struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid)
625{ 627{
@@ -643,10 +645,11 @@ EXPORT_SYMBOL(snd_ctl_find_numid);
643 * 645 *
644 * Finds the control instance with the given id from the card. 646 * Finds the control instance with the given id from the card.
645 * 647 *
646 * Returns the pointer of the instance if found, or NULL if not.
647 *
648 * The caller must down card->controls_rwsem before calling this function 648 * The caller must down card->controls_rwsem before calling this function
649 * (if the race condition can happen). 649 * (if the race condition can happen).
650 *
651 * Return: The pointer of the instance if found, or %NULL if not.
652 *
650 */ 653 */
651struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card, 654struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card,
652 struct snd_ctl_elem_id *id) 655 struct snd_ctl_elem_id *id)
@@ -1710,6 +1713,8 @@ EXPORT_SYMBOL(snd_ctl_boolean_stereo_info);
1710 * Sets all required fields in @info to their appropriate values. 1713 * Sets all required fields in @info to their appropriate values.
1711 * If the control's accessibility is not the default (readable and writable), 1714 * If the control's accessibility is not the default (readable and writable),
1712 * the caller has to fill @info->access. 1715 * the caller has to fill @info->access.
1716 *
1717 * Return: Zero.
1713 */ 1718 */
1714int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels, 1719int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
1715 unsigned int items, const char *const names[]) 1720 unsigned int items, const char *const names[])
diff --git a/sound/core/device.c b/sound/core/device.c
index f03cb5444a5a..df88defed176 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -39,7 +39,7 @@
39 * The data pointer plays a role as the identifier, too, so the 39 * The data pointer plays a role as the identifier, too, so the
40 * pointer address must be unique and unchanged. 40 * pointer address must be unique and unchanged.
41 * 41 *
42 * Returns zero if successful, or a negative error code on failure. 42 * Return: Zero if successful, or a negative error code on failure.
43 */ 43 */
44int snd_device_new(struct snd_card *card, snd_device_type_t type, 44int snd_device_new(struct snd_card *card, snd_device_type_t type,
45 void *device_data, struct snd_device_ops *ops) 45 void *device_data, struct snd_device_ops *ops)
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(snd_device_new);
73 * callbacks, dev_disconnect and dev_free, corresponding to the state. 73 * callbacks, dev_disconnect and dev_free, corresponding to the state.
74 * Then release the device. 74 * Then release the device.
75 * 75 *
76 * Returns zero if successful, or a negative error code on failure or if the 76 * Return: Zero if successful, or a negative error code on failure or if the
77 * device not found. 77 * device not found.
78 */ 78 */
79int snd_device_free(struct snd_card *card, void *device_data) 79int snd_device_free(struct snd_card *card, void *device_data)
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(snd_device_free);
116 * 116 *
117 * Usually called from snd_card_disconnect(). 117 * Usually called from snd_card_disconnect().
118 * 118 *
119 * Returns zero if successful, or a negative error code on failure or if the 119 * Return: Zero if successful, or a negative error code on failure or if the
120 * device not found. 120 * device not found.
121 */ 121 */
122int snd_device_disconnect(struct snd_card *card, void *device_data) 122int snd_device_disconnect(struct snd_card *card, void *device_data)
@@ -151,7 +151,7 @@ int snd_device_disconnect(struct snd_card *card, void *device_data)
151 * but it can be called later if any new devices are created after 151 * but it can be called later if any new devices are created after
152 * invocation of snd_card_register(). 152 * invocation of snd_card_register().
153 * 153 *
154 * Returns zero if successful, or a negative error code on failure or if the 154 * Return: Zero if successful, or a negative error code on failure or if the
155 * device not found. 155 * device not found.
156 */ 156 */
157int snd_device_register(struct snd_card *card, void *device_data) 157int snd_device_register(struct snd_card *card, void *device_data)
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 3f7f6628cf7b..d105073298cb 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -356,7 +356,7 @@ static const struct file_operations snd_hwdep_f_ops =
356 * The callbacks (hwdep->ops) must be set on the returned instance 356 * The callbacks (hwdep->ops) must be set on the returned instance
357 * after this call manually by the caller. 357 * after this call manually by the caller.
358 * 358 *
359 * Returns zero if successful, or a negative error code on failure. 359 * Return: Zero if successful, or a negative error code on failure.
360 */ 360 */
361int snd_hwdep_new(struct snd_card *card, char *id, int device, 361int snd_hwdep_new(struct snd_card *card, char *id, int device,
362 struct snd_hwdep **rhwdep) 362 struct snd_hwdep **rhwdep)
diff --git a/sound/core/info.c b/sound/core/info.c
index 5bb97e7d325a..db308dbc8911 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -105,7 +105,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
105 * 105 *
106 * Outputs the string on the procfs buffer just like printf(). 106 * Outputs the string on the procfs buffer just like printf().
107 * 107 *
108 * Returns the size of output string. 108 * Return: The size of output string, or a negative error code.
109 */ 109 */
110int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) 110int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...)
111{ 111{
@@ -694,7 +694,7 @@ int snd_info_card_free(struct snd_card *card)
694 * 694 *
695 * Reads one line from the buffer and stores the string. 695 * Reads one line from the buffer and stores the string.
696 * 696 *
697 * Returns zero if successful, or 1 if error or EOF. 697 * Return: Zero if successful, or 1 if error or EOF.
698 */ 698 */
699int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) 699int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
700{ 700{
@@ -735,7 +735,7 @@ EXPORT_SYMBOL(snd_info_get_line);
735 * Parses the original string and copy a token to the given 735 * Parses the original string and copy a token to the given
736 * string buffer. 736 * string buffer.
737 * 737 *
738 * Returns the updated pointer of the original string so that 738 * Return: The updated pointer of the original string so that
739 * it can be used for the next call. 739 * it can be used for the next call.
740 */ 740 */
741const char *snd_info_get_str(char *dest, const char *src, int len) 741const char *snd_info_get_str(char *dest, const char *src, int len)
@@ -774,7 +774,7 @@ EXPORT_SYMBOL(snd_info_get_str);
774 * Usually called from other functions such as 774 * Usually called from other functions such as
775 * snd_info_create_card_entry(). 775 * snd_info_create_card_entry().
776 * 776 *
777 * Returns the pointer of the new instance, or NULL on failure. 777 * Return: The pointer of the new instance, or %NULL on failure.
778 */ 778 */
779static struct snd_info_entry *snd_info_create_entry(const char *name) 779static struct snd_info_entry *snd_info_create_entry(const char *name)
780{ 780{
@@ -803,7 +803,7 @@ static struct snd_info_entry *snd_info_create_entry(const char *name)
803 * 803 *
804 * Creates a new info entry and assigns it to the given module. 804 * Creates a new info entry and assigns it to the given module.
805 * 805 *
806 * Returns the pointer of the new instance, or NULL on failure. 806 * Return: The pointer of the new instance, or %NULL on failure.
807 */ 807 */
808struct snd_info_entry *snd_info_create_module_entry(struct module * module, 808struct snd_info_entry *snd_info_create_module_entry(struct module * module,
809 const char *name, 809 const char *name,
@@ -827,7 +827,7 @@ EXPORT_SYMBOL(snd_info_create_module_entry);
827 * 827 *
828 * Creates a new info entry and assigns it to the given card. 828 * Creates a new info entry and assigns it to the given card.
829 * 829 *
830 * Returns the pointer of the new instance, or NULL on failure. 830 * Return: The pointer of the new instance, or %NULL on failure.
831 */ 831 */
832struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, 832struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
833 const char *name, 833 const char *name,
@@ -893,7 +893,7 @@ static int snd_info_dev_register_entry(struct snd_device *device)
893 * For releasing this entry, use snd_device_free() instead of 893 * For releasing this entry, use snd_device_free() instead of
894 * snd_info_free_entry(). 894 * snd_info_free_entry().
895 * 895 *
896 * Returns zero if successful, or a negative error code on failure. 896 * Return: Zero if successful, or a negative error code on failure.
897 */ 897 */
898int snd_card_proc_new(struct snd_card *card, const char *name, 898int snd_card_proc_new(struct snd_card *card, const char *name,
899 struct snd_info_entry **entryp) 899 struct snd_info_entry **entryp)
@@ -949,7 +949,7 @@ EXPORT_SYMBOL(snd_info_free_entry);
949 * 949 *
950 * Registers the proc info entry. 950 * Registers the proc info entry.
951 * 951 *
952 * Returns zero if successful, or a negative error code on failure. 952 * Return: Zero if successful, or a negative error code on failure.
953 */ 953 */
954int snd_info_register(struct snd_info_entry * entry) 954int snd_info_register(struct snd_info_entry * entry)
955{ 955{
diff --git a/sound/core/init.c b/sound/core/init.c
index 7b012d15c2cf..6ef06400dfc8 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -144,7 +144,7 @@ static inline int init_info_for_card(struct snd_card *card)
144 * space for the driver to use freely. The allocated struct is stored 144 * space for the driver to use freely. The allocated struct is stored
145 * in the given card_ret pointer. 145 * in the given card_ret pointer.
146 * 146 *
147 * Returns zero if successful or a negative error code. 147 * Return: Zero if successful or a negative error code.
148 */ 148 */
149int snd_card_create(int idx, const char *xid, 149int snd_card_create(int idx, const char *xid,
150 struct module *module, int extra_size, 150 struct module *module, int extra_size,
@@ -337,7 +337,7 @@ static const struct file_operations snd_shutdown_f_ops =
337 * 337 *
338 * Disconnects all APIs from the file-operations (user space). 338 * Disconnects all APIs from the file-operations (user space).
339 * 339 *
340 * Returns zero, otherwise a negative error code. 340 * Return: Zero, otherwise a negative error code.
341 * 341 *
342 * Note: The current implementation replaces all active file->f_op with special 342 * Note: The current implementation replaces all active file->f_op with special
343 * dummy file operations (they do nothing except release). 343 * dummy file operations (they do nothing except release).
@@ -415,7 +415,7 @@ EXPORT_SYMBOL(snd_card_disconnect);
415 * devices automatically. That is, you don't have to release the devices 415 * devices automatically. That is, you don't have to release the devices
416 * by yourself. 416 * by yourself.
417 * 417 *
418 * Returns zero. Frees all associated devices and frees the control 418 * Return: Zero. Frees all associated devices and frees the control
419 * interface associated to given soundcard. 419 * interface associated to given soundcard.
420 */ 420 */
421static int snd_card_do_free(struct snd_card *card) 421static int snd_card_do_free(struct snd_card *card)
@@ -677,7 +677,7 @@ static struct device_attribute card_number_attrs =
677 * external accesses. Thus, you should call this function at the end 677 * external accesses. Thus, you should call this function at the end
678 * of the initialization of the card. 678 * of the initialization of the card.
679 * 679 *
680 * Returns zero otherwise a negative error code if the registration failed. 680 * Return: Zero otherwise a negative error code if the registration failed.
681 */ 681 */
682int snd_card_register(struct snd_card *card) 682int snd_card_register(struct snd_card *card)
683{ 683{
@@ -849,7 +849,7 @@ int __exit snd_card_info_done(void)
849 * This function adds the component id string to the supported list. 849 * This function adds the component id string to the supported list.
850 * The component can be referred from the alsa-lib. 850 * The component can be referred from the alsa-lib.
851 * 851 *
852 * Returns zero otherwise a negative error code. 852 * Return: Zero otherwise a negative error code.
853 */ 853 */
854 854
855int snd_component_add(struct snd_card *card, const char *component) 855int snd_component_add(struct snd_card *card, const char *component)
@@ -883,7 +883,7 @@ EXPORT_SYMBOL(snd_component_add);
883 * This linked-list is used to keep tracking the connection state, 883 * This linked-list is used to keep tracking the connection state,
884 * and to avoid the release of busy resources by hotplug. 884 * and to avoid the release of busy resources by hotplug.
885 * 885 *
886 * Returns zero or a negative error code. 886 * Return: zero or a negative error code.
887 */ 887 */
888int snd_card_file_add(struct snd_card *card, struct file *file) 888int snd_card_file_add(struct snd_card *card, struct file *file)
889{ 889{
@@ -920,7 +920,7 @@ EXPORT_SYMBOL(snd_card_file_add);
920 * called beforehand, it processes the pending release of 920 * called beforehand, it processes the pending release of
921 * resources. 921 * resources.
922 * 922 *
923 * Returns zero or a negative error code. 923 * Return: Zero or a negative error code.
924 */ 924 */
925int snd_card_file_remove(struct snd_card *card, struct file *file) 925int snd_card_file_remove(struct snd_card *card, struct file *file)
926{ 926{
@@ -959,6 +959,8 @@ EXPORT_SYMBOL(snd_card_file_remove);
959 * 959 *
960 * Waits until the power-state is changed. 960 * Waits until the power-state is changed.
961 * 961 *
962 * Return: Zero if successful, or a negative error code.
963 *
962 * Note: the power lock must be active before call. 964 * Note: the power lock must be active before call.
963 */ 965 */
964int snd_power_wait(struct snd_card *card, unsigned int power_state) 966int snd_power_wait(struct snd_card *card, unsigned int power_state)
diff --git a/sound/core/isadma.c b/sound/core/isadma.c
index c0f1208bb7df..e2b386156a4c 100644
--- a/sound/core/isadma.c
+++ b/sound/core/isadma.c
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(snd_dma_disable);
81 * @dma: the dma number 81 * @dma: the dma number
82 * @size: the dma transfer size 82 * @size: the dma transfer size
83 * 83 *
84 * Returns the current pointer in DMA tranfer buffer in bytes 84 * Return: The current pointer in DMA transfer buffer in bytes.
85 */ 85 */
86unsigned int snd_dma_pointer(unsigned long dma, unsigned int size) 86unsigned int snd_dma_pointer(unsigned long dma, unsigned int size)
87{ 87{
diff --git a/sound/core/jack.c b/sound/core/jack.c
index a06b1651fcba..b35fe7345c20 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -98,8 +98,8 @@ static int snd_jack_dev_register(struct snd_device *device)
98 * 98 *
99 * Creates a new jack object. 99 * Creates a new jack object.
100 * 100 *
101 * Returns zero if successful, or a negative error code on failure. 101 * Return: Zero if successful, or a negative error code on failure.
102 * On success jjack will be initialised. 102 * On success @jjack will be initialised.
103 */ 103 */
104int snd_jack_new(struct snd_card *card, const char *id, int type, 104int snd_jack_new(struct snd_card *card, const char *id, int type,
105 struct snd_jack **jjack) 105 struct snd_jack **jjack)
@@ -189,6 +189,8 @@ EXPORT_SYMBOL(snd_jack_set_parent);
189 * using this abstraction. 189 * using this abstraction.
190 * 190 *
191 * This function may only be called prior to registration of the jack. 191 * This function may only be called prior to registration of the jack.
192 *
193 * Return: Zero if successful, or a negative error code on failure.
192 */ 194 */
193int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 195int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type,
194 int keytype) 196 int keytype)
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 691569238435..bdf826f4fe0c 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -81,7 +81,7 @@ static inline void dec_snd_pages(int order)
81 * 81 *
82 * Allocates the physically contiguous pages with the given size. 82 * Allocates the physically contiguous pages with the given size.
83 * 83 *
84 * Returns the pointer of the buffer, or NULL if no enoguh memory. 84 * Return: The pointer of the buffer, or %NULL if no enough memory.
85 */ 85 */
86void *snd_malloc_pages(size_t size, gfp_t gfp_flags) 86void *snd_malloc_pages(size_t size, gfp_t gfp_flags)
87{ 87{
@@ -175,9 +175,9 @@ static void snd_free_dev_pages(struct device *dev, size_t size, void *ptr,
175 * 175 *
176 * Calls the memory-allocator function for the corresponding 176 * Calls the memory-allocator function for the corresponding
177 * buffer type. 177 * buffer type.
178 * 178 *
179 * Returns zero if the buffer with the given size is allocated successfully, 179 * Return: Zero if the buffer with the given size is allocated successfully,
180 * other a negative value at error. 180 * otherwise a negative value on error.
181 */ 181 */
182int snd_dma_alloc_pages(int type, struct device *device, size_t size, 182int snd_dma_alloc_pages(int type, struct device *device, size_t size,
183 struct snd_dma_buffer *dmab) 183 struct snd_dma_buffer *dmab)
@@ -229,9 +229,9 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
229 * buffer type. When no space is left, this function reduces the size and 229 * buffer type. When no space is left, this function reduces the size and
230 * tries to allocate again. The size actually allocated is stored in 230 * tries to allocate again. The size actually allocated is stored in
231 * res_size argument. 231 * res_size argument.
232 * 232 *
233 * Returns zero if the buffer with the given size is allocated successfully, 233 * Return: Zero if the buffer with the given size is allocated successfully,
234 * other a negative value at error. 234 * otherwise a negative value on error.
235 */ 235 */
236int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size, 236int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size,
237 struct snd_dma_buffer *dmab) 237 struct snd_dma_buffer *dmab)
@@ -292,7 +292,7 @@ void snd_dma_free_pages(struct snd_dma_buffer *dmab)
292 * Looks for the reserved-buffer list and re-uses if the same buffer 292 * Looks for the reserved-buffer list and re-uses if the same buffer
293 * is found in the list. When the buffer is found, it's removed from the free list. 293 * is found in the list. When the buffer is found, it's removed from the free list.
294 * 294 *
295 * Returns the size of buffer if the buffer is found, or zero if not found. 295 * Return: The size of buffer if the buffer is found, or zero if not found.
296 */ 296 */
297size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id) 297size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id)
298{ 298{
@@ -326,8 +326,8 @@ size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id)
326 * @id: the buffer id 326 * @id: the buffer id
327 * 327 *
328 * Reserves the given buffer as a reserved buffer. 328 * Reserves the given buffer as a reserved buffer.
329 * 329 *
330 * Returns zero if successful, or a negative code at error. 330 * Return: Zero if successful, or a negative code on error.
331 */ 331 */
332int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id) 332int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id)
333{ 333{
diff --git a/sound/core/memory.c b/sound/core/memory.c
index 66a278d0b04e..36c0f1a2e189 100644
--- a/sound/core/memory.c
+++ b/sound/core/memory.c
@@ -33,7 +33,7 @@
33 * 33 *
34 * Copies the data from mmio-space to user-space. 34 * Copies the data from mmio-space to user-space.
35 * 35 *
36 * Returns zero if successful, or non-zero on failure. 36 * Return: Zero if successful, or non-zero on failure.
37 */ 37 */
38int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count) 38int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size_t count)
39{ 39{
@@ -66,7 +66,7 @@ EXPORT_SYMBOL(copy_to_user_fromio);
66 * 66 *
67 * Copies the data from user-space to mmio-space. 67 * Copies the data from user-space to mmio-space.
68 * 68 *
69 * Returns zero if successful, or non-zero on failure. 69 * Return: Zero if successful, or non-zero on failure.
70 */ 70 */
71int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count) 71int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size_t count)
72{ 72{
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 61798f85d030..578327e2bc26 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -637,7 +637,7 @@ static inline int snd_pcm_substream_proc_done(struct snd_pcm_substream *substrea
637 * calling this, i.e. zero must be given to the argument of 637 * calling this, i.e. zero must be given to the argument of
638 * snd_pcm_new(). 638 * snd_pcm_new().
639 * 639 *
640 * Returns zero if successful, or a negative error code on failure. 640 * Return: Zero if successful, or a negative error code on failure.
641 */ 641 */
642int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) 642int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
643{ 643{
@@ -759,7 +759,7 @@ static int _snd_pcm_new(struct snd_card *card, const char *id, int device,
759 * The pcm operators have to be set afterwards to the new instance 759 * The pcm operators have to be set afterwards to the new instance
760 * via snd_pcm_set_ops(). 760 * via snd_pcm_set_ops().
761 * 761 *
762 * Returns zero if successful, or a negative error code on failure. 762 * Return: Zero if successful, or a negative error code on failure.
763 */ 763 */
764int snd_pcm_new(struct snd_card *card, const char *id, int device, 764int snd_pcm_new(struct snd_card *card, const char *id, int device,
765 int playback_count, int capture_count, struct snd_pcm **rpcm) 765 int playback_count, int capture_count, struct snd_pcm **rpcm)
@@ -787,7 +787,7 @@ EXPORT_SYMBOL(snd_pcm_new);
787 * The pcm operators have to be set afterwards to the new instance 787 * The pcm operators have to be set afterwards to the new instance
788 * via snd_pcm_set_ops(). 788 * via snd_pcm_set_ops().
789 * 789 *
790 * Returns zero if successful, or a negative error code on failure. 790 * Return: Zero if successful, or a negative error code on failure.
791 */ 791 */
792int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, 792int snd_pcm_new_internal(struct snd_card *card, const char *id, int device,
793 int playback_count, int capture_count, 793 int playback_count, int capture_count,
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index c4840ff75d00..41b3dfe68698 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -666,7 +666,8 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
666 * The interval is changed to the range satisfying both intervals. 666 * The interval is changed to the range satisfying both intervals.
667 * The interval status (min, max, integer, etc.) are evaluated. 667 * The interval status (min, max, integer, etc.) are evaluated.
668 * 668 *
669 * Returns non-zero if the value is changed, zero if not changed. 669 * Return: Positive if the value is changed, zero if it's not changed, or a
670 * negative error code.
670 */ 671 */
671int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v) 672int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v)
672{ 673{
@@ -865,7 +866,8 @@ void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
865 * @nump: pointer to store the resultant numerator 866 * @nump: pointer to store the resultant numerator
866 * @denp: pointer to store the resultant denominator 867 * @denp: pointer to store the resultant denominator
867 * 868 *
868 * Returns non-zero if the value is changed, zero if not changed. 869 * Return: Positive if the value is changed, zero if it's not changed, or a
870 * negative error code.
869 */ 871 */
870int snd_interval_ratnum(struct snd_interval *i, 872int snd_interval_ratnum(struct snd_interval *i,
871 unsigned int rats_count, struct snd_ratnum *rats, 873 unsigned int rats_count, struct snd_ratnum *rats,
@@ -983,7 +985,8 @@ EXPORT_SYMBOL(snd_interval_ratnum);
983 * @nump: pointer to store the resultant numerator 985 * @nump: pointer to store the resultant numerator
984 * @denp: pointer to store the resultant denominator 986 * @denp: pointer to store the resultant denominator
985 * 987 *
986 * Returns non-zero if the value is changed, zero if not changed. 988 * Return: Positive if the value is changed, zero if it's not changed, or a
989 * negative error code.
987 */ 990 */
988static int snd_interval_ratden(struct snd_interval *i, 991static int snd_interval_ratden(struct snd_interval *i,
989 unsigned int rats_count, struct snd_ratden *rats, 992 unsigned int rats_count, struct snd_ratden *rats,
@@ -1082,7 +1085,8 @@ static int snd_interval_ratden(struct snd_interval *i,
1082 * When mask is non-zero, only the elements corresponding to bit 1 are 1085 * When mask is non-zero, only the elements corresponding to bit 1 are
1083 * evaluated. 1086 * evaluated.
1084 * 1087 *
1085 * Returns non-zero if the value is changed, zero if not changed. 1088 * Return: Positive if the value is changed, zero if it's not changed, or a
1089 * negative error code.
1086 */ 1090 */
1087int snd_interval_list(struct snd_interval *i, unsigned int count, 1091int snd_interval_list(struct snd_interval *i, unsigned int count,
1088 const unsigned int *list, unsigned int mask) 1092 const unsigned int *list, unsigned int mask)
@@ -1142,7 +1146,7 @@ static int snd_interval_step(struct snd_interval *i, unsigned int min, unsigned
1142 * @private: the private data pointer passed to function 1146 * @private: the private data pointer passed to function
1143 * @dep: the dependent variables 1147 * @dep: the dependent variables
1144 * 1148 *
1145 * Returns zero if successful, or a negative error code on failure. 1149 * Return: Zero if successful, or a negative error code on failure.
1146 */ 1150 */
1147int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, 1151int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,
1148 int var, 1152 int var,
@@ -1200,6 +1204,8 @@ EXPORT_SYMBOL(snd_pcm_hw_rule_add);
1200 * @mask: the bitmap mask 1204 * @mask: the bitmap mask
1201 * 1205 *
1202 * Apply the constraint of the given bitmap mask to a 32-bit mask parameter. 1206 * Apply the constraint of the given bitmap mask to a 32-bit mask parameter.
1207 *
1208 * Return: Zero if successful, or a negative error code on failure.
1203 */ 1209 */
1204int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1210int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1205 u_int32_t mask) 1211 u_int32_t mask)
@@ -1220,6 +1226,8 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param
1220 * @mask: the 64bit bitmap mask 1226 * @mask: the 64bit bitmap mask
1221 * 1227 *
1222 * Apply the constraint of the given bitmap mask to a 64-bit mask parameter. 1228 * Apply the constraint of the given bitmap mask to a 64-bit mask parameter.
1229 *
1230 * Return: Zero if successful, or a negative error code on failure.
1223 */ 1231 */
1224int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1232int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1225 u_int64_t mask) 1233 u_int64_t mask)
@@ -1240,6 +1248,9 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par
1240 * @var: hw_params variable to apply the integer constraint 1248 * @var: hw_params variable to apply the integer constraint
1241 * 1249 *
1242 * Apply the constraint of integer to an interval parameter. 1250 * Apply the constraint of integer to an interval parameter.
1251 *
1252 * Return: Positive if the value is changed, zero if it's not changed, or a
1253 * negative error code.
1243 */ 1254 */
1244int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var) 1255int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var)
1245{ 1256{
@@ -1257,6 +1268,9 @@ EXPORT_SYMBOL(snd_pcm_hw_constraint_integer);
1257 * @max: the maximal value 1268 * @max: the maximal value
1258 * 1269 *
1259 * Apply the min/max range constraint to an interval parameter. 1270 * Apply the min/max range constraint to an interval parameter.
1271 *
1272 * Return: Positive if the value is changed, zero if it's not changed, or a
1273 * negative error code.
1260 */ 1274 */
1261int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, 1275int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
1262 unsigned int min, unsigned int max) 1276 unsigned int min, unsigned int max)
@@ -1288,6 +1302,8 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
1288 * @l: list 1302 * @l: list
1289 * 1303 *
1290 * Apply the list of constraints to an interval parameter. 1304 * Apply the list of constraints to an interval parameter.
1305 *
1306 * Return: Zero if successful, or a negative error code on failure.
1291 */ 1307 */
1292int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 1308int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,
1293 unsigned int cond, 1309 unsigned int cond,
@@ -1322,6 +1338,8 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params,
1322 * @cond: condition bits 1338 * @cond: condition bits
1323 * @var: hw_params variable to apply the ratnums constraint 1339 * @var: hw_params variable to apply the ratnums constraint
1324 * @r: struct snd_ratnums constriants 1340 * @r: struct snd_ratnums constriants
1341 *
1342 * Return: Zero if successful, or a negative error code on failure.
1325 */ 1343 */
1326int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 1344int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
1327 unsigned int cond, 1345 unsigned int cond,
@@ -1355,6 +1373,8 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params,
1355 * @cond: condition bits 1373 * @cond: condition bits
1356 * @var: hw_params variable to apply the ratdens constraint 1374 * @var: hw_params variable to apply the ratdens constraint
1357 * @r: struct snd_ratdens constriants 1375 * @r: struct snd_ratdens constriants
1376 *
1377 * Return: Zero if successful, or a negative error code on failure.
1358 */ 1378 */
1359int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 1379int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,
1360 unsigned int cond, 1380 unsigned int cond,
@@ -1386,6 +1406,8 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,
1386 * @cond: condition bits 1406 * @cond: condition bits
1387 * @width: sample bits width 1407 * @width: sample bits width
1388 * @msbits: msbits width 1408 * @msbits: msbits width
1409 *
1410 * Return: Zero if successful, or a negative error code on failure.
1389 */ 1411 */
1390int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 1412int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,
1391 unsigned int cond, 1413 unsigned int cond,
@@ -1414,6 +1436,8 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params,
1414 * @cond: condition bits 1436 * @cond: condition bits
1415 * @var: hw_params variable to apply the step constraint 1437 * @var: hw_params variable to apply the step constraint
1416 * @step: step size 1438 * @step: step size
1439 *
1440 * Return: Zero if successful, or a negative error code on failure.
1417 */ 1441 */
1418int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime, 1442int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
1419 unsigned int cond, 1443 unsigned int cond,
@@ -1444,6 +1468,8 @@ static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm
1444 * @runtime: PCM runtime instance 1468 * @runtime: PCM runtime instance
1445 * @cond: condition bits 1469 * @cond: condition bits
1446 * @var: hw_params variable to apply the power-of-2 constraint 1470 * @var: hw_params variable to apply the power-of-2 constraint
1471 *
1472 * Return: Zero if successful, or a negative error code on failure.
1447 */ 1473 */
1448int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime, 1474int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
1449 unsigned int cond, 1475 unsigned int cond,
@@ -1470,6 +1496,8 @@ static int snd_pcm_hw_rule_noresample_func(struct snd_pcm_hw_params *params,
1470 * snd_pcm_hw_rule_noresample - add a rule to allow disabling hw resampling 1496 * snd_pcm_hw_rule_noresample - add a rule to allow disabling hw resampling
1471 * @runtime: PCM runtime instance 1497 * @runtime: PCM runtime instance
1472 * @base_rate: the rate at which the hardware does not resample 1498 * @base_rate: the rate at which the hardware does not resample
1499 *
1500 * Return: Zero if successful, or a negative error code on failure.
1473 */ 1501 */
1474int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime, 1502int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime,
1475 unsigned int base_rate) 1503 unsigned int base_rate)
@@ -1519,8 +1547,8 @@ EXPORT_SYMBOL(_snd_pcm_hw_params_any);
1519 * @var: parameter to retrieve 1547 * @var: parameter to retrieve
1520 * @dir: pointer to the direction (-1,0,1) or %NULL 1548 * @dir: pointer to the direction (-1,0,1) or %NULL
1521 * 1549 *
1522 * Return the value for field @var if it's fixed in configuration space 1550 * Return: The value for field @var if it's fixed in configuration space
1523 * defined by @params. Return -%EINVAL otherwise. 1551 * defined by @params. -%EINVAL otherwise.
1524 */ 1552 */
1525int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, 1553int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
1526 snd_pcm_hw_param_t var, int *dir) 1554 snd_pcm_hw_param_t var, int *dir)
@@ -1591,7 +1619,8 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params,
1591 * 1619 *
1592 * Inside configuration space defined by @params remove from @var all 1620 * Inside configuration space defined by @params remove from @var all
1593 * values > minimum. Reduce configuration space accordingly. 1621 * values > minimum. Reduce configuration space accordingly.
1594 * Return the minimum. 1622 *
1623 * Return: The minimum, or a negative error code on failure.
1595 */ 1624 */
1596int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 1625int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm,
1597 struct snd_pcm_hw_params *params, 1626 struct snd_pcm_hw_params *params,
@@ -1637,7 +1666,8 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
1637 * 1666 *
1638 * Inside configuration space defined by @params remove from @var all 1667 * Inside configuration space defined by @params remove from @var all
1639 * values < maximum. Reduce configuration space accordingly. 1668 * values < maximum. Reduce configuration space accordingly.
1640 * Return the maximum. 1669 *
1670 * Return: The maximum, or a negative error code on failure.
1641 */ 1671 */
1642int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, 1672int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
1643 struct snd_pcm_hw_params *params, 1673 struct snd_pcm_hw_params *params,
@@ -1665,6 +1695,8 @@ EXPORT_SYMBOL(snd_pcm_hw_param_last);
1665 * The configuration chosen is that obtained fixing in this order: 1695 * The configuration chosen is that obtained fixing in this order:
1666 * first access, first format, first subformat, min channels, 1696 * first access, first format, first subformat, min channels,
1667 * min rate, min period time, max buffer size, min tick time 1697 * min rate, min period time, max buffer size, min tick time
1698 *
1699 * Return: Zero if successful, or a negative error code on failure.
1668 */ 1700 */
1669int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, 1701int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm,
1670 struct snd_pcm_hw_params *params) 1702 struct snd_pcm_hw_params *params)
@@ -1771,7 +1803,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream,
1771 * Processes the generic ioctl commands for PCM. 1803 * Processes the generic ioctl commands for PCM.
1772 * Can be passed as the ioctl callback for PCM ops. 1804 * Can be passed as the ioctl callback for PCM ops.
1773 * 1805 *
1774 * Returns zero if successful, or a negative error code on failure. 1806 * Return: Zero if successful, or a negative error code on failure.
1775 */ 1807 */
1776int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, 1808int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
1777 unsigned int cmd, void *arg) 1809 unsigned int cmd, void *arg)
@@ -2510,7 +2542,7 @@ static void pcm_chmap_ctl_private_free(struct snd_kcontrol *kcontrol)
2510 * @info_ret: store struct snd_pcm_chmap instance if non-NULL 2542 * @info_ret: store struct snd_pcm_chmap instance if non-NULL
2511 * 2543 *
2512 * Create channel-mapping control elements assigned to the given PCM stream(s). 2544 * Create channel-mapping control elements assigned to the given PCM stream(s).
2513 * Returns zero if succeed, or a negative error value. 2545 * Return: Zero if successful, or a negative error value.
2514 */ 2546 */
2515int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, 2547int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
2516 const struct snd_pcm_chmap_elem *chmap, 2548 const struct snd_pcm_chmap_elem *chmap,
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index 69e01c4fc32d..0af622c34e19 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -95,7 +95,7 @@ static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream
95 * 95 *
96 * Releases the pre-allocated buffer of the given substream. 96 * Releases the pre-allocated buffer of the given substream.
97 * 97 *
98 * Returns zero if successful, or a negative error code on failure. 98 * Return: Zero if successful, or a negative error code on failure.
99 */ 99 */
100int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) 100int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream)
101{ 101{
@@ -115,7 +115,7 @@ int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream)
115 * 115 *
116 * Releases all the pre-allocated buffers on the given pcm. 116 * Releases all the pre-allocated buffers on the given pcm.
117 * 117 *
118 * Returns zero if successful, or a negative error code on failure. 118 * Return: Zero if successful, or a negative error code on failure.
119 */ 119 */
120int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) 120int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm)
121{ 121{
@@ -265,7 +265,7 @@ static int snd_pcm_lib_preallocate_pages1(struct snd_pcm_substream *substream,
265 * destruction time. The dma_buf_id must be unique for all systems 265 * destruction time. The dma_buf_id must be unique for all systems
266 * (in the same DMA buffer type) e.g. using snd_dma_pci_buf_id(). 266 * (in the same DMA buffer type) e.g. using snd_dma_pci_buf_id().
267 * 267 *
268 * Returns zero if successful, or a negative error code on failure. 268 * Return: Zero if successful, or a negative error code on failure.
269 */ 269 */
270int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream, 270int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream,
271 int type, struct device *data, 271 int type, struct device *data,
@@ -289,7 +289,7 @@ EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages);
289 * Do pre-allocation to all substreams of the given pcm for the 289 * Do pre-allocation to all substreams of the given pcm for the
290 * specified DMA type. 290 * specified DMA type.
291 * 291 *
292 * Returns zero if successful, or a negative error code on failure. 292 * Return: Zero if successful, or a negative error code on failure.
293 */ 293 */
294int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, 294int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm,
295 int type, void *data, 295 int type, void *data,
@@ -313,8 +313,9 @@ EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all);
313 * @substream: the pcm substream instance 313 * @substream: the pcm substream instance
314 * @offset: the buffer offset 314 * @offset: the buffer offset
315 * 315 *
316 * Returns the page struct at the given buffer offset.
317 * Used as the page callback of PCM ops. 316 * Used as the page callback of PCM ops.
317 *
318 * Return: The page struct at the given buffer offset. %NULL on failure.
318 */ 319 */
319struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset) 320struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigned long offset)
320{ 321{
@@ -337,7 +338,7 @@ EXPORT_SYMBOL(snd_pcm_sgbuf_ops_page);
337 * Allocates the DMA buffer on the BUS type given earlier to 338 * Allocates the DMA buffer on the BUS type given earlier to
338 * snd_pcm_lib_preallocate_xxx_pages(). 339 * snd_pcm_lib_preallocate_xxx_pages().
339 * 340 *
340 * Returns 1 if the buffer is changed, 0 if not changed, or a negative 341 * Return: 1 if the buffer is changed, 0 if not changed, or a negative
341 * code on failure. 342 * code on failure.
342 */ 343 */
343int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) 344int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size)
@@ -390,7 +391,7 @@ EXPORT_SYMBOL(snd_pcm_lib_malloc_pages);
390 * 391 *
391 * Releases the DMA buffer allocated via snd_pcm_lib_malloc_pages(). 392 * Releases the DMA buffer allocated via snd_pcm_lib_malloc_pages().
392 * 393 *
393 * Returns zero if successful, or a negative error code on failure. 394 * Return: Zero if successful, or a negative error code on failure.
394 */ 395 */
395int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream) 396int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream)
396{ 397{
@@ -437,6 +438,8 @@ EXPORT_SYMBOL(_snd_pcm_lib_alloc_vmalloc_buffer);
437 * snd_pcm_lib_free_vmalloc_buffer - free vmalloc buffer 438 * snd_pcm_lib_free_vmalloc_buffer - free vmalloc buffer
438 * @substream: the substream with a buffer allocated by 439 * @substream: the substream with a buffer allocated by
439 * snd_pcm_lib_alloc_vmalloc_buffer() 440 * snd_pcm_lib_alloc_vmalloc_buffer()
441 *
442 * Return: Zero if successful, or a negative error code on failure.
440 */ 443 */
441int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream) 444int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream)
442{ 445{
@@ -458,6 +461,8 @@ EXPORT_SYMBOL(snd_pcm_lib_free_vmalloc_buffer);
458 * @offset: offset in the buffer 461 * @offset: offset in the buffer
459 * 462 *
460 * This function is to be used as the page callback in the PCM ops. 463 * This function is to be used as the page callback in the PCM ops.
464 *
465 * Return: The page struct, or %NULL on failure.
461 */ 466 */
462struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream, 467struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
463 unsigned long offset) 468 unsigned long offset)
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index d4fc1bfbe457..b875b19f2d55 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -213,7 +213,7 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = {
213 * snd_pcm_format_signed - Check the PCM format is signed linear 213 * snd_pcm_format_signed - Check the PCM format is signed linear
214 * @format: the format to check 214 * @format: the format to check
215 * 215 *
216 * Returns 1 if the given PCM format is signed linear, 0 if unsigned 216 * Return: 1 if the given PCM format is signed linear, 0 if unsigned
217 * linear, and a negative error code for non-linear formats. 217 * linear, and a negative error code for non-linear formats.
218 */ 218 */
219int snd_pcm_format_signed(snd_pcm_format_t format) 219int snd_pcm_format_signed(snd_pcm_format_t format)
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(snd_pcm_format_signed);
232 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear 232 * snd_pcm_format_unsigned - Check the PCM format is unsigned linear
233 * @format: the format to check 233 * @format: the format to check
234 * 234 *
235 * Returns 1 if the given PCM format is unsigned linear, 0 if signed 235 * Return: 1 if the given PCM format is unsigned linear, 0 if signed
236 * linear, and a negative error code for non-linear formats. 236 * linear, and a negative error code for non-linear formats.
237 */ 237 */
238int snd_pcm_format_unsigned(snd_pcm_format_t format) 238int snd_pcm_format_unsigned(snd_pcm_format_t format)
@@ -251,7 +251,7 @@ EXPORT_SYMBOL(snd_pcm_format_unsigned);
251 * snd_pcm_format_linear - Check the PCM format is linear 251 * snd_pcm_format_linear - Check the PCM format is linear
252 * @format: the format to check 252 * @format: the format to check
253 * 253 *
254 * Returns 1 if the given PCM format is linear, 0 if not. 254 * Return: 1 if the given PCM format is linear, 0 if not.
255 */ 255 */
256int snd_pcm_format_linear(snd_pcm_format_t format) 256int snd_pcm_format_linear(snd_pcm_format_t format)
257{ 257{
@@ -264,7 +264,7 @@ EXPORT_SYMBOL(snd_pcm_format_linear);
264 * snd_pcm_format_little_endian - Check the PCM format is little-endian 264 * snd_pcm_format_little_endian - Check the PCM format is little-endian
265 * @format: the format to check 265 * @format: the format to check
266 * 266 *
267 * Returns 1 if the given PCM format is little-endian, 0 if 267 * Return: 1 if the given PCM format is little-endian, 0 if
268 * big-endian, or a negative error code if endian not specified. 268 * big-endian, or a negative error code if endian not specified.
269 */ 269 */
270int snd_pcm_format_little_endian(snd_pcm_format_t format) 270int snd_pcm_format_little_endian(snd_pcm_format_t format)
@@ -283,7 +283,7 @@ EXPORT_SYMBOL(snd_pcm_format_little_endian);
283 * snd_pcm_format_big_endian - Check the PCM format is big-endian 283 * snd_pcm_format_big_endian - Check the PCM format is big-endian
284 * @format: the format to check 284 * @format: the format to check
285 * 285 *
286 * Returns 1 if the given PCM format is big-endian, 0 if 286 * Return: 1 if the given PCM format is big-endian, 0 if
287 * little-endian, or a negative error code if endian not specified. 287 * little-endian, or a negative error code if endian not specified.
288 */ 288 */
289int snd_pcm_format_big_endian(snd_pcm_format_t format) 289int snd_pcm_format_big_endian(snd_pcm_format_t format)
@@ -302,7 +302,7 @@ EXPORT_SYMBOL(snd_pcm_format_big_endian);
302 * snd_pcm_format_width - return the bit-width of the format 302 * snd_pcm_format_width - return the bit-width of the format
303 * @format: the format to check 303 * @format: the format to check
304 * 304 *
305 * Returns the bit-width of the format, or a negative error code 305 * Return: The bit-width of the format, or a negative error code
306 * if unknown format. 306 * if unknown format.
307 */ 307 */
308int snd_pcm_format_width(snd_pcm_format_t format) 308int snd_pcm_format_width(snd_pcm_format_t format)
@@ -321,7 +321,7 @@ EXPORT_SYMBOL(snd_pcm_format_width);
321 * snd_pcm_format_physical_width - return the physical bit-width of the format 321 * snd_pcm_format_physical_width - return the physical bit-width of the format
322 * @format: the format to check 322 * @format: the format to check
323 * 323 *
324 * Returns the physical bit-width of the format, or a negative error code 324 * Return: The physical bit-width of the format, or a negative error code
325 * if unknown format. 325 * if unknown format.
326 */ 326 */
327int snd_pcm_format_physical_width(snd_pcm_format_t format) 327int snd_pcm_format_physical_width(snd_pcm_format_t format)
@@ -341,7 +341,7 @@ EXPORT_SYMBOL(snd_pcm_format_physical_width);
341 * @format: the format to check 341 * @format: the format to check
342 * @samples: sampling rate 342 * @samples: sampling rate
343 * 343 *
344 * Returns the byte size of the given samples for the format, or a 344 * Return: The byte size of the given samples for the format, or a
345 * negative error code if unknown format. 345 * negative error code if unknown format.
346 */ 346 */
347ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) 347ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
@@ -358,7 +358,7 @@ EXPORT_SYMBOL(snd_pcm_format_size);
358 * snd_pcm_format_silence_64 - return the silent data in 8 bytes array 358 * snd_pcm_format_silence_64 - return the silent data in 8 bytes array
359 * @format: the format to check 359 * @format: the format to check
360 * 360 *
361 * Returns the format pattern to fill or NULL if error. 361 * Return: The format pattern to fill or %NULL if error.
362 */ 362 */
363const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) 363const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format)
364{ 364{
@@ -379,7 +379,7 @@ EXPORT_SYMBOL(snd_pcm_format_silence_64);
379 * 379 *
380 * Sets the silence data on the buffer for the given samples. 380 * Sets the silence data on the buffer for the given samples.
381 * 381 *
382 * Returns zero if successful, or a negative error code on failure. 382 * Return: Zero if successful, or a negative error code on failure.
383 */ 383 */
384int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples) 384int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int samples)
385{ 385{
@@ -449,7 +449,7 @@ EXPORT_SYMBOL(snd_pcm_format_set_silence);
449 * Determines the rate_min and rate_max fields from the rates bits of 449 * Determines the rate_min and rate_max fields from the rates bits of
450 * the given runtime->hw. 450 * the given runtime->hw.
451 * 451 *
452 * Returns zero if successful. 452 * Return: Zero if successful.
453 */ 453 */
454int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime) 454int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime)
455{ 455{
@@ -475,7 +475,7 @@ EXPORT_SYMBOL(snd_pcm_limit_hw_rates);
475 * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit 475 * snd_pcm_rate_to_rate_bit - converts sample rate to SNDRV_PCM_RATE_xxx bit
476 * @rate: the sample rate to convert 476 * @rate: the sample rate to convert
477 * 477 *
478 * Returns the SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or 478 * Return: The SNDRV_PCM_RATE_xxx flag that corresponds to the given rate, or
479 * SNDRV_PCM_RATE_KNOT for an unknown rate. 479 * SNDRV_PCM_RATE_KNOT for an unknown rate.
480 */ 480 */
481unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate) 481unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate)
@@ -493,8 +493,8 @@ EXPORT_SYMBOL(snd_pcm_rate_to_rate_bit);
493 * snd_pcm_rate_bit_to_rate - converts SNDRV_PCM_RATE_xxx bit to sample rate 493 * snd_pcm_rate_bit_to_rate - converts SNDRV_PCM_RATE_xxx bit to sample rate
494 * @rate_bit: the rate bit to convert 494 * @rate_bit: the rate bit to convert
495 * 495 *
496 * Returns the sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag 496 * Return: The sample rate that corresponds to the given SNDRV_PCM_RATE_xxx flag
497 * or 0 for an unknown rate bit 497 * or 0 for an unknown rate bit.
498 */ 498 */
499unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit) 499unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit)
500{ 500{
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 71ae86ca64ac..5bce9152b64e 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -898,6 +898,8 @@ static struct action_ops snd_pcm_action_start = {
898/** 898/**
899 * snd_pcm_start - start all linked streams 899 * snd_pcm_start - start all linked streams
900 * @substream: the PCM substream instance 900 * @substream: the PCM substream instance
901 *
902 * Return: Zero if successful, or a negative error code.
901 */ 903 */
902int snd_pcm_start(struct snd_pcm_substream *substream) 904int snd_pcm_start(struct snd_pcm_substream *substream)
903{ 905{
@@ -951,6 +953,8 @@ static struct action_ops snd_pcm_action_stop = {
951 * @state: PCM state after stopping the stream 953 * @state: PCM state after stopping the stream
952 * 954 *
953 * The state of each stream is then changed to the given state unconditionally. 955 * The state of each stream is then changed to the given state unconditionally.
956 *
957 * Return: Zero if succesful, or a negative error code.
954 */ 958 */
955int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) 959int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state)
956{ 960{
@@ -965,6 +969,8 @@ EXPORT_SYMBOL(snd_pcm_stop);
965 * 969 *
966 * After stopping, the state is changed to SETUP. 970 * After stopping, the state is changed to SETUP.
967 * Unlike snd_pcm_stop(), this affects only the given stream. 971 * Unlike snd_pcm_stop(), this affects only the given stream.
972 *
973 * Return: Zero if succesful, or a negative error code.
968 */ 974 */
969int snd_pcm_drain_done(struct snd_pcm_substream *substream) 975int snd_pcm_drain_done(struct snd_pcm_substream *substream)
970{ 976{
@@ -1098,6 +1104,9 @@ static struct action_ops snd_pcm_action_suspend = {
1098 * @substream: the PCM substream 1104 * @substream: the PCM substream
1099 * 1105 *
1100 * After this call, all streams are changed to SUSPENDED state. 1106 * After this call, all streams are changed to SUSPENDED state.
1107 *
1108 * Return: Zero if successful (or @substream is %NULL), or a negative error
1109 * code.
1101 */ 1110 */
1102int snd_pcm_suspend(struct snd_pcm_substream *substream) 1111int snd_pcm_suspend(struct snd_pcm_substream *substream)
1103{ 1112{
@@ -1120,6 +1129,8 @@ EXPORT_SYMBOL(snd_pcm_suspend);
1120 * @pcm: the PCM instance 1129 * @pcm: the PCM instance
1121 * 1130 *
1122 * After this call, all streams are changed to SUSPENDED state. 1131 * After this call, all streams are changed to SUSPENDED state.
1132 *
1133 * Return: Zero if successful (or @pcm is %NULL), or a negative error code.
1123 */ 1134 */
1124int snd_pcm_suspend_all(struct snd_pcm *pcm) 1135int snd_pcm_suspend_all(struct snd_pcm *pcm)
1125{ 1136{
@@ -1343,6 +1354,8 @@ static struct action_ops snd_pcm_action_prepare = {
1343 * snd_pcm_prepare - prepare the PCM substream to be triggerable 1354 * snd_pcm_prepare - prepare the PCM substream to be triggerable
1344 * @substream: the PCM substream instance 1355 * @substream: the PCM substream instance
1345 * @file: file to refer f_flags 1356 * @file: file to refer f_flags
1357 *
1358 * Return: Zero if successful, or a negative error code.
1346 */ 1359 */
1347static int snd_pcm_prepare(struct snd_pcm_substream *substream, 1360static int snd_pcm_prepare(struct snd_pcm_substream *substream,
1348 struct file *file) 1361 struct file *file)
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 1bb95aeea084..7b596b5751db 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -863,7 +863,7 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
863 * 863 *
864 * Reads the data from the internal buffer. 864 * Reads the data from the internal buffer.
865 * 865 *
866 * Returns the size of read data, or a negative error code on failure. 866 * Return: The size of read data, or a negative error code on failure.
867 */ 867 */
868int snd_rawmidi_receive(struct snd_rawmidi_substream *substream, 868int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
869 const unsigned char *buffer, int count) 869 const unsigned char *buffer, int count)
@@ -1024,8 +1024,8 @@ static ssize_t snd_rawmidi_read(struct file *file, char __user *buf, size_t coun
1024/** 1024/**
1025 * snd_rawmidi_transmit_empty - check whether the output buffer is empty 1025 * snd_rawmidi_transmit_empty - check whether the output buffer is empty
1026 * @substream: the rawmidi substream 1026 * @substream: the rawmidi substream
1027 * 1027 *
1028 * Returns 1 if the internal output buffer is empty, 0 if not. 1028 * Return: 1 if the internal output buffer is empty, 0 if not.
1029 */ 1029 */
1030int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream) 1030int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream)
1031{ 1031{
@@ -1055,7 +1055,7 @@ int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream)
1055 * and call snd_rawmidi_transmit_ack() after the transmission is 1055 * and call snd_rawmidi_transmit_ack() after the transmission is
1056 * finished. 1056 * finished.
1057 * 1057 *
1058 * Returns the size of copied data, or a negative error code on failure. 1058 * Return: The size of copied data, or a negative error code on failure.
1059 */ 1059 */
1060int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream, 1060int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
1061 unsigned char *buffer, int count) 1061 unsigned char *buffer, int count)
@@ -1107,7 +1107,7 @@ int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
1107 * the given size and updates the condition. 1107 * the given size and updates the condition.
1108 * Call after the transmission is finished. 1108 * Call after the transmission is finished.
1109 * 1109 *
1110 * Returns the advanced size if successful, or a negative error code on failure. 1110 * Return: The advanced size if successful, or a negative error code on failure.
1111 */ 1111 */
1112int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count) 1112int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count)
1113{ 1113{
@@ -1140,7 +1140,7 @@ int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count)
1140 * 1140 *
1141 * Copies data from the buffer to the device and advances the pointer. 1141 * Copies data from the buffer to the device and advances the pointer.
1142 * 1142 *
1143 * Returns the copied size if successful, or a negative error code on failure. 1143 * Return: The copied size if successful, or a negative error code on failure.
1144 */ 1144 */
1145int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, 1145int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
1146 unsigned char *buffer, int count) 1146 unsigned char *buffer, int count)
@@ -1438,7 +1438,7 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
1438 * Creates a new rawmidi instance. 1438 * Creates a new rawmidi instance.
1439 * Use snd_rawmidi_set_ops() to set the operators to the new instance. 1439 * Use snd_rawmidi_set_ops() to set the operators to the new instance.
1440 * 1440 *
1441 * Returns zero if successful, or a negative error code on failure. 1441 * Return: Zero if successful, or a negative error code on failure.
1442 */ 1442 */
1443int snd_rawmidi_new(struct snd_card *card, char *id, int device, 1443int snd_rawmidi_new(struct snd_card *card, char *id, int device,
1444 int output_count, int input_count, 1444 int output_count, int input_count,
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 70ccdab74153..f002bd911dae 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -102,6 +102,9 @@ static void snd_request_other(int minor)
102 * This function increments the reference counter of the card instance 102 * This function increments the reference counter of the card instance
103 * if an associated instance with the given minor number and type is found. 103 * if an associated instance with the given minor number and type is found.
104 * The caller must call snd_card_unref() appropriately later. 104 * The caller must call snd_card_unref() appropriately later.
105 *
106 * Return: The user data pointer if the specified device is found. %NULL
107 * otherwise.
105 */ 108 */
106void *snd_lookup_minor_data(unsigned int minor, int type) 109void *snd_lookup_minor_data(unsigned int minor, int type)
107{ 110{
@@ -261,7 +264,7 @@ static int snd_kernel_minor(int type, struct snd_card *card, int dev)
261 * Registers an ALSA device file for the given card. 264 * Registers an ALSA device file for the given card.
262 * The operators have to be set in reg parameter. 265 * The operators have to be set in reg parameter.
263 * 266 *
264 * Returns zero if successful, or a negative error code on failure. 267 * Return: Zero if successful, or a negative error code on failure.
265 */ 268 */
266int snd_register_device_for_dev(int type, struct snd_card *card, int dev, 269int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
267 const struct file_operations *f_ops, 270 const struct file_operations *f_ops,
@@ -339,7 +342,7 @@ static int find_snd_minor(int type, struct snd_card *card, int dev)
339 * Unregisters the device file already registered via 342 * Unregisters the device file already registered via
340 * snd_register_device(). 343 * snd_register_device().
341 * 344 *
342 * Returns zero if sucecessful, or a negative error code on failure 345 * Return: Zero if successful, or a negative error code on failure.
343 */ 346 */
344int snd_unregister_device(int type, struct snd_card *card, int dev) 347int snd_unregister_device(int type, struct snd_card *card, int dev)
345{ 348{
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c
index 857586135d18..55c9d8c8d3c1 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -362,8 +362,7 @@ static void master_free(struct snd_kcontrol *kcontrol)
362 * @name: name string of the control element to create 362 * @name: name string of the control element to create
363 * @tlv: optional TLV int array for dB information 363 * @tlv: optional TLV int array for dB information
364 * 364 *
365 * Creates a virtual matster control with the given name string. 365 * Creates a virtual master control with the given name string.
366 * Returns the created control element, or NULL for errors (ENOMEM).
367 * 366 *
368 * After creating a vmaster element, you can add the slave controls 367 * After creating a vmaster element, you can add the slave controls
369 * via snd_ctl_add_slave() or snd_ctl_add_slave_uncached(). 368 * via snd_ctl_add_slave() or snd_ctl_add_slave_uncached().
@@ -372,6 +371,8 @@ static void master_free(struct snd_kcontrol *kcontrol)
372 * for dB scale of the master control. It should be a single element 371 * for dB scale of the master control. It should be a single element
373 * with #SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or 372 * with #SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or
374 * #SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB. 373 * #SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB.
374 *
375 * Return: The created control element, or %NULL for errors (ENOMEM).
375 */ 376 */
376struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, 377struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
377 const unsigned int *tlv) 378 const unsigned int *tlv)
@@ -423,6 +424,8 @@ EXPORT_SYMBOL(snd_ctl_make_virtual_master);
423 * 424 *
424 * Adds the given hook to the vmaster control element so that it's called 425 * Adds the given hook to the vmaster control element so that it's called
425 * at each time when the value is changed. 426 * at each time when the value is changed.
427 *
428 * Return: Zero.
426 */ 429 */
427int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol, 430int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol,
428 void (*hook)(void *private_data, int), 431 void (*hook)(void *private_data, int),
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index 4608c2ca43f8..e3a90d043f03 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -129,6 +129,8 @@ static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu)
129 * @dev_id: mpu401 instance 129 * @dev_id: mpu401 instance
130 * 130 *
131 * Processes the interrupt for MPU401-UART i/o. 131 * Processes the interrupt for MPU401-UART i/o.
132 *
133 * Return: %IRQ_HANDLED if the interrupt was handled. %IRQ_NONE otherwise.
132 */ 134 */
133irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id) 135irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id)
134{ 136{
@@ -148,6 +150,8 @@ EXPORT_SYMBOL(snd_mpu401_uart_interrupt);
148 * @dev_id: mpu401 instance 150 * @dev_id: mpu401 instance
149 * 151 *
150 * Processes the interrupt for MPU401-UART output. 152 * Processes the interrupt for MPU401-UART output.
153 *
154 * Return: %IRQ_HANDLED if the interrupt was handled. %IRQ_NONE otherwise.
151 */ 155 */
152irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id) 156irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id)
153{ 157{
@@ -519,7 +523,7 @@ static void snd_mpu401_uart_free(struct snd_rawmidi *rmidi)
519 * not the mpu401 instance itself. To access to the mpu401 instance, 523 * not the mpu401 instance itself. To access to the mpu401 instance,
520 * cast from rawmidi->private_data (with struct snd_mpu401 magic-cast). 524 * cast from rawmidi->private_data (with struct snd_mpu401 magic-cast).
521 * 525 *
522 * Returns zero if successful, or a negative error code. 526 * Return: Zero if successful, or a negative error code.
523 */ 527 */
524int snd_mpu401_uart_new(struct snd_card *card, int device, 528int snd_mpu401_uart_new(struct snd_card *card, int device,
525 unsigned short hardware, 529 unsigned short hardware,
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 8b0f99688303..d37c683cfd7a 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -299,7 +299,7 @@ EXPORT_SYMBOL(snd_ac97_write);
299 * Reads a value from the given register. This will invoke the read 299 * Reads a value from the given register. This will invoke the read
300 * callback directly after the register check. 300 * callback directly after the register check.
301 * 301 *
302 * Returns the read value. 302 * Return: The read value.
303 */ 303 */
304unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg) 304unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
305{ 305{
@@ -352,7 +352,7 @@ EXPORT_SYMBOL(snd_ac97_write_cache);
352 * Compares the value with the register cache and updates the value 352 * Compares the value with the register cache and updates the value
353 * only when the value is changed. 353 * only when the value is changed.
354 * 354 *
355 * Returns 1 if the value is changed, 0 if no change, or a negative 355 * Return: 1 if the value is changed, 0 if no change, or a negative
356 * code on failure. 356 * code on failure.
357 */ 357 */
358int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) 358int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
@@ -384,7 +384,7 @@ EXPORT_SYMBOL(snd_ac97_update);
384 * Updates the masked-bits on the given register only when the value 384 * Updates the masked-bits on the given register only when the value
385 * is changed. 385 * is changed.
386 * 386 *
387 * Returns 1 if the bits are changed, 0 if no change, or a negative 387 * Return: 1 if the bits are changed, 0 if no change, or a negative
388 * code on failure. 388 * code on failure.
389 */ 389 */
390int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value) 390int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value)
@@ -1836,7 +1836,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
1836 * snd_ac97_get_short_name - retrieve codec name 1836 * snd_ac97_get_short_name - retrieve codec name
1837 * @ac97: the codec instance 1837 * @ac97: the codec instance
1838 * 1838 *
1839 * Returns the short identifying name of the codec. 1839 * Return: The short identifying name of the codec.
1840 */ 1840 */
1841const char *snd_ac97_get_short_name(struct snd_ac97 *ac97) 1841const char *snd_ac97_get_short_name(struct snd_ac97 *ac97)
1842{ 1842{
@@ -1910,7 +1910,7 @@ static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem)
1910 * The AC97 bus instance is registered as a low-level device, so you don't 1910 * The AC97 bus instance is registered as a low-level device, so you don't
1911 * have to release it manually. 1911 * have to release it manually.
1912 * 1912 *
1913 * Returns zero if successful, or a negative error code on failure. 1913 * Return: Zero if successful, or a negative error code on failure.
1914 */ 1914 */
1915int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, 1915int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops,
1916 void *private_data, struct snd_ac97_bus **rbus) 1916 void *private_data, struct snd_ac97_bus **rbus)
@@ -2006,7 +2006,7 @@ static void do_update_power(struct work_struct *work)
2006 * The ac97 instance is registered as a low-level device, so you don't 2006 * The ac97 instance is registered as a low-level device, so you don't
2007 * have to release it manually. 2007 * have to release it manually.
2008 * 2008 *
2009 * Returns zero if successful, or a negative error code on failure. 2009 * Return: Zero if successful, or a negative error code on failure.
2010 */ 2010 */
2011int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, struct snd_ac97 **rac97) 2011int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, struct snd_ac97 **rac97)
2012{ 2012{
@@ -2373,6 +2373,8 @@ static struct ac97_power_reg power_regs[PWIDX_SIZE] = {
2373 * @powerup: non-zero when power up the part 2373 * @powerup: non-zero when power up the part
2374 * 2374 *
2375 * Update the AC97 powerdown register bits of the given part. 2375 * Update the AC97 powerdown register bits of the given part.
2376 *
2377 * Return: Zero.
2376 */ 2378 */
2377int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup) 2379int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
2378{ 2380{
@@ -2885,7 +2887,7 @@ static int apply_quirk_str(struct snd_ac97 *ac97, const char *typestr)
2885 * headphone (true line-out) control as "Master". 2887 * headphone (true line-out) control as "Master".
2886 * The quirk-list must be terminated with a zero-filled entry. 2888 * The quirk-list must be terminated with a zero-filled entry.
2887 * 2889 *
2888 * Returns zero if successful, or a negative error code on failure. 2890 * Return: Zero if successful, or a negative error code on failure.
2889 */ 2891 */
2890 2892
2891int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override) 2893int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override)
diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
index f1488fc176d5..eab0fc9ff2e0 100644
--- a/sound/pci/ac97/ac97_pcm.c
+++ b/sound/pci/ac97/ac97_pcm.c
@@ -253,7 +253,7 @@ static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate)
253 * AC97_SPDIF is accepted as a pseudo register to modify the SPDIF 253 * AC97_SPDIF is accepted as a pseudo register to modify the SPDIF
254 * status bits. 254 * status bits.
255 * 255 *
256 * Returns zero if successful, or a negative error code on failure. 256 * Return: Zero if successful, or a negative error code on failure.
257 */ 257 */
258int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate) 258int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate)
259{ 259{
@@ -440,6 +440,8 @@ static unsigned int get_rates(struct ac97_pcm *pcm, unsigned int cidx, unsigned
440 * It assigns available AC97 slots for given PCMs. If none or only 440 * It assigns available AC97 slots for given PCMs. If none or only
441 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members 441 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members
442 * are reduced and might be zero. 442 * are reduced and might be zero.
443 *
444 * Return: Zero if successful, or a negative error code on failure.
443 */ 445 */
444int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, 446int snd_ac97_pcm_assign(struct snd_ac97_bus *bus,
445 unsigned short pcms_count, 447 unsigned short pcms_count,
@@ -562,6 +564,8 @@ EXPORT_SYMBOL(snd_ac97_pcm_assign);
562 * @slots: a subset of allocated slots (snd_ac97_pcm_assign) for this pcm 564 * @slots: a subset of allocated slots (snd_ac97_pcm_assign) for this pcm
563 * 565 *
564 * It locks the specified slots and sets the given rate to AC97 registers. 566 * It locks the specified slots and sets the given rate to AC97 registers.
567 *
568 * Return: Zero if successful, or a negative error code on failure.
565 */ 569 */
566int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, 570int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
567 enum ac97_pcm_cfg cfg, unsigned short slots) 571 enum ac97_pcm_cfg cfg, unsigned short slots)
@@ -644,6 +648,8 @@ EXPORT_SYMBOL(snd_ac97_pcm_open);
644 * @pcm: the ac97 pcm instance 648 * @pcm: the ac97 pcm instance
645 * 649 *
646 * It frees the locked AC97 slots. 650 * It frees the locked AC97 slots.
651 *
652 * Return: Zero.
647 */ 653 */
648int snd_ac97_pcm_close(struct ac97_pcm *pcm) 654int snd_ac97_pcm_close(struct ac97_pcm *pcm)
649{ 655{
@@ -718,6 +724,8 @@ static int double_rate_hw_constraint_channels(struct snd_pcm_hw_params *params,
718 * 724 *
719 * Installs the hardware constraint rules to prevent using double rates and 725 * Installs the hardware constraint rules to prevent using double rates and
720 * more than two channels at the same time. 726 * more than two channels at the same time.
727 *
728 * Return: Zero if successful, or a negative error code on failure.
721 */ 729 */
722int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime) 730int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime)
723{ 731{
diff --git a/sound/sound_core.c b/sound/sound_core.c
index bb23009edc8d..359753fc24e1 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -352,7 +352,9 @@ static struct sound_unit *chains[SOUND_STEP];
352 * @dev: device pointer 352 * @dev: device pointer
353 * 353 *
354 * Allocate a special sound device by minor number from the sound 354 * Allocate a special sound device by minor number from the sound
355 * subsystem. The allocated number is returned on success. On failure 355 * subsystem.
356 *
357 * Return: The allocated number is returned on success. On failure,
356 * a negative error code is returned. 358 * a negative error code is returned.
357 */ 359 */
358 360
@@ -436,8 +438,10 @@ EXPORT_SYMBOL(register_sound_special);
436 * @dev: Unit number to allocate 438 * @dev: Unit number to allocate
437 * 439 *
438 * Allocate a mixer device. Unit is the number of the mixer requested. 440 * Allocate a mixer device. Unit is the number of the mixer requested.
439 * Pass -1 to request the next free mixer unit. On success the allocated 441 * Pass -1 to request the next free mixer unit.
440 * number is returned, on failure a negative error code is returned. 442 *
443 * Return: On success, the allocated number is returned. On failure,
444 * a negative error code is returned.
441 */ 445 */
442 446
443int register_sound_mixer(const struct file_operations *fops, int dev) 447int register_sound_mixer(const struct file_operations *fops, int dev)
@@ -454,8 +458,10 @@ EXPORT_SYMBOL(register_sound_mixer);
454 * @dev: Unit number to allocate 458 * @dev: Unit number to allocate
455 * 459 *
456 * Allocate a midi device. Unit is the number of the midi device requested. 460 * Allocate a midi device. Unit is the number of the midi device requested.
457 * Pass -1 to request the next free midi unit. On success the allocated 461 * Pass -1 to request the next free midi unit.
458 * number is returned, on failure a negative error code is returned. 462 *
463 * Return: On success, the allocated number is returned. On failure,
464 * a negative error code is returned.
459 */ 465 */
460 466
461int register_sound_midi(const struct file_operations *fops, int dev) 467int register_sound_midi(const struct file_operations *fops, int dev)
@@ -477,11 +483,13 @@ EXPORT_SYMBOL(register_sound_midi);
477 * @dev: Unit number to allocate 483 * @dev: Unit number to allocate
478 * 484 *
479 * Allocate a DSP device. Unit is the number of the DSP requested. 485 * Allocate a DSP device. Unit is the number of the DSP requested.
480 * Pass -1 to request the next free DSP unit. On success the allocated 486 * Pass -1 to request the next free DSP unit.
481 * number is returned, on failure a negative error code is returned.
482 * 487 *
483 * This function allocates both the audio and dsp device entries together 488 * This function allocates both the audio and dsp device entries together
484 * and will always allocate them as a matching pair - eg dsp3/audio3 489 * and will always allocate them as a matching pair - eg dsp3/audio3
490 *
491 * Return: On success, the allocated number is returned. On failure,
492 * a negative error code is returned.
485 */ 493 */
486 494
487int register_sound_dsp(const struct file_operations *fops, int dev) 495int register_sound_dsp(const struct file_operations *fops, int dev)