aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorYacine Belkadi <yacine.belkadi.1@gmail.com>2013-03-11 17:05:14 -0400
committerTakashi Iwai <tiwai@suse.de>2013-03-12 03:32:53 -0400
commiteb7c06e8e9c93b495e355421cffd3c43c266d7d2 (patch)
treef53aa110b92ff941f5d2d84d6ee38b1a45b3e005 /include/sound/pcm.h
parenta817650ebb451ef27db2baa7e10d0c28609bed13 (diff)
ALSA: add/change some comments describing function return values
script/kernel-doc reports the following type of warnings (when run in verbose mode): Warning(sound/core/init.c:152): No description found for return value of 'snd_card_create' To fix that: - add missing descriptions of function return values - use "Return:" sections to describe those return values Along the way: - complete some descriptions - fix some typos Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h23
1 files changed, 14 insertions, 9 deletions
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{