diff options
Diffstat (limited to 'sound/core/pcm_lib.c')
| -rw-r--r-- | sound/core/pcm_lib.c | 54 | 
1 files changed, 43 insertions, 11 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index c4840ff75d0..41b3dfe6869 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,   * The interval is changed to the range satisfying both intervals.   * The interval status (min, max, integer, etc.) are evaluated.   * - * Returns non-zero if the value is changed, zero if not changed. + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v)  { @@ -865,7 +866,8 @@ void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,   * @nump: pointer to store the resultant numerator   * @denp: pointer to store the resultant denominator   * - * Returns non-zero if the value is changed, zero if not changed. + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  int snd_interval_ratnum(struct snd_interval *i,  			unsigned int rats_count, struct snd_ratnum *rats, @@ -983,7 +985,8 @@ EXPORT_SYMBOL(snd_interval_ratnum);   * @nump: pointer to store the resultant numerator   * @denp: pointer to store the resultant denominator   * - * Returns non-zero if the value is changed, zero if not changed. + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  static int snd_interval_ratden(struct snd_interval *i,  			       unsigned int rats_count, struct snd_ratden *rats, @@ -1082,7 +1085,8 @@ static int snd_interval_ratden(struct snd_interval *i,   * When mask is non-zero, only the elements corresponding to bit 1 are   * evaluated.   * - * Returns non-zero if the value is changed, zero if not changed. + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  int snd_interval_list(struct snd_interval *i, unsigned int count,  		      const unsigned int *list, unsigned int mask) @@ -1142,7 +1146,7 @@ static int snd_interval_step(struct snd_interval *i, unsigned int min, unsigned   * @private: the private data pointer passed to function   * @dep: the dependent variables   * - * Returns zero if successful, or a negative error code on failure. + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,  			int var, @@ -1200,6 +1204,8 @@ EXPORT_SYMBOL(snd_pcm_hw_rule_add);   * @mask: the bitmap mask   *   * Apply the constraint of the given bitmap mask to a 32-bit mask parameter. + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,  			       u_int32_t mask) @@ -1220,6 +1226,8 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param   * @mask: the 64bit bitmap mask   *   * Apply the constraint of the given bitmap mask to a 64-bit mask parameter. + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,  				 u_int64_t mask) @@ -1240,6 +1248,9 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par   * @var: hw_params variable to apply the integer constraint   *   * Apply the constraint of integer to an interval parameter. + * + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var)  { @@ -1257,6 +1268,9 @@ EXPORT_SYMBOL(snd_pcm_hw_constraint_integer);   * @max: the maximal value   *    * Apply the min/max range constraint to an interval parameter. + * + * Return: Positive if the value is changed, zero if it's not changed, or a + * negative error code.   */  int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,  				 unsigned int min, unsigned int max) @@ -1288,6 +1302,8 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,   * @l: list   *    * Apply the list of constraints to an interval parameter. + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime,  			       unsigned int cond, @@ -1322,6 +1338,8 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params,   * @cond: condition bits   * @var: hw_params variable to apply the ratnums constraint   * @r: struct snd_ratnums constriants + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,   				  unsigned int cond, @@ -1355,6 +1373,8 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params,   * @cond: condition bits   * @var: hw_params variable to apply the ratdens constraint   * @r: struct snd_ratdens constriants + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime,   				  unsigned int cond, @@ -1386,6 +1406,8 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,   * @cond: condition bits   * @width: sample bits width   * @msbits: msbits width + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime,   				 unsigned int cond, @@ -1414,6 +1436,8 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params,   * @cond: condition bits   * @var: hw_params variable to apply the step constraint   * @step: step size + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,  			       unsigned int cond, @@ -1444,6 +1468,8 @@ static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm   * @runtime: PCM runtime instance   * @cond: condition bits   * @var: hw_params variable to apply the power-of-2 constraint + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,  			       unsigned int cond, @@ -1470,6 +1496,8 @@ static int snd_pcm_hw_rule_noresample_func(struct snd_pcm_hw_params *params,   * snd_pcm_hw_rule_noresample - add a rule to allow disabling hw resampling   * @runtime: PCM runtime instance   * @base_rate: the rate at which the hardware does not resample + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime,  			       unsigned int base_rate) @@ -1519,8 +1547,8 @@ EXPORT_SYMBOL(_snd_pcm_hw_params_any);   * @var: parameter to retrieve   * @dir: pointer to the direction (-1,0,1) or %NULL   * - * Return the value for field @var if it's fixed in configuration space - * defined by @params. Return -%EINVAL otherwise. + * Return: The value for field @var if it's fixed in configuration space + * defined by @params. -%EINVAL otherwise.   */  int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,  			   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,   *   * Inside configuration space defined by @params remove from @var all   * values > minimum. Reduce configuration space accordingly. - * Return the minimum. + * + * Return: The minimum, or a negative error code on failure.   */  int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm,   			   struct snd_pcm_hw_params *params,  @@ -1637,7 +1666,8 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,   *   * Inside configuration space defined by @params remove from @var all   * values < maximum. Reduce configuration space accordingly. - * Return the maximum. + * + * Return: The maximum, or a negative error code on failure.   */  int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,   			  struct snd_pcm_hw_params *params, @@ -1665,6 +1695,8 @@ EXPORT_SYMBOL(snd_pcm_hw_param_last);   * The configuration chosen is that obtained fixing in this order:   * first access, first format, first subformat, min channels,   * min rate, min period time, max buffer size, min tick time + * + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm,  			     struct snd_pcm_hw_params *params) @@ -1771,7 +1803,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream,   * Processes the generic ioctl commands for PCM.   * Can be passed as the ioctl callback for PCM ops.   * - * Returns zero if successful, or a negative error code on failure. + * Return: Zero if successful, or a negative error code on failure.   */  int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,  		      unsigned int cmd, void *arg) @@ -2510,7 +2542,7 @@ static void pcm_chmap_ctl_private_free(struct snd_kcontrol *kcontrol)   * @info_ret: store struct snd_pcm_chmap instance if non-NULL   *   * Create channel-mapping control elements assigned to the given PCM stream(s). - * Returns zero if succeed, or a negative error value. + * Return: Zero if successful, or a negative error value.   */  int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,  			   const struct snd_pcm_chmap_elem *chmap,  |