[alsa-devel] [PATCH v2 - alsa-lib 0/3] Fixes for snd_tlv_convert_from_dB

Peter Ujfalusi peter.ujfalusi at nokia.com
Tue Jul 20 09:34:51 CEST 2010


Changes since the initial version:
- In patch one the range check has been converted to be more intuitive

Intro part from the first version:

One cosmetic fix, and two real fixes for alsa-lib's tlv handling.

There were two separate issue with the snd_tlv_convert_from_dB function:
1. When user asked for out of range dB value, and the control had
   SND_CTL_TLVT_DB_RANGE, the control's full range was not checked against the
   requested value, which resulted failure.
2. When there are 'holes' in the SND_CTL_TLVT_DB_RANGE array,
   snd_tlv_convert_from_dB will fail to find the apropriate raw value.

For issue #2, I have sent patches for the drivers I maintain, but Mark Brown
suggested to fix the issue in alsa-lib instead of converting the driver's
non-overlapping to overlapping mapping:

So the following series for alsa-lib, will fix the SND_CTL_TLVT_DB_RANGE

Peter Ujfalusi (3):
  tlv: Check out of range dB with SND_CTL_TLVT_DB_RANGE
  tlv: Handle 'holes' in SND_CTL_TLVT_DB_RANGE array
  tlv: Remove tailing tab after snd_ctl_get_dB_range function

 src/control/tlv.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

More information about the Alsa-devel mailing list