aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_misc.c
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 /sound/core/pcm_misc.c
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 'sound/core/pcm_misc.c')
-rw-r--r--sound/core/pcm_misc.c28
1 files changed, 14 insertions, 14 deletions
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{