]> git.alsa-project.org Git - alsa-lib.git/commitdiff
mixer: Fix rounding mode documentation
authorDavid Henningsson <diwic@ubuntu.com>
Sun, 14 Aug 2016 07:31:25 +0000 (09:31 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Aug 2016 09:27:03 +0000 (11:27 +0200)
The documentation specifies three different rounding modes, but this
is wrong, because they all end up calling snd_tlv_convert_from_dB,
which only has two rounding modes.

Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/simple.c

index fd9ba93ee791557b255ecde8f1183bd637948670..82476d5ca0f25e15b42fde8c8c0111c78a3605c4 100644 (file)
@@ -376,7 +376,7 @@ int snd_mixer_selem_ask_playback_vol_dB(snd_mixer_elem_t *elem, long value, long
  * \brief Return corresponding integer playback volume for given dB value for a mixer simple element
  * \param elem Mixer simple element handle
  * \param value value to be converted to dB range
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \param dBvalue pointer to returned dB value
  * \return 0 on success otherwise a negative error code
  */
@@ -454,7 +454,7 @@ int snd_mixer_selem_set_playback_volume(snd_mixer_elem_t *elem, snd_mixer_selem_
  * \param elem Mixer simple element handle
  * \param channel mixer simple element channel identifier
  * \param value control value in dB * 100
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \return 0 on success otherwise a negative error code
  */
 int snd_mixer_selem_set_playback_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir)
@@ -491,7 +491,7 @@ int snd_mixer_selem_set_playback_volume_all(snd_mixer_elem_t *elem, long value)
  * \brief Set value in dB of playback volume control for all channels of a mixer simple element
  * \param elem Mixer simple element handle
  * \param value control value in dB * 100
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \return 0 on success otherwise a negative error code
  */
 int snd_mixer_selem_set_playback_dB_all(snd_mixer_elem_t *elem, long value, int dir)
@@ -706,7 +706,7 @@ int snd_mixer_selem_ask_capture_vol_dB(snd_mixer_elem_t *elem, long value, long
  * \param elem Mixer simple element handle
  * \param dBvalue dB value to be converted to integer range
  * \param value pointer to returned integer value
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \return 0 on success otherwise a negative error code
  */
 int snd_mixer_selem_ask_capture_dB_vol(snd_mixer_elem_t *elem, long dBvalue, int dir, long *value)
@@ -777,7 +777,7 @@ int snd_mixer_selem_set_capture_volume(snd_mixer_elem_t *elem, snd_mixer_selem_c
  * \param elem Mixer simple element handle
  * \param channel mixer simple element channel identifier
  * \param value control value in dB * 100
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \return 0 on success otherwise a negative error code
  */
 int snd_mixer_selem_set_capture_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir)
@@ -814,7 +814,7 @@ int snd_mixer_selem_set_capture_volume_all(snd_mixer_elem_t *elem, long value)
  * \brief Set value in dB of capture volume control for all channels of a mixer simple element
  * \param elem Mixer simple element handle
  * \param value control value in dB * 100
- * \param dir select direction (-1 = accurate or first bellow, 0 = accurate, 1 = accurate or first above)
+ * \param dir rounding mode - rounds up if dir > 0, otherwise rounds down
  * \return 0 on success otherwise a negative error code
  */
 int snd_mixer_selem_set_capture_dB_all(snd_mixer_elem_t *elem, long value, int dir)