aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
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/pci
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/pci')
-rw-r--r--sound/pci/ac97/ac97_codec.c16
-rw-r--r--sound/pci/ac97/ac97_pcm.c10
2 files changed, 18 insertions, 8 deletions
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{