16 Jun
2011
16 Jun
'11
11:12 a.m.
On Thu, Jun 16, 2011 at 10:39:22AM +0200, Lars-Peter Clausen wrote:
On Tue, Jun 14, 2011 at 09:27:05PM +0200, Daniel Mack wrote:
+static const char *sta32x_limiter_drc_attack_thr[] = {
- "-31dB", "-29dB", "-27dB", "-25dB", "-23dB", "-21dB", "-19dB", "-17dB",
- "-16dB", "-15dB", "-14dB", "-13dB", "-12dB", "-10dB", "-7dB", "-4dB" };
You can put multiple scale items each with their own min/max value into a TLV. For example for DRC attack in your case this would look like:
static const unsigned int drc_attack_tlv[] = { TLV_DB_RANGE_HEAD(3), 0, 7, TLV_DB_SCALE_ITEM(-3100, 200, 0), 8, 13, TLV_DB_SCALE_ITEM(-1600, 100, 0), 14, 16, TLV_DB_SCALE_ITEM(-1000, 300, 0), };
That looks indeed much better than using enums.
Thanks, Johannes