alsa/0002-mixer-Fix-rounding-mode-documentation.patch
Ismail Dönmez 6117f9abfc Accepting request 442719 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes (bsc#1012594):
  - A few PCM bugs have been fixed:
    * Stall of dmix and others in a wrong PCM state
    * Refactoring of PCM locking scheme
    * SHM initialization race fix
    * plug PCM memory leaks
    * Improvement of dshare/dmix delay calculation
    * Fix endless dshare draining
    * Fix semaphore discard race fix of direct plugins
  - UCM fixes and updates for DB410c and skylake-r5286
  - Mixer code cleanup not to install bogus plugin codes
  - Documentation fixes / updates
  0001-ucm-Add-ucm-files-for-DB410c-board.patch
  0002-mixer-Fix-rounding-mode-documentation.patch
  0003-pcm-Fix-shm-initialization-race-condition.patch
  0004-pcm-Better-understandable-locking-code.patch
  0005-ucm-fix-crash-when-calling-snd_use_case_geti-with-no.patch
  0006-ucm-docs-typeset-lists-of-identifiers-explicitly.patch
  0007-Update-include-sound-tlv.h-from-4.9-pre-kernel-uapi.patch
  0008-test-use-actual-information-for-TLV-operation.patch
  0009-ctl-improve-API-documentation-for-TLV-operation.patch
  0010-ctl-improve-documentation-about-TLV-related-APIs.patch
  0011-ctl-correct-documentation-about-TLV-feature.patch
  0012-conf-ucm-skylake-add-skylake-rt286-conf-files.patch
  0013-pcm_plug-Clear-plugins-on-all-error-conditions.patch
  0014-mixer-Don-t-install-smixer-modules-unless-python-is-.patch
  0015-pcm_dshare-Do-not-discard-slave-reported-delay-in-st.patch
  0016-pcm-direct-Protect-from-freeing-semaphore-when-alrea.patch
  0017-pcm-dshare-Fix-endless-playback-of-buffer.patch
  0018-pcm-Add-the-PCM-state-checks-to-plugins.patch

OBS-URL: https://build.opensuse.org/request/show/442719
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=202
2016-11-29 18:09:28 +00:00

77 lines
4.3 KiB
Diff

From e2cfe3c6c8483c27b60d9b64e760ba3e8c8a1d43 Mon Sep 17 00:00:00 2001
From: David Henningsson <diwic@ubuntu.com>
Date: Sun, 14 Aug 2016 09:31:25 +0200
Subject: [PATCH] mixer: Fix rounding mode documentation
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 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mixer/simple.c b/src/mixer/simple.c
index fd9ba93ee791..82476d5ca0f2 100644
--- a/src/mixer/simple.c
+++ b/src/mixer/simple.c
@@ -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)
--
2.10.2