aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core')
-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.c41
-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
17 files changed, 174 insertions, 114 deletions
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..c9042b4d3695 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -89,7 +89,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
89 char *nbuf; 89 char *nbuf;
90 90
91 nsize = PAGE_ALIGN(nsize); 91 nsize = PAGE_ALIGN(nsize);
92 nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL); 92 nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL | __GFP_ZERO);
93 if (! nbuf) 93 if (! nbuf)
94 return -ENOMEM; 94 return -ENOMEM;
95 95
@@ -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{
@@ -353,7 +353,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file)
353 goto __nomem; 353 goto __nomem;
354 data->rbuffer = buffer; 354 data->rbuffer = buffer;
355 buffer->len = PAGE_SIZE; 355 buffer->len = PAGE_SIZE;
356 buffer->buffer = kmalloc(buffer->len, GFP_KERNEL); 356 buffer->buffer = kzalloc(buffer->len, GFP_KERNEL);
357 if (buffer->buffer == NULL) 357 if (buffer->buffer == NULL)
358 goto __nomem; 358 goto __nomem;
359 } 359 }
@@ -694,32 +694,27 @@ 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{
701 int c = -1; 701 int c = -1;
702 702
703 if (snd_BUG_ON(!buffer || !buffer->buffer))
704 return 1;
703 if (len <= 0 || buffer->stop || buffer->error) 705 if (len <= 0 || buffer->stop || buffer->error)
704 return 1; 706 return 1;
705 while (--len > 0) { 707 while (!buffer->stop) {
706 c = buffer->buffer[buffer->curr++]; 708 c = buffer->buffer[buffer->curr++];
707 if (c == '\n') { 709 if (buffer->curr >= buffer->size)
708 if (buffer->curr >= buffer->size)
709 buffer->stop = 1;
710 break;
711 }
712 *line++ = c;
713 if (buffer->curr >= buffer->size) {
714 buffer->stop = 1; 710 buffer->stop = 1;
711 if (c == '\n')
715 break; 712 break;
713 if (len) {
714 len--;
715 *line++ = c;
716 } 716 }
717 } 717 }
718 while (c != '\n' && !buffer->stop) {
719 c = buffer->buffer[buffer->curr++];
720 if (buffer->curr >= buffer->size)
721 buffer->stop = 1;
722 }
723 *line = '\0'; 718 *line = '\0';
724 return 0; 719 return 0;
725} 720}
@@ -735,7 +730,7 @@ EXPORT_SYMBOL(snd_info_get_line);
735 * Parses the original string and copy a token to the given 730 * Parses the original string and copy a token to the given
736 * string buffer. 731 * string buffer.
737 * 732 *
738 * Returns the updated pointer of the original string so that 733 * Return: The updated pointer of the original string so that
739 * it can be used for the next call. 734 * it can be used for the next call.
740 */ 735 */
741const char *snd_info_get_str(char *dest, const char *src, int len) 736const char *snd_info_get_str(char *dest, const char *src, int len)
@@ -774,7 +769,7 @@ EXPORT_SYMBOL(snd_info_get_str);
774 * Usually called from other functions such as 769 * Usually called from other functions such as
775 * snd_info_create_card_entry(). 770 * snd_info_create_card_entry().
776 * 771 *
777 * Returns the pointer of the new instance, or NULL on failure. 772 * Return: The pointer of the new instance, or %NULL on failure.
778 */ 773 */
779static struct snd_info_entry *snd_info_create_entry(const char *name) 774static struct snd_info_entry *snd_info_create_entry(const char *name)
780{ 775{
@@ -803,7 +798,7 @@ static struct snd_info_entry *snd_info_create_entry(const char *name)
803 * 798 *
804 * Creates a new info entry and assigns it to the given module. 799 * Creates a new info entry and assigns it to the given module.
805 * 800 *
806 * Returns the pointer of the new instance, or NULL on failure. 801 * Return: The pointer of the new instance, or %NULL on failure.
807 */ 802 */
808struct snd_info_entry *snd_info_create_module_entry(struct module * module, 803struct snd_info_entry *snd_info_create_module_entry(struct module * module,
809 const char *name, 804 const char *name,
@@ -827,7 +822,7 @@ EXPORT_SYMBOL(snd_info_create_module_entry);
827 * 822 *
828 * Creates a new info entry and assigns it to the given card. 823 * Creates a new info entry and assigns it to the given card.
829 * 824 *
830 * Returns the pointer of the new instance, or NULL on failure. 825 * Return: The pointer of the new instance, or %NULL on failure.
831 */ 826 */
832struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, 827struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
833 const char *name, 828 const char *name,
@@ -893,7 +888,7 @@ static int snd_info_dev_register_entry(struct snd_device *device)
893 * For releasing this entry, use snd_device_free() instead of 888 * For releasing this entry, use snd_device_free() instead of
894 * snd_info_free_entry(). 889 * snd_info_free_entry().
895 * 890 *
896 * Returns zero if successful, or a negative error code on failure. 891 * Return: Zero if successful, or a negative error code on failure.
897 */ 892 */
898int snd_card_proc_new(struct snd_card *card, const char *name, 893int snd_card_proc_new(struct snd_card *card, const char *name,
899 struct snd_info_entry **entryp) 894 struct snd_info_entry **entryp)
@@ -949,7 +944,7 @@ EXPORT_SYMBOL(snd_info_free_entry);
949 * 944 *
950 * Registers the proc info entry. 945 * Registers the proc info entry.
951 * 946 *
952 * Returns zero if successful, or a negative error code on failure. 947 * Return: Zero if successful, or a negative error code on failure.
953 */ 948 */
954int snd_info_register(struct snd_info_entry * entry) 949int snd_info_register(struct snd_info_entry * entry)
955{ 950{
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 0097f3619faa..02f90b4f8b86 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -365,8 +365,7 @@ static void master_free(struct snd_kcontrol *kcontrol)
365 * @name: name string of the control element to create 365 * @name: name string of the control element to create
366 * @tlv: optional TLV int array for dB information 366 * @tlv: optional TLV int array for dB information
367 * 367 *
368 * Creates a virtual matster control with the given name string. 368 * Creates a virtual master control with the given name string.
369 * Returns the created control element, or NULL for errors (ENOMEM).
370 * 369 *
371 * After creating a vmaster element, you can add the slave controls 370 * After creating a vmaster element, you can add the slave controls
372 * via snd_ctl_add_slave() or snd_ctl_add_slave_uncached(). 371 * via snd_ctl_add_slave() or snd_ctl_add_slave_uncached().
@@ -375,6 +374,8 @@ static void master_free(struct snd_kcontrol *kcontrol)
375 * for dB scale of the master control. It should be a single element 374 * for dB scale of the master control. It should be a single element
376 * with #SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or 375 * with #SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or
377 * #SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB. 376 * #SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB.
377 *
378 * Return: The created control element, or %NULL for errors (ENOMEM).
378 */ 379 */
379struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, 380struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
380 const unsigned int *tlv) 381 const unsigned int *tlv)
@@ -426,6 +427,8 @@ EXPORT_SYMBOL(snd_ctl_make_virtual_master);
426 * 427 *
427 * Adds the given hook to the vmaster control element so that it's called 428 * Adds the given hook to the vmaster control element so that it's called
428 * at each time when the value is changed. 429 * at each time when the value is changed.
430 *
431 * Return: Zero.
429 */ 432 */
430int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol, 433int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol,
431 void (*hook)(void *private_data, int), 434 void (*hook)(void *private_data, int),