ASoC: Replace users of TLV_DB_RANGE_HEAD
Subsystems (10)
Lars-Peter Clausen
maintainercover ASoC: Replace users of TLV_DB_RANGE_HEAD
Usage of TLV_DB_RANGE_HEAD() is deprecated in favor of DECLARE_TLV_DB_RANGE(). The reason for this is that the former requires to specify the number of items inside the range container while the later is able to calculate this automatically and hence leaves less room for error.
While non of the current users of TLV_DB_RANGE_HEAD() gets it wrong it still makes sense to clean this up since existing drivers are often used as templates for new drivers. As an added bonus the code is also slightly shorter.
There are also a few drivers which use TLV_DB_RANGE_HEAD() with only a single sub-item. Those are updated to not use a range container at all since it is not necessary.
Most of the conversion was auto-generated using the following coccinelle script:
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
- Lars
Lars-Peter Clausen (42):
ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8400: Don't use range container for TLV with one entry
ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm8990: Don't use range container for TLV with one entry
ASoC: wm8991: Don't use range container for TLVs with one entry
ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
sound/soc/codecs/88pm860x-codec.c | 28 +++++++++------------ sound/soc/codecs/ab8500-codec.c | 7 +++--- sound/soc/codecs/adau1373.c | 21 +++++++--------- sound/soc/codecs/alc5623.c | 7 +++--- sound/soc/codecs/alc5632.c | 7 +++--- sound/soc/codecs/cs42l52.c | 7 +++--- sound/soc/codecs/cs42l56.c | 21 +++++++--------- sound/soc/codecs/cs42l73.c | 14 +++++------ sound/soc/codecs/da7210.c | 22 +++++++---------- sound/soc/codecs/da7213.c | 15 +++++------ sound/soc/codecs/da9055.c | 15 +++++------ sound/soc/codecs/jz4740.c | 7 +++--- sound/soc/codecs/max9768.c | 7 +++--- sound/soc/codecs/max98088.c | 23 ++++++++--------- sound/soc/codecs/max98090.c | 42 ++++++++++++++----------------- sound/soc/codecs/max98095.c | 35 +++++++++++--------------- sound/soc/codecs/max9850.c | 7 +++--- sound/soc/codecs/max9877.c | 14 +++++------ sound/soc/codecs/rt5631.c | 7 +++--- sound/soc/codecs/rt5640.c | 7 +++--- sound/soc/codecs/rt5645.c | 7 +++--- sound/soc/codecs/rt5651.c | 7 +++--- sound/soc/codecs/rt5670.c | 7 +++--- sound/soc/codecs/rt5677.c | 7 +++--- sound/soc/codecs/sgtl5000.c | 7 +++--- sound/soc/codecs/ssm2602.c | 7 +++--- sound/soc/codecs/tpa6130a2.c | 14 +++++------ sound/soc/codecs/twl4030.c | 7 +++--- sound/soc/codecs/uda1380.c | 14 +++++------ sound/soc/codecs/wm8350.c | 7 +++--- sound/soc/codecs/wm8400.c | 5 +--- sound/soc/codecs/wm8737.c | 7 +++--- sound/soc/codecs/wm8753.c | 7 +++--- sound/soc/codecs/wm8961.c | 7 +++--- sound/soc/codecs/wm8962.c | 14 +++++------ sound/soc/codecs/wm8990.c | 5 +--- sound/soc/codecs/wm8991.c | 52 +++++++-------------------------------- sound/soc/codecs/wm8993.c | 7 +++--- sound/soc/codecs/wm9081.c | 7 +++--- sound/soc/codecs/wm9090.c | 21 +++++++--------- sound/soc/codecs/wm9713.c | 7 +++--- sound/soc/codecs/wm_hubs.c | 7 +++--- 42 files changed, 216 insertions(+), 327 deletions(-)
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 1/42 ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/88pm860x-codec.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
sound/soc/codecs/88pm860x-codec.c +12 -16
@@ -156,33 +156,29 @@ static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1); static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);/* {-23, -17, -13.5, -11, -9, -6, -3, 0}dB */ -static const unsigned int mic_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(mic_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (-2300 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (-1700 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (-1350 ,0 ,0 ),3 ,3 ,TLV_DB_SCALE_ITEM (-1100 ,0 ,0 ), -4 ,7 ,TLV_DB_SCALE_ITEM (-900 ,300 ,0 ), -}; +4 ,7 ,TLV_DB_SCALE_ITEM (-900 ,300 ,0 ) +);/* {0, 0, 0, -6, 0, 6, 12, 18}dB */ -static const unsigned int aux_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ) +);/* {-16, -13, -10, -7, -5.2, -3,3, -2.2, 0}dB, mute instead of -16dB */ -static const unsigned int out_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(out_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-1600 ,300 ,1 ),4 ,4 ,TLV_DB_SCALE_ITEM (-520 ,0 ,0 ),5 ,5 ,TLV_DB_SCALE_ITEM (-330 ,0 ,0 ), -6 ,7 ,TLV_DB_SCALE_ITEM (-220 ,220 ,0 ), -}; +6 ,7 ,TLV_DB_SCALE_ITEM (-220 ,220 ,0 ) +); -static const unsigned int st_tlv[] = { -TLV_DB_RANGE_HEAD (8 ), +static const DECLARE_TLV_DB_RANGE(st_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-12041 ,602 ,0 ),2 ,3 ,TLV_DB_SCALE_ITEM (-11087 ,250 ,0 ), 4, 5, TLV_DB_SCALE_ITEM(-10643, 158, 0),
@@ -190,8 +186,8 @@ static const unsigned int st_tlv[] = {8 ,9 ,TLV_DB_SCALE_ITEM (-10133 ,92 ,0 ),10 ,13 ,TLV_DB_SCALE_ITEM (-9958 ,70 ,0 ),14 ,17 ,TLV_DB_SCALE_ITEM (-9689 ,53 ,0 ), - 18, 271, TLV_DB_SCALE_ITEM(-9484, 37, 0), -}; +18 ,271 ,TLV_DB_SCALE_ITEM (-9484 ,37 ,0 ) +);/* Sidetone Gain = M * 2^(-5-N) */ struct st_gain {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
f17cbcfef3cf6d91a374817f84c66951c84f11e2Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:29 +0200
Subject: [PATCH] ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/88pm860x-codec.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
sound/soc/codecs/88pm860x-codec.c +12 -16
@@ -156,33 +156,29 @@ static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1); static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);/* {-23, -17, -13.5, -11, -9, -6, -3, 0}dB */ -static const unsigned int mic_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(mic_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (-2300 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (-1700 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (-1350 ,0 ,0 ),3 ,3 ,TLV_DB_SCALE_ITEM (-1100 ,0 ,0 ), -4 ,7 ,TLV_DB_SCALE_ITEM (-900 ,300 ,0 ), -}; +4 ,7 ,TLV_DB_SCALE_ITEM (-900 ,300 ,0 ) +);/* {0, 0, 0, -6, 0, 6, 12, 18}dB */ -static const unsigned int aux_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ) +);/* {-16, -13, -10, -7, -5.2, -3,3, -2.2, 0}dB, mute instead of -16dB */ -static const unsigned int out_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(out_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-1600 ,300 ,1 ),4 ,4 ,TLV_DB_SCALE_ITEM (-520 ,0 ,0 ),5 ,5 ,TLV_DB_SCALE_ITEM (-330 ,0 ,0 ), -6 ,7 ,TLV_DB_SCALE_ITEM (-220 ,220 ,0 ), -}; +6 ,7 ,TLV_DB_SCALE_ITEM (-220 ,220 ,0 ) +); -static const unsigned int st_tlv[] = { -TLV_DB_RANGE_HEAD (8 ), +static const DECLARE_TLV_DB_RANGE(st_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-12041 ,602 ,0 ),2 ,3 ,TLV_DB_SCALE_ITEM (-11087 ,250 ,0 ), 4, 5, TLV_DB_SCALE_ITEM(-10643, 158, 0),
@@ -190,8 +186,8 @@ static const unsigned int st_tlv[] = {8 ,9 ,TLV_DB_SCALE_ITEM (-10133 ,92 ,0 ),10 ,13 ,TLV_DB_SCALE_ITEM (-9958 ,70 ,0 ),14 ,17 ,TLV_DB_SCALE_ITEM (-9689 ,53 ,0 ), - 18, 271, TLV_DB_SCALE_ITEM(-9484, 37, 0), -}; +18 ,271 ,TLV_DB_SCALE_ITEM (-9484 ,37 ,0 ) +);/* Sidetone Gain = M * 2^(-5-N) */ struct st_gain {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 2/42 ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/ab8500-codec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/ab8500-codec.c +3 -4
@@ -1335,11 +1335,10 @@ static DECLARE_TLV_DB_SCALE(dax_dig_gain_tlv, -6300, 100, 1); static DECLARE_TLV_DB_SCALE(hs_ear_dig_gain_tlv, -100, 100, 1);/* -1dB = Mute */ -static const unsigned int hs_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hs_gain_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-3200 ,400 ,0 ), -4 ,15 ,TLV_DB_SCALE_ITEM (-1800 ,200 ,0 ), -}; +4 ,15 ,TLV_DB_SCALE_ITEM (-1800 ,200 ,0 ) +); static DECLARE_TLV_DB_SCALE(mic_gain_tlv, 0, 100, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
69dae09f2da83c96de6c8573061bd38e9989e873Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:30 +0200
Subject: [PATCH] ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/ab8500-codec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/ab8500-codec.c +3 -4
@@ -1335,11 +1335,10 @@ static DECLARE_TLV_DB_SCALE(dax_dig_gain_tlv, -6300, 100, 1); static DECLARE_TLV_DB_SCALE(hs_ear_dig_gain_tlv, -100, 100, 1);/* -1dB = Mute */ -static const unsigned int hs_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hs_gain_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-3200 ,400 ,0 ), -4 ,15 ,TLV_DB_SCALE_ITEM (-1800 ,200 ,0 ), -}; +4 ,15 ,TLV_DB_SCALE_ITEM (-1800 ,200 ,0 ) +); static DECLARE_TLV_DB_SCALE(mic_gain_tlv, 0, 100, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 3/42 ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/adau1373.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/adau1373.c +9 -12
@@ -320,13 +320,12 @@ static const struct reg_default adau1373_reg_defaults[] = { { ADAU1373_DIGEN, 0x00 }, }; -static const unsigned int adau1373_out_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(adau1373_out_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7900 ,400 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-4700 ,300 ,0 ),16 ,23 ,TLV_DB_SCALE_ITEM (-2300 ,200 ,0 ), -24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ), -}; +24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ) +); static const DECLARE_TLV_DB_MINMAX(adau1373_digital_tlv, -9563, 0); static const DECLARE_TLV_DB_SCALE(adau1373_in_pga_tlv, -1300, 100, 1);
@@ -381,12 +380,11 @@ static const char *adau1373_bass_hpf_cutoff_text[] = { "158Hz", "232Hz", "347Hz", "520Hz", }; -static const unsigned int adau1373_bass_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(adau1373_bass_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-600 ,600 ,1 ),3 ,4 ,TLV_DB_SCALE_ITEM (950 ,250 ,0 ), -5 ,7 ,TLV_DB_SCALE_ITEM (1400 ,150 ,0 ), -}; +5 ,7 ,TLV_DB_SCALE_ITEM (1400 ,150 ,0 ) +); static SOC_ENUM_SINGLE_DECL(adau1373_bass_lpf_cutoff_enum, ADAU1373_BASS1, 5, adau1373_bass_lpf_cutoff_text);
@@ -414,11 +412,10 @@ static SOC_ENUM_SINGLE_DECL(adau1373_3d_level_enum, static SOC_ENUM_SINGLE_DECL(adau1373_3d_cutoff_enum, ADAU1373_3D_CTRL1, 0, adau1373_3d_cutoff_text); -static const unsigned int adau1373_3d_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(adau1373_3d_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -1 ,7 ,TLV_DB_LINEAR_ITEM (-1800 ,-120 ), -}; +1 ,7 ,TLV_DB_LINEAR_ITEM (-1800 ,-120 ) +);static const char *adau1373_lr_mux_text[] = {"Mute" ,
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
31581f3c09e796d5faac183eadfe06dca2223a5eMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:31 +0200
Subject: [PATCH] ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/adau1373.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/adau1373.c +9 -12
@@ -320,13 +320,12 @@ static const struct reg_default adau1373_reg_defaults[] = { { ADAU1373_DIGEN, 0x00 }, }; -static const unsigned int adau1373_out_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(adau1373_out_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7900 ,400 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-4700 ,300 ,0 ),16 ,23 ,TLV_DB_SCALE_ITEM (-2300 ,200 ,0 ), -24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ), -}; +24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ) +); static const DECLARE_TLV_DB_MINMAX(adau1373_digital_tlv, -9563, 0); static const DECLARE_TLV_DB_SCALE(adau1373_in_pga_tlv, -1300, 100, 1);
@@ -381,12 +380,11 @@ static const char *adau1373_bass_hpf_cutoff_text[] = { "158Hz", "232Hz", "347Hz", "520Hz", }; -static const unsigned int adau1373_bass_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(adau1373_bass_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-600 ,600 ,1 ),3 ,4 ,TLV_DB_SCALE_ITEM (950 ,250 ,0 ), -5 ,7 ,TLV_DB_SCALE_ITEM (1400 ,150 ,0 ), -}; +5 ,7 ,TLV_DB_SCALE_ITEM (1400 ,150 ,0 ) +); static SOC_ENUM_SINGLE_DECL(adau1373_bass_lpf_cutoff_enum, ADAU1373_BASS1, 5, adau1373_bass_lpf_cutoff_text);
@@ -414,11 +412,10 @@ static SOC_ENUM_SINGLE_DECL(adau1373_3d_level_enum, static SOC_ENUM_SINGLE_DECL(adau1373_3d_cutoff_enum, ADAU1373_3D_CTRL1, 0, adau1373_3d_cutoff_text); -static const unsigned int adau1373_3d_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(adau1373_3d_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -1 ,7 ,TLV_DB_LINEAR_ITEM (-1800 ,-120 ), -}; +1 ,7 ,TLV_DB_LINEAR_ITEM (-1800 ,-120 ) +);static const char *adau1373_lr_mux_text[] = {"Mute" ,
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 4/42 ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/alc5623.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/alc5623.c +3 -4
@@ -82,12 +82,11 @@ static int amp_mixer_event(struct snd_soc_dapm_widget *w, static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); -static const unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);static const struct snd_kcontrol_new alc5621_vol_snd_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
c8aeb0f60f648fbb77c1d5b3edda86e08bf53b30Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:32 +0200
Subject: [PATCH] ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/alc5623.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/alc5623.c +3 -4
@@ -82,12 +82,11 @@ static int amp_mixer_event(struct snd_soc_dapm_widget *w, static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); -static const unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);static const struct snd_kcontrol_new alc5621_vol_snd_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 5/42 ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/alc5632.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/alc5632.c +3 -4
@@ -146,11 +146,10 @@ static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0);/* -16.5db min scale, 1.5db steps, no mute */ static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); -static const unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ), -}; +1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ) +);/* 0db min scale, 6 db steps, no mute */ static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);/* 0db min scalem 0.75db steps, no mute */
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
ec7e4dc85cd7a2498d6ab71e9f77f49b41729fb4Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:33 +0200
Subject: [PATCH] ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/alc5632.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/alc5632.c +3 -4
@@ -146,11 +146,10 @@ static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0);/* -16.5db min scale, 1.5db steps, no mute */ static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); -static const unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ), -}; +1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ) +);/* 0db min scale, 6 db steps, no mute */ static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);/* 0db min scalem 0.75db steps, no mute */
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 6/42 ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l52.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/cs42l52.c +3 -4
@@ -196,11 +196,10 @@ static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); -static const unsigned int limiter_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(limiter_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +);static const char *const cs42l52_adca_text[] = {"Input1A" ,"Input2A" ,"Input3A" ,"Input4A" ,"PGA Input Left" };
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
0a017768e8964ab4a6a68ad47a042d28b35695fbMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:34 +0200
Subject: [PATCH] ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l52.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/cs42l52.c +3 -4
@@ -196,11 +196,10 @@ static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); -static const unsigned int limiter_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(limiter_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +);static const char *const cs42l52_adca_text[] = {"Input1A" ,"Input2A" ,"Input3A" ,"Input4A" ,"PGA Input Left" };
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 7/42 ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l56.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/cs42l56.c +9 -12
@@ -185,21 +185,18 @@ static DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0); static DECLARE_TLV_DB_SCALE(preamp_tlv, 0, 1000, 0); static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); -static const unsigned int ngnb_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(ngnb_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-8200 ,600 ,0 ), -2 ,5 ,TLV_DB_SCALE_ITEM (-7600 ,300 ,0 ), -}; -static const unsigned int ngb_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +2 ,5 ,TLV_DB_SCALE_ITEM (-7600 ,300 ,0 ) +); +static const DECLARE_TLV_DB_RANGE(ngb_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-6400 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-4600 ,300 ,0 ), -}; -static const unsigned int alc_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +3 ,7 ,TLV_DB_SCALE_ITEM (-4600 ,300 ,0 ) +); +static const DECLARE_TLV_DB_RANGE(alc_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +);static const char *const beep_config_text[] = {"Off" ,"Single" ,"Multiple" ,"Continuous"
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
37879bafc2e0932279ad440d5a81c323e0c5c58cMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:35 +0200
Subject: [PATCH] ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l56.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/cs42l56.c +9 -12
@@ -185,21 +185,18 @@ static DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0); static DECLARE_TLV_DB_SCALE(preamp_tlv, 0, 1000, 0); static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); -static const unsigned int ngnb_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(ngnb_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-8200 ,600 ,0 ), -2 ,5 ,TLV_DB_SCALE_ITEM (-7600 ,300 ,0 ), -}; -static const unsigned int ngb_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +2 ,5 ,TLV_DB_SCALE_ITEM (-7600 ,300 ,0 ) +); +static const DECLARE_TLV_DB_RANGE(ngb_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-6400 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-4600 ,300 ,0 ), -}; -static const unsigned int alc_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +3 ,7 ,TLV_DB_SCALE_ITEM (-4600 ,300 ,0 ) +); +static const DECLARE_TLV_DB_RANGE(alc_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +);static const char *const beep_config_text[] = {"Off" ,"Single" ,"Multiple" ,"Continuous"
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 8/42 ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l73.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/cs42l73.c +6 -8
@@ -253,11 +253,10 @@ static bool cs42l73_readable_register(struct device *dev, unsigned int reg) } } -static const unsigned int hpaloa_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hpaloa_tlv,0 ,13 ,TLV_DB_SCALE_ITEM (-7600 ,200 ,0 ), -14 ,75 ,TLV_DB_SCALE_ITEM (-4900 ,100 ,0 ), -}; +14 ,75 ,TLV_DB_SCALE_ITEM (-4900 ,100 ,0 ) +); static DECLARE_TLV_DB_SCALE(adc_boost_tlv, 0, 2500, 0);
@@ -267,11 +266,10 @@ static DECLARE_TLV_DB_SCALE(ipd_tlv, -9600, 100, 0); static DECLARE_TLV_DB_SCALE(micpga_tlv, -600, 50, 0); -static const unsigned int limiter_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(limiter_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +); static const DECLARE_TLV_DB_SCALE(attn_tlv, -6300, 100, 1);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
0c8129152cb849183a204fe0ce95673e4c88d2f6Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:36 +0200
Subject: [PATCH] ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/cs42l73.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/cs42l73.c +6 -8
@@ -253,11 +253,10 @@ static bool cs42l73_readable_register(struct device *dev, unsigned int reg) } } -static const unsigned int hpaloa_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hpaloa_tlv,0 ,13 ,TLV_DB_SCALE_ITEM (-7600 ,200 ,0 ), -14 ,75 ,TLV_DB_SCALE_ITEM (-4900 ,100 ,0 ), -}; +14 ,75 ,TLV_DB_SCALE_ITEM (-4900 ,100 ,0 ) +); static DECLARE_TLV_DB_SCALE(adc_boost_tlv, 0, 2500, 0);
@@ -267,11 +266,10 @@ static DECLARE_TLV_DB_SCALE(ipd_tlv, -9600, 100, 0); static DECLARE_TLV_DB_SCALE(micpga_tlv, -600, 50, 0); -static const unsigned int limiter_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(limiter_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,0 ), -3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ), -}; +3 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,300 ,0 ) +); static const DECLARE_TLV_DB_SCALE(attn_tlv, -6300, 100, 1);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 9/42 ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da7210.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
sound/soc/codecs/da7210.c +9 -13
@@ -267,33 +267,29 @@ enum clk_src {* * Reserved area are considered as "mute". */ -static const unsigned int hp_out_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hp_out_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -54 dB to +15 dB */ -0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ), -}; +0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) +); -static const unsigned int lineout_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(lineout_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -54dB to 15dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) -}; +); -static const unsigned int mono_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mono_vol_tlv,0x0 ,0x2 ,TLV_DB_SCALE_ITEM (-1800 ,0 ,1 ),/* -18dB to 6dB */ 0x3 ,0x7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ) -}; +); -static const unsigned int aux1_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux1_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -48dB to 21dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-4800 ,150 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0); static const DECLARE_TLV_DB_SCALE(adc_eq_master_gain_tlv, -1800, 600, 1);
Signature · 1 line
2.1.4
Re: [PATCH 09/42] ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Quoted 20 lines · Lars-Peter Clausen
DECLARE_TLV_DB_RANGE()has the advantage over usingTLV_DB_RANGE_HEAD()that it automatically calculates the number of items in the TLV and is hence less prone to manual error.Generate using the following coccinelle script
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);// </smpl>
Quoted 1 line
Signed-off-by Lars-Peter Clausen <[email protected]>
Mark Brown
maintainerApplied "ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
In reply to Lars-Peter ClausenThe patch
ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
6c1e1bfe22d6dc45384acebe0722d35e89011cc2Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:37 +0200
Subject: [PATCH] ASoC: da7210: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da7210.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
sound/soc/codecs/da7210.c +9 -13
@@ -267,33 +267,29 @@ enum clk_src {* * Reserved area are considered as "mute". */ -static const unsigned int hp_out_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(hp_out_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -54 dB to +15 dB */ -0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ), -}; +0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) +); -static const unsigned int lineout_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(lineout_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -54dB to 15dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) -}; +); -static const unsigned int mono_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mono_vol_tlv,0x0 ,0x2 ,TLV_DB_SCALE_ITEM (-1800 ,0 ,1 ),/* -18dB to 6dB */ 0x3 ,0x7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ) -}; +); -static const unsigned int aux1_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux1_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -48dB to 21dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-4800 ,150 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0); static const DECLARE_TLV_DB_SCALE(adc_eq_master_gain_tlv, -1800, 600, 1);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 10/42 ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da7213.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
sound/soc/codecs/da7213.c +6 -9
@@ -28,27 +28,24 @@/* Gain and Volume */ -static const unsigned int aux_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_vol_tlv,/* -54dB */ 0x0 ,0x11 ,TLV_DB_SCALE_ITEM (-5400 ,0 ,0 ),/* -52.5dB to 15dB */ 0x12 ,0x3f ,TLV_DB_SCALE_ITEM (-5250 ,150 ,0 ) -}; +); -static const unsigned int digital_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(digital_gain_tlv,0x0 ,0x07 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -78dB to 12dB */ 0x08 ,0x7f ,TLV_DB_SCALE_ITEM (-7800 ,75 ,0 ) -}; +); -static const unsigned int alc_analog_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(alc_analog_gain_tlv,0x0 ,0x0 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* 0dB to 36dB */ 0x01 ,0x07 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
Signature · 1 line
2.1.4
Re: [PATCH 10/42] ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Quoted 20 lines · Lars-Peter Clausen
DECLARE_TLV_DB_RANGE()has the advantage over usingTLV_DB_RANGE_HEAD()that it automatically calculates the number of items in the TLV and is hence less prone to manual error.Generate using the following coccinelle script
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);// </smpl>
Quoted 1 line
Signed-off-by Lars-Peter Clausen <[email protected]>
Mark Brown
maintainerApplied "ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
In reply to Lars-Peter ClausenThe patch
ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
32e933be3f221723ace230fe1293eb3b3b3466ffMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:38 +0200
Subject: [PATCH] ASoC: da7213: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da7213.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
sound/soc/codecs/da7213.c +6 -9
@@ -28,27 +28,24 @@/* Gain and Volume */ -static const unsigned int aux_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_vol_tlv,/* -54dB */ 0x0 ,0x11 ,TLV_DB_SCALE_ITEM (-5400 ,0 ,0 ),/* -52.5dB to 15dB */ 0x12 ,0x3f ,TLV_DB_SCALE_ITEM (-5250 ,150 ,0 ) -}; +); -static const unsigned int digital_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(digital_gain_tlv,0x0 ,0x07 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -78dB to 12dB */ 0x08 ,0x7f ,TLV_DB_SCALE_ITEM (-7800 ,75 ,0 ) -}; +); -static const unsigned int alc_analog_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(alc_analog_gain_tlv,0x0 ,0x0 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* 0dB to 36dB */ 0x01 ,0x07 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 11/42 ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da9055.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
sound/soc/codecs/da9055.c +6 -9
@@ -289,26 +289,23 @@ enum clk_src {/* Gain and Volume */ -static const unsigned int aux_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (-5400 ,0 ,0 ),/* -54dB to 15dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) -}; +); -static const unsigned int digital_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(digital_gain_tlv,0x0 ,0x07 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -78dB to 12dB */ 0x08 ,0x7f ,TLV_DB_SCALE_ITEM (-7800 ,75 ,0 ) -}; +); -static const unsigned int alc_analog_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(alc_analog_gain_tlv,0x0 ,0x0 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* 0dB to 36dB */ 0x01 ,0x07 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
Signature · 1 line
2.1.4
Re: [PATCH 11/42] ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Quoted 20 lines · Lars-Peter Clausen
DECLARE_TLV_DB_RANGE()has the advantage over usingTLV_DB_RANGE_HEAD()that it automatically calculates the number of items in the TLV and is hence less prone to manual error.Generate using the following coccinelle script
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);// </smpl>
Quoted 1 line
Signed-off-by Lars-Peter Clausen <[email protected]>
Mark Brown
maintainerApplied "ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
In reply to Lars-Peter ClausenThe patch
ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
e27c8404a4745b3efeec1457e6b72f448ab4a785Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:39 +0200
Subject: [PATCH] ASoC: da9055: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/da9055.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
sound/soc/codecs/da9055.c +6 -9
@@ -289,26 +289,23 @@ enum clk_src {/* Gain and Volume */ -static const unsigned int aux_vol_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(aux_vol_tlv,0x0 ,0x10 ,TLV_DB_SCALE_ITEM (-5400 ,0 ,0 ),/* -54dB to 15dB */ 0x11 ,0x3f ,TLV_DB_SCALE_ITEM (-5400 ,150 ,0 ) -}; +); -static const unsigned int digital_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(digital_gain_tlv,0x0 ,0x07 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* -78dB to 12dB */ 0x08 ,0x7f ,TLV_DB_SCALE_ITEM (-7800 ,75 ,0 ) -}; +); -static const unsigned int alc_analog_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(alc_analog_gain_tlv,0x0 ,0x0 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,1 ),/* 0dB to 36dB */ 0x01 ,0x07 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ) -}; +); static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 12/42 ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/jz4740.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/jz4740.c +3 -4
@@ -78,11 +78,10 @@ struct jz4740_codec {struct regmap *regmap; }; -static const unsigned int jz4740_mic_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(jz4740_mic_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(jz4740_out_tlv, 0, 200, 0); static const DECLARE_TLV_DB_SCALE(jz4740_in_tlv, -3450, 150, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
4689ac530efa8dadfb3ef8a284f9b2b14b75ad5fMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:40 +0200
Subject: [PATCH] ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/jz4740.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/jz4740.c +3 -4
@@ -78,11 +78,10 @@ struct jz4740_codec {struct regmap *regmap; }; -static const unsigned int jz4740_mic_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(jz4740_mic_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(jz4740_out_tlv, 0, 200, 0); static const DECLARE_TLV_DB_SCALE(jz4740_in_tlv, -3450, 150, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 13/42 ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9768.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/max9768.c +3 -4
@@ -63,8 +63,7 @@ static int max9768_set_gpio(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int volume_tlv[] = { -TLV_DB_RANGE_HEAD (43 ), +static const DECLARE_TLV_DB_RANGE(volume_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (-16150 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (-9280 ,0 ,0 ), 2, 2, TLV_DB_SCALE_ITEM(-9030, 0, 0),
@@ -107,8 +106,8 @@ static const unsigned int volume_tlv[] = {51 ,57 ,TLV_DB_SCALE_ITEM (290 ,50 ,0 ),58 ,58 ,TLV_DB_SCALE_ITEM (650 ,0 ,0 ),59 ,62 ,TLV_DB_SCALE_ITEM (700 ,60 ,0 ), - 63, 63, TLV_DB_SCALE_ITEM(950, 0, 0), -}; +63 ,63 ,TLV_DB_SCALE_ITEM (950 ,0 ,0 ) +);static const struct snd_kcontrol_new max9768_volume[] = {SOC_SINGLE_TLV ("Playback Volume" ,MAX9768_VOL ,0 ,63 ,0 , volume_tlv),
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
44744eeccff7de65f98f2d5db804adc51bfd3333Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:41 +0200
Subject: [PATCH] ASoC: max9768: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9768.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/max9768.c +3 -4
@@ -63,8 +63,7 @@ static int max9768_set_gpio(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int volume_tlv[] = { -TLV_DB_RANGE_HEAD (43 ), +static const DECLARE_TLV_DB_RANGE(volume_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (-16150 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (-9280 ,0 ,0 ), 2, 2, TLV_DB_SCALE_ITEM(-9030, 0, 0),
@@ -107,8 +106,8 @@ static const unsigned int volume_tlv[] = {51 ,57 ,TLV_DB_SCALE_ITEM (290 ,50 ,0 ),58 ,58 ,TLV_DB_SCALE_ITEM (650 ,0 ,0 ),59 ,62 ,TLV_DB_SCALE_ITEM (700 ,60 ,0 ), - 63, 63, TLV_DB_SCALE_ITEM(950, 0, 0), -}; +63 ,63 ,TLV_DB_SCALE_ITEM (950 ,0 ,0 ) +);static const struct snd_kcontrol_new max9768_volume[] = {SOC_SINGLE_TLV ("Playback Volume" ,MAX9768_VOL ,0 ,63 ,0 , volume_tlv),
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 14/42 ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98088.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
sound/soc/codecs/max98088.c +10 -13
@@ -680,29 +680,26 @@ static int max98088_mic2pre_get(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int max98088_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), -0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +static const DECLARE_TLV_DB_RANGE(max98088_micboost_tlv, +0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); -static const unsigned int max98088_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98088_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98088_spk_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98088_spk_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +);static const struct snd_kcontrol_new max98088_snd_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
80170468deec8fe851957d1e1cc3cf680ae46804Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:42 +0200
Subject: [PATCH] ASoC: max98088: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98088.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
sound/soc/codecs/max98088.c +10 -13
@@ -680,29 +680,26 @@ static int max98088_mic2pre_get(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int max98088_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), -0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +static const DECLARE_TLV_DB_RANGE(max98088_micboost_tlv, +0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); -static const unsigned int max98088_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98088_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98088_spk_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98088_spk_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +);static const struct snd_kcontrol_new max98088_snd_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 15/42 ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98090.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-)
sound/soc/codecs/max98090.c +18 -24
@@ -360,22 +360,20 @@ static int max98090_reset(struct max98090_priv *max98090)return ret; } -static const unsigned int max98090_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_micboost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98090_mic_tlv, 0, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_line_single_ended_tlv, -600, 600, 0); -static const unsigned int max98090_line_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_line_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-600 ,300 ,0 ), -4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ), -}; +4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98090_avg_tlv, 0, 600, 0); static const DECLARE_TLV_DB_SCALE(max98090_av_tlv, -1200, 100, 0);
@@ -391,38 +389,34 @@ static const DECLARE_TLV_DB_SCALE(max98090_alccomp_tlv, -3100, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_drcexp_tlv, -6600, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_sdg_tlv, 50, 200, 0); -static const unsigned int max98090_mixout_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_mixout_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-1200 ,250 ,0 ), -2 ,3 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ), -}; +2 ,3 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ) +); -static const unsigned int max98090_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98090_spk_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_spk_tlv,0 ,4 ,TLV_DB_SCALE_ITEM (-4800 ,400 ,0 ),5 ,10 ,TLV_DB_SCALE_ITEM (-2900 ,300 ,0 ),11 ,14 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),15 ,29 ,TLV_DB_SCALE_ITEM (-500 ,100 ,0 ), -30 ,39 ,TLV_DB_SCALE_ITEM (950 ,50 ,0 ), -}; +30 ,39 ,TLV_DB_SCALE_ITEM (950 ,50 ,0 ) +); -static const unsigned int max98090_rcv_lout_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_rcv_lout_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +);static int max98090_get_enab_tlv (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
8896bc3e089b39d077c7afbf785166aac28e5151Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:43 +0200
Subject: [PATCH] ASoC: max98090: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98090.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-)
sound/soc/codecs/max98090.c +18 -24
@@ -360,22 +360,20 @@ static int max98090_reset(struct max98090_priv *max98090)return ret; } -static const unsigned int max98090_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_micboost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98090_mic_tlv, 0, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_line_single_ended_tlv, -600, 600, 0); -static const unsigned int max98090_line_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_line_tlv,0 ,3 ,TLV_DB_SCALE_ITEM (-600 ,300 ,0 ), -4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ), -}; +4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98090_avg_tlv, 0, 600, 0); static const DECLARE_TLV_DB_SCALE(max98090_av_tlv, -1200, 100, 0);
@@ -391,38 +389,34 @@ static const DECLARE_TLV_DB_SCALE(max98090_alccomp_tlv, -3100, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_drcexp_tlv, -6600, 100, 0); static const DECLARE_TLV_DB_SCALE(max98090_sdg_tlv, 50, 200, 0); -static const unsigned int max98090_mixout_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98090_mixout_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-1200 ,250 ,0 ), -2 ,3 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ), -}; +2 ,3 ,TLV_DB_SCALE_ITEM (-600 ,600 ,0 ) +); -static const unsigned int max98090_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98090_spk_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_spk_tlv,0 ,4 ,TLV_DB_SCALE_ITEM (-4800 ,400 ,0 ),5 ,10 ,TLV_DB_SCALE_ITEM (-2900 ,300 ,0 ),11 ,14 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),15 ,29 ,TLV_DB_SCALE_ITEM (-500 ,100 ,0 ), -30 ,39 ,TLV_DB_SCALE_ITEM (950 ,50 ,0 ), -}; +30 ,39 ,TLV_DB_SCALE_ITEM (950 ,50 ,0 ) +); -static const unsigned int max98090_rcv_lout_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98090_rcv_lout_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +);static int max98090_get_enab_tlv (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 16/42 ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98095.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-)
sound/soc/codecs/max98095.c +15 -20
@@ -661,48 +661,43 @@ static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int max98095_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98095_micboost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98095_mic_tlv, 0, 100, 0); static const DECLARE_TLV_DB_SCALE(max98095_adc_tlv, -1200, 100, 0); static const DECLARE_TLV_DB_SCALE(max98095_adcboost_tlv, 0, 600, 0); -static const unsigned int max98095_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98095_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98095_spk_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max98095_spk_tlv,0 ,10 ,TLV_DB_SCALE_ITEM (-5900 ,400 ,0 ),11 ,18 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),19 ,27 ,TLV_DB_SCALE_ITEM (-200 ,100 ,0 ), -28 ,39 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,39 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +); -static const unsigned int max98095_rcv_lout_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98095_rcv_lout_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +); -static const unsigned int max98095_lin_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(max98095_lin_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-600 ,300 ,0 ),3 ,3 ,TLV_DB_SCALE_ITEM (300 ,1100 ,0 ), -4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ), -}; +4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ) +);static const struct snd_kcontrol_new max98095_snd_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
54c2011f5a7c31ec4e2ddb8694b559e29673941eMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:44 +0200
Subject: [PATCH] ASoC: max98095: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max98095.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-)
sound/soc/codecs/max98095.c +15 -20
@@ -661,48 +661,43 @@ static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol,return 0 ; } -static const unsigned int max98095_micboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max98095_micboost_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,2000 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(max98095_mic_tlv, 0, 100, 0); static const DECLARE_TLV_DB_SCALE(max98095_adc_tlv, -1200, 100, 0); static const DECLARE_TLV_DB_SCALE(max98095_adcboost_tlv, 0, 600, 0); -static const unsigned int max98095_hp_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98095_hp_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6700 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-4000 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (-400 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (150 ,50 ,0 ) +); -static const unsigned int max98095_spk_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max98095_spk_tlv,0 ,10 ,TLV_DB_SCALE_ITEM (-5900 ,400 ,0 ),11 ,18 ,TLV_DB_SCALE_ITEM (-1700 ,200 ,0 ),19 ,27 ,TLV_DB_SCALE_ITEM (-200 ,100 ,0 ), -28 ,39 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,39 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +); -static const unsigned int max98095_rcv_lout_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(max98095_rcv_lout_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (-6200 ,400 ,0 ),7 ,14 ,TLV_DB_SCALE_ITEM (-3500 ,300 ,0 ),15 ,21 ,TLV_DB_SCALE_ITEM (-1200 ,200 ,0 ),22 ,27 ,TLV_DB_SCALE_ITEM (100 ,100 ,0 ), -28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ), -}; +28 ,31 ,TLV_DB_SCALE_ITEM (650 ,50 ,0 ) +); -static const unsigned int max98095_lin_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(max98095_lin_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (-600 ,300 ,0 ),3 ,3 ,TLV_DB_SCALE_ITEM (300 ,1100 ,0 ), -4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ), -}; +4 ,5 ,TLV_DB_SCALE_ITEM (1400 ,600 ,0 ) +);static const struct snd_kcontrol_new max98095_snd_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 17/42 ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9850.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/max9850.c +3 -4
@@ -67,13 +67,12 @@ static const struct regmap_config max9850_regmap = { .cache_type = REGCACHE_RBTREE, }; -static const unsigned int max9850_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max9850_tlv,0x18 ,0x1f ,TLV_DB_SCALE_ITEM (-7450 ,400 ,0 ),0x20 ,0x33 ,TLV_DB_SCALE_ITEM (-4150 ,200 ,0 ),0x34 ,0x37 ,TLV_DB_SCALE_ITEM (-150 ,100 ,0 ), -0x38 ,0x3f ,TLV_DB_SCALE_ITEM (250 ,50 ,0 ), -}; +0x38 ,0x3f ,TLV_DB_SCALE_ITEM (250 ,50 ,0 ) +);static const struct snd_kcontrol_new max9850_controls[] = {SOC_SINGLE_TLV ("Headphone Volume" ,MAX9850_VOLUME ,0 ,0x3f ,1 , max9850_tlv),
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
e0340985999fbee1a51bd4653d90ca19a8a7acdcMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:45 +0200
Subject: [PATCH] ASoC: max9850: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9850.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/max9850.c +3 -4
@@ -67,13 +67,12 @@ static const struct regmap_config max9850_regmap = { .cache_type = REGCACHE_RBTREE, }; -static const unsigned int max9850_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max9850_tlv,0x18 ,0x1f ,TLV_DB_SCALE_ITEM (-7450 ,400 ,0 ),0x20 ,0x33 ,TLV_DB_SCALE_ITEM (-4150 ,200 ,0 ),0x34 ,0x37 ,TLV_DB_SCALE_ITEM (-150 ,100 ,0 ), -0x38 ,0x3f ,TLV_DB_SCALE_ITEM (250 ,50 ,0 ), -}; +0x38 ,0x3f ,TLV_DB_SCALE_ITEM (250 ,50 ,0 ) +);static const struct snd_kcontrol_new max9850_controls[] = {SOC_SINGLE_TLV ("Headphone Volume" ,MAX9850_VOLUME ,0 ,0x3f ,1 , max9850_tlv),
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 18/42 ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9877.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/max9877.c +6 -8
@@ -28,19 +28,17 @@ static const struct reg_default max9877_regs[] = { { 4, 0x49 }, }; -static const unsigned int max9877_pgain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max9877_pgain_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,900 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ) +); -static const unsigned int max9877_output_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max9877_output_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7900 ,400 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-4700 ,300 ,0 ),16 ,23 ,TLV_DB_SCALE_ITEM (-2300 ,200 ,0 ), -24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ), -}; +24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ) +);static const char *max9877_out_mode[] = { "INA -> SPK",
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
d6e3bb7aca7fbd092f1a19991526c095e59f8531Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:46 +0200
Subject: [PATCH] ASoC: max9877: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/max9877.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/max9877.c +6 -8
@@ -30,19 +30,17 @@ static struct reg_default max9877_regs[] = { { 4, 0x49 }, }; -static const unsigned int max9877_pgain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(max9877_pgain_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,900 ,0 ), -2 ,2 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ), -}; +2 ,2 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ) +); -static const unsigned int max9877_output_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(max9877_output_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7900 ,400 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-4700 ,300 ,0 ),16 ,23 ,TLV_DB_SCALE_ITEM (-2300 ,200 ,0 ), -24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ), -}; +24 ,31 ,TLV_DB_SCALE_ITEM (-700 ,100 ,0 ) +);static const char *max9877_out_mode[] = { "INA -> SPK",
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 19/42 ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5631.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5631.c +3 -4
@@ -174,16 +174,15 @@ static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0); static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52}dB */ -static unsigned int mic_bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(mic_bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static int rt5631_dmic_get (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
7f708abeac7d12f00b200848aa0cafe589ea8454Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:47 +0200
Subject: [PATCH] ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5631.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5631.c +3 -4
@@ -174,16 +174,15 @@ static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0); static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52}dB */ -static unsigned int mic_bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(mic_bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static int rt5631_dmic_get (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 20/42 ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5640.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5640.c +3 -4
@@ -347,16 +347,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5640_data_select[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
8295822dac5d78e62beb6a13bbb2d82e36ba763cMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:48 +0200
Subject: [PATCH] ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5640.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5640.c +3 -4
@@ -347,16 +347,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5640_data_select[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 21/42 ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5645.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5645.c +3 -4
@@ -457,16 +457,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static const struct snd_kcontrol_new rt5645_snd_controls[] = {/* Speaker Output Volume */
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
6d698a83fa768be38780d54fc6c244c99cf7684dMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:49 +0200
Subject: [PATCH] ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5645.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5645.c +3 -4
@@ -424,16 +424,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static const struct snd_kcontrol_new rt5645_snd_controls[] = {/* Speaker Output Volume */
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 22/42 ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5651.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5651.c +3 -4
@@ -292,16 +292,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5651_data_select[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
8e3648e10fd832e4e07bc3c0cf0e37f95de60082Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:50 +0200
Subject: [PATCH] ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5651.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5651.c +3 -4
@@ -292,16 +292,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5651_data_select[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 23/42 ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5670.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5670.c +3 -4
@@ -592,16 +592,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5670_data_select[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
dea6d32e9efea0a75b5fb367fd53fa0562154852Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:51 +0200
Subject: [PATCH] ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5670.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5670.c +3 -4
@@ -592,16 +592,15 @@ static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);/* Interface data select */ static const char *const rt5670_data_select[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 24/42 ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5677.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5677.c +3 -4
@@ -788,16 +788,15 @@ static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0); static const DECLARE_TLV_DB_SCALE(st_vol_tlv, -4650, 150, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static int rt5677_dsp_vad_get (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
53f28609b0091c1e450105aaef924320aa748082Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:52 +0200
Subject: [PATCH] ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/rt5677.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5677.c +3 -4
@@ -789,16 +789,15 @@ static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0); static const DECLARE_TLV_DB_SCALE(st_vol_tlv, -4650, 150, 0);/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */ -static unsigned int bst_tlv[] = { -TLV_DB_RANGE_HEAD (7 ), +static const DECLARE_TLV_DB_RANGE(bst_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (2000 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ),3 ,5 ,TLV_DB_SCALE_ITEM (3000 ,500 ,0 ),6 ,6 ,TLV_DB_SCALE_ITEM (4400 ,0 ,0 ),7 ,7 ,TLV_DB_SCALE_ITEM (5000 ,0 ,0 ), -8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ), -}; +8 ,8 ,TLV_DB_SCALE_ITEM (5200 ,0 ,0 ) +);static int rt5677_dsp_vad_get (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 25/42 ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/sgtl5000.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/sgtl5000.c +3 -4
@@ -406,11 +406,10 @@ static int dac_put_volsw(struct snd_kcontrol *kcontrol, static const DECLARE_TLV_DB_SCALE(capture_6db_attenuate, -600, 600, 0);/* tlv for mic gain, 0db 20db 30db 40db */ -static const unsigned int mic_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mic_gain_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ), -}; +1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ) +);/* tlv for hp volume, -51.5db to 12.0db, step .5db */ static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
53eb1ca3caab417f1f686627bbf6bfa7d54cb5a8Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:53 +0200
Subject: [PATCH] ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/sgtl5000.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/sgtl5000.c +3 -4
@@ -406,11 +406,10 @@ static int dac_put_volsw(struct snd_kcontrol *kcontrol, static const DECLARE_TLV_DB_SCALE(capture_6db_attenuate, -600, 600, 0);/* tlv for mic gain, 0db 20db 30db 40db */ -static const unsigned int mic_gain_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mic_gain_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ), -}; +1 ,3 ,TLV_DB_SCALE_ITEM (2000 ,1000 ,0 ) +);/* tlv for hp volume, -51.5db to 12.0db, step .5db */ static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 26/42 ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/ssm2602.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/ssm2602.c +3 -4
@@ -75,11 +75,10 @@ static const struct soc_enum ssm2602_enum[] = { ssm2602_deemph), }; -static const unsigned int ssm260x_outmix_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(ssm260x_outmix_tlv,0 ,47 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,0 ), -48 ,127 ,TLV_DB_SCALE_ITEM (-7400 ,100 ,0 ), -}; +48 ,127 ,TLV_DB_SCALE_ITEM (-7400 ,100 ,0 ) +); static const DECLARE_TLV_DB_SCALE(ssm260x_inpga_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(ssm260x_sidetone_tlv, -1500, 300, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
f9d54802b6339cc3d4bdf30ca3648790064462d2Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:54 +0200
Subject: [PATCH] ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/ssm2602.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/ssm2602.c +3 -4
@@ -75,11 +75,10 @@ static const struct soc_enum ssm2602_enum[] = { ssm2602_deemph), }; -static const unsigned int ssm260x_outmix_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(ssm260x_outmix_tlv,0 ,47 ,TLV_DB_SCALE_ITEM (TLV_DB_GAIN_MUTE ,0 ,0 ), -48 ,127 ,TLV_DB_SCALE_ITEM (-7400 ,100 ,0 ), -}; +48 ,127 ,TLV_DB_SCALE_ITEM (-7400 ,100 ,0 ) +); static const DECLARE_TLV_DB_SCALE(ssm260x_inpga_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(ssm260x_sidetone_tlv, -1500, 300, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 27/42 ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/tpa6130a2.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/tpa6130a2.c +6 -8
@@ -259,8 +259,7 @@ static int tpa6130a2_put_volsw(struct snd_kcontrol *kcontrol,* TPA6130 volume. From -59.5 to 4 dB with increasing step size when going * down in gain. */ -static const unsigned int tpa6130_tlv[] = { -TLV_DB_RANGE_HEAD (10 ), +static const DECLARE_TLV_DB_RANGE(tpa6130_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-5950 ,600 ,0 ),2 ,3 ,TLV_DB_SCALE_ITEM (-5000 ,250 ,0 ), 4, 5, TLV_DB_SCALE_ITEM(-4550, 160, 0),
@@ -270,8 +269,8 @@ static const unsigned int tpa6130_tlv[] = { 12, 13, TLV_DB_SCALE_ITEM(-3040, 180, 0), 14, 20, TLV_DB_SCALE_ITEM(-2710, 110, 0), 21, 37, TLV_DB_SCALE_ITEM(-1960, 74, 0), - 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0), -}; + 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0) +);static const struct snd_kcontrol_new tpa6130a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6130A2 Headphone Playback Volume",
@@ -280,12 +279,11 @@ static const struct snd_kcontrol_new tpa6130a2_controls[] = { tpa6130_tlv), }; -static const unsigned int tpa6140_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(tpa6140_tlv, 0, 8, TLV_DB_SCALE_ITEM(-5900, 400, 0), 9, 16, TLV_DB_SCALE_ITEM(-2500, 200, 0), -17 ,31 ,TLV_DB_SCALE_ITEM (-1000 ,100 ,0 ), -}; + 17, 31, TLV_DB_SCALE_ITEM(-1000, 100, 0) +); static const struct snd_kcontrol_new tpa6140a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6140A2 Headphone Playback Volume",
Signature · 1 line
2.1.4
Re: [PATCH 27/42] ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Quoted 18 lines · Lars-Peter Clausen
DECLARE_TLV_DB_RANGE()has the advantage over usingTLV_DB_RANGE_HEAD()that it automatically calculates the number of items in the TLV and is hence less prone to manual error.Generate using the following coccinelle script
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);
Quoted 1 line
// </smpl>
Quoted 48 lines
Signed-off-by Lars-Peter Clausen <[email protected]>--- sound/soc/codecs/tpa6130a2.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)sound/soc/codecs/tpa6130a2.c +6
-8@@ -259,8 +259,7 @@ static int tpa6130a2_put_volsw(struct snd_kcontrol *kcontrol,* TPA6130 volume. From -59.5 to 4 dB with increasing step size when going * down in gain. */ -static const unsigned int tpa6130_tlv[] = { -TLV_DB_RANGE_HEAD (10 ), +static const DECLARE_TLV_DB_RANGE(tpa6130_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-5950 ,600 ,0 ),2 ,3 ,TLV_DB_SCALE_ITEM (-5000 ,250 ,0 ), 4, 5, TLV_DB_SCALE_ITEM(-4550, 160, 0),@@ -270,8 +269,8 @@ static const unsigned int tpa6130_tlv[] = { 12, 13, TLV_DB_SCALE_ITEM(-3040, 180, 0), 14, 20, TLV_DB_SCALE_ITEM(-2710, 110, 0), 21, 37, TLV_DB_SCALE_ITEM(-1960, 74, 0), - 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0), -}; + 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0) +);static const struct snd_kcontrol_new tpa6130a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6130A2 Headphone Playback Volume",@@ -280,12 +279,11 @@ static const struct snd_kcontrol_new tpa6130a2_controls[] = { tpa6130_tlv), }; -static const unsigned int tpa6140_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(tpa6140_tlv, 0, 8, TLV_DB_SCALE_ITEM(-5900, 400, 0), 9, 16, TLV_DB_SCALE_ITEM(-2500, 200, 0), -17 ,31 ,TLV_DB_SCALE_ITEM (-1000 ,100 ,0 ), -}; + 17, 31, TLV_DB_SCALE_ITEM(-1000, 100, 0) +); static const struct snd_kcontrol_new tpa6140a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6140A2 Headphone Playback Volume",
Signature · 1 line
Péter
Mark Brown
maintainerApplied "ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
In reply to Lars-Peter ClausenThe patch
ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
4e0e5f8084cf9766ea70234f90271e03fd8aa56dMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:55 +0200
Subject: [PATCH] ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/tpa6130a2.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/tpa6130a2.c +6 -8
@@ -259,8 +259,7 @@ static int tpa6130a2_put_volsw(struct snd_kcontrol *kcontrol,* TPA6130 volume. From -59.5 to 4 dB with increasing step size when going * down in gain. */ -static const unsigned int tpa6130_tlv[] = { -TLV_DB_RANGE_HEAD (10 ), +static const DECLARE_TLV_DB_RANGE(tpa6130_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-5950 ,600 ,0 ),2 ,3 ,TLV_DB_SCALE_ITEM (-5000 ,250 ,0 ), 4, 5, TLV_DB_SCALE_ITEM(-4550, 160, 0),
@@ -270,8 +269,8 @@ static const unsigned int tpa6130_tlv[] = { 12, 13, TLV_DB_SCALE_ITEM(-3040, 180, 0), 14, 20, TLV_DB_SCALE_ITEM(-2710, 110, 0), 21, 37, TLV_DB_SCALE_ITEM(-1960, 74, 0), - 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0), -}; + 38, 63, TLV_DB_SCALE_ITEM(-720, 45, 0) +);static const struct snd_kcontrol_new tpa6130a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6130A2 Headphone Playback Volume",
@@ -280,12 +279,11 @@ static const struct snd_kcontrol_new tpa6130a2_controls[] = { tpa6130_tlv), }; -static const unsigned int tpa6140_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(tpa6140_tlv, 0, 8, TLV_DB_SCALE_ITEM(-5900, 400, 0), 9, 16, TLV_DB_SCALE_ITEM(-2500, 200, 0), -17 ,31 ,TLV_DB_SCALE_ITEM (-1000 ,100 ,0 ), -}; + 17, 31, TLV_DB_SCALE_ITEM(-1000, 100, 0) +); static const struct snd_kcontrol_new tpa6140a2_controls[] = { SOC_SINGLE_EXT_TLV("TPA6140A2 Headphone Playback Volume",
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 28/42 ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/twl4030.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/twl4030.c +3 -4
@@ -524,12 +524,11 @@ static const struct snd_kcontrol_new twl4030_dapm_abypassv_control =SOC_DAPM_SINGLE ("Switch" ,TWL4030_REG_VDL_APGA_CTL ,2 ,1 ,0 );/* Digital bypass gain, mute instead of -30dB */ -static const unsigned int twl4030_dapm_dbypass_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(twl4030_dapm_dbypass_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,1 ),2 ,3 ,TLV_DB_SCALE_ITEM (-2400 ,0 ,0 ), -4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ), -}; +4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ) +);/* Digital bypass left (TX1L -> RX2L) */ static const struct snd_kcontrol_new twl4030_dapm_dbypassl_control =
Signature · 1 line
2.1.4
Re: [PATCH 28/42] ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
Quoted 18 lines · Lars-Peter Clausen
DECLARE_TLV_DB_RANGE()has the advantage over usingTLV_DB_RANGE_HEAD()that it automatically calculates the number of items in the TLV and is hence less prone to manual error.Generate using the following coccinelle script
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);
Quoted 1 line
// </smpl>
Quoted 26 lines
Signed-off-by Lars-Peter Clausen <[email protected]>--- sound/soc/codecs/twl4030.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)sound/soc/codecs/twl4030.c +3
-4@@ -524,12 +524,11 @@ static const struct snd_kcontrol_new twl4030_dapm_abypassv_control =SOC_DAPM_SINGLE ("Switch" ,TWL4030_REG_VDL_APGA_CTL ,2 ,1 ,0 );/* Digital bypass gain, mute instead of -30dB */ -static const unsigned int twl4030_dapm_dbypass_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(twl4030_dapm_dbypass_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,1 ),2 ,3 ,TLV_DB_SCALE_ITEM (-2400 ,0 ,0 ), -4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ), -}; +4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ) +);/* Digital bypass left (TX1L -> RX2L) */ static const struct snd_kcontrol_new twl4030_dapm_dbypassl_control =
Signature · 1 line
Péter
Mark Brown
maintainerApplied "ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
In reply to Lars-Peter ClausenThe patch
ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2524911e300771954698f384bd7f44543b2af2deMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:56 +0200
Subject: [PATCH] ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/twl4030.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/twl4030.c +3 -4
@@ -524,12 +524,11 @@ static const struct snd_kcontrol_new twl4030_dapm_abypassv_control =SOC_DAPM_SINGLE ("Switch" ,TWL4030_REG_VDL_APGA_CTL ,2 ,1 ,0 );/* Digital bypass gain, mute instead of -30dB */ -static const unsigned int twl4030_dapm_dbypass_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(twl4030_dapm_dbypass_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (-3000 ,600 ,1 ),2 ,3 ,TLV_DB_SCALE_ITEM (-2400 ,0 ,0 ), -4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ), -}; +4 ,7 ,TLV_DB_SCALE_ITEM (-1800 ,600 ,0 ) +);/* Digital bypass left (TX1L -> RX2L) */ static const struct snd_kcontrol_new twl4030_dapm_dbypassl_control =
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 29/42 ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/uda1380.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/uda1380.c +6 -8
@@ -269,12 +269,11 @@ static DECLARE_TLV_DB_SCALE(amix_tlv, -4950, 150, 1);* from -66 dB in 0.5 dB steps (2 dB steps, really) and * from -52 dB in 0.25 dB steps */ -static const unsigned int mvol_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(mvol_tlv,0 ,15 ,TLV_DB_SCALE_ITEM (-8200 ,100 ,1 ),16 ,43 ,TLV_DB_SCALE_ITEM (-6600 ,50 ,0 ), -44 ,252 ,TLV_DB_SCALE_ITEM (-5200 ,25 ,0 ), -}; +44 ,252 ,TLV_DB_SCALE_ITEM (-5200 ,25 ,0 ) +);/* * from -72 dB in 1.5 dB steps (6 dB steps really),
@@ -282,13 +281,12 @@ static const unsigned int mvol_tlv[] = {* from -60 dB in 0.5 dB steps (2 dB steps really) and * from -46 dB in 0.25 dB steps */ -static const unsigned int vc_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(vc_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7800 ,150 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-6600 ,75 ,0 ),16 ,43 ,TLV_DB_SCALE_ITEM (-6000 ,50 ,0 ), -44 ,228 ,TLV_DB_SCALE_ITEM (-4600 ,25 ,0 ), -}; +44 ,228 ,TLV_DB_SCALE_ITEM (-4600 ,25 ,0 ) +);/* from 0 to 6 dB in 2 dB steps if SPF mode != flat */ static DECLARE_TLV_DB_SCALE(tr_tlv, 0, 200, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5ee0b8f8296f237604f0ff72f03e7836f5e164b4Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:57 +0200
Subject: [PATCH] ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/uda1380.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/uda1380.c +6 -8
@@ -269,12 +269,11 @@ static DECLARE_TLV_DB_SCALE(amix_tlv, -4950, 150, 1);* from -66 dB in 0.5 dB steps (2 dB steps, really) and * from -52 dB in 0.25 dB steps */ -static const unsigned int mvol_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(mvol_tlv,0 ,15 ,TLV_DB_SCALE_ITEM (-8200 ,100 ,1 ),16 ,43 ,TLV_DB_SCALE_ITEM (-6600 ,50 ,0 ), -44 ,252 ,TLV_DB_SCALE_ITEM (-5200 ,25 ,0 ), -}; +44 ,252 ,TLV_DB_SCALE_ITEM (-5200 ,25 ,0 ) +);/* * from -72 dB in 1.5 dB steps (6 dB steps really),
@@ -282,13 +281,12 @@ static const unsigned int mvol_tlv[] = {* from -60 dB in 0.5 dB steps (2 dB steps really) and * from -46 dB in 0.25 dB steps */ -static const unsigned int vc_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(vc_tlv,0 ,7 ,TLV_DB_SCALE_ITEM (-7800 ,150 ,1 ),8 ,15 ,TLV_DB_SCALE_ITEM (-6600 ,75 ,0 ),16 ,43 ,TLV_DB_SCALE_ITEM (-6000 ,50 ,0 ), -44 ,228 ,TLV_DB_SCALE_ITEM (-4600 ,25 ,0 ), -}; +44 ,228 ,TLV_DB_SCALE_ITEM (-4600 ,25 ,0 ) +);/* from 0 to 6 dB in 2 dB steps if SPF mode != flat */ static DECLARE_TLV_DB_SCALE(tr_tlv, 0, 200, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 30/42 ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8350.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8350.c +3 -4
@@ -394,11 +394,10 @@ static DECLARE_TLV_DB_SCALE(dac_pcm_tlv, -7163, 36, 1); static DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -12700, 50, 1); static DECLARE_TLV_DB_SCALE(out_mix_tlv, -1500, 300, 1); -static const unsigned int capture_sd_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(capture_sd_tlv,0 ,12 ,TLV_DB_SCALE_ITEM (-3600 ,300 ,1 ), -13 ,15 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -}; +13 ,15 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ) +);static const struct snd_kcontrol_new wm8350_snd_controls[] = {SOC_ENUM ("Playback Deemphasis" , wm8350_enum[0 ]),
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
d3d383ba8b49fbb2024851442e09a104b1f030feMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:58 +0200
Subject: [PATCH] ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8350.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8350.c +3 -4
@@ -394,11 +394,10 @@ static DECLARE_TLV_DB_SCALE(dac_pcm_tlv, -7163, 36, 1); static DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -12700, 50, 1); static DECLARE_TLV_DB_SCALE(out_mix_tlv, -1500, 300, 1); -static const unsigned int capture_sd_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(capture_sd_tlv,0 ,12 ,TLV_DB_SCALE_ITEM (-3600 ,300 ,1 ), -13 ,15 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -}; +13 ,15 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ) +);static const struct snd_kcontrol_new wm8350_snd_controls[] = {SOC_ENUM ("Playback Deemphasis" , wm8350_enum[0 ]),
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 31/42 ASoC: wm8400: Don't use range container for TLV with one entry
In reply to Lars-Peter ClausenFor TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().
--- sound/soc/codecs/wm8400.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/wm8400.c +1 -4
@@ -370,10 +370,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,600 ,0 ), -}; +static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8400_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8400: Don't use range container for TLV with one entry" to the asoc tree
The patch
ASoC: wm8400: Don't use range container for TLV with one entry
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
0b65e6c7e22c93139b2b4efdd7ba6bd7bfa27fa7Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:19:59 +0200
Subject: [PATCH] ASoC: wm8400: Don't use range container for TLV with one
entry
For TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().
--- sound/soc/codecs/wm8400.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/wm8400.c +1 -4
@@ -370,10 +370,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,600 ,0 ), -}; +static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8400_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 32/42 ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8737.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8737.c +3 -4
@@ -79,13 +79,12 @@ static int wm8737_reset(struct snd_soc_codec *codec)return snd_soc_write (codec,WM8737_RESET ,0 ); } -static const unsigned int micboost_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(micboost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (1300 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (1800 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2800 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3300 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3300 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(pga_tlv, -9750, 50, 1); static const DECLARE_TLV_DB_SCALE(adc_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(ng_tlv, -7800, 600, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
7d711f63e36737968dcda5ce28fed3fb3e12fbdcMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:00 +0200
Subject: [PATCH] ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8737.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8737.c +3 -4
@@ -79,13 +79,12 @@ static int wm8737_reset(struct snd_soc_codec *codec)return snd_soc_write (codec,WM8737_RESET ,0 ); } -static const unsigned int micboost_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(micboost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (1300 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (1800 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2800 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3300 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3300 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(pga_tlv, -9750, 50, 1); static const DECLARE_TLV_DB_SCALE(adc_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(ng_tlv, -7800, 600, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 33/42 ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8753.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8753.c +3 -4
@@ -276,12 +276,11 @@ static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(mic_preamp_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1); static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1); -static const unsigned int out_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(out_tlv,/* 0000000 - 0101111 = "Analogue mute" */ 0 ,48 ,TLV_DB_SCALE_ITEM (-25500 ,0 ,0 ), -48 ,127 ,TLV_DB_SCALE_ITEM (-7300 ,100 ,0 ), -}; +48 ,127 ,TLV_DB_SCALE_ITEM (-7300 ,100 ,0 ) +); static const DECLARE_TLV_DB_SCALE(mix_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(voice_mix_tlv, -1200, 300, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
11c3727c4e625c248ff3b546290aade1399affecMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:01 +0200
Subject: [PATCH] ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8753.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8753.c +3 -4
@@ -276,12 +276,11 @@ static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(mic_preamp_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1); static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1); -static const unsigned int out_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(out_tlv,/* 0000000 - 0101111 = "Analogue mute" */ 0 ,48 ,TLV_DB_SCALE_ITEM (-25500 ,0 ,0 ), -48 ,127 ,TLV_DB_SCALE_ITEM (-7300 ,100 ,0 ), -}; +48 ,127 ,TLV_DB_SCALE_ITEM (-7300 ,100 ,0 ) +); static const DECLARE_TLV_DB_SCALE(mix_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(voice_mix_tlv, -1200, 300, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 34/42 ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8961.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8961.c +3 -4
@@ -331,13 +331,12 @@ static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); static const DECLARE_TLV_DB_SCALE(hp_sec_tlv, -700, 100, 0); static const DECLARE_TLV_DB_SCALE(adc_tlv, -7200, 75, 1); static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 300, 0); -static unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (13 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (20 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (29 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (29 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(pga_tlv, -2325, 75, 0);static const struct snd_kcontrol_new wm8961_snd_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5d272d89339a4f8c1905d5bdf5851346582b78f2Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:02 +0200
Subject: [PATCH] ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8961.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8961.c +3 -4
@@ -331,13 +331,12 @@ static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); static const DECLARE_TLV_DB_SCALE(hp_sec_tlv, -700, 100, 0); static const DECLARE_TLV_DB_SCALE(adc_tlv, -7200, 75, 1); static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 300, 0); -static unsigned int boost_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(boost_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (13 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (20 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (29 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (29 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(pga_tlv, -2325, 75, 0);static const struct snd_kcontrol_new wm8961_snd_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 35/42 ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8962.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/wm8962.c +6 -8
@@ -1456,14 +1456,13 @@ static int wm8962_reset(struct wm8962_priv *wm8962) static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0); static const DECLARE_TLV_DB_SCALE(mixin_tlv, -1500, 300, 0); -static const unsigned int mixinpga_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(mixinpga_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (1300 ,1300 ,0 ),3 ,4 ,TLV_DB_SCALE_ITEM (1800 ,200 ,0 ),5 ,5 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ), -6 ,7 ,TLV_DB_SCALE_ITEM (2700 ,300 ,0 ), -}; +6 ,7 ,TLV_DB_SCALE_ITEM (2700 ,300 ,0 ) +); static const DECLARE_TLV_DB_SCALE(beep_tlv, -9600, 600, 1); static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1); static const DECLARE_TLV_DB_SCALE(st_tlv, -3600, 300, 0);
@@ -1471,11 +1470,10 @@ static const DECLARE_TLV_DB_SCALE(inmix_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); static const DECLARE_TLV_DB_SCALE(hp_tlv, -700, 100, 0); -static const unsigned int classd_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(classd_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (0 ,150 ,0 ), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; +7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);static int wm8962_dsp2_write_config (struct snd_soc_codec *codec)
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
fcbb71e9ccac59940b619bdd5a51c96495dd4731Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:03 +0200
Subject: [PATCH] ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8962.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
sound/soc/codecs/wm8962.c +6 -8
@@ -1456,14 +1456,13 @@ static int wm8962_reset(struct wm8962_priv *wm8962) static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0); static const DECLARE_TLV_DB_SCALE(mixin_tlv, -1500, 300, 0); -static const unsigned int mixinpga_tlv[] = { -TLV_DB_RANGE_HEAD (5 ), +static const DECLARE_TLV_DB_RANGE(mixinpga_tlv,0 ,1 ,TLV_DB_SCALE_ITEM (0 ,600 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (1300 ,1300 ,0 ),3 ,4 ,TLV_DB_SCALE_ITEM (1800 ,200 ,0 ),5 ,5 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ), -6 ,7 ,TLV_DB_SCALE_ITEM (2700 ,300 ,0 ), -}; +6 ,7 ,TLV_DB_SCALE_ITEM (2700 ,300 ,0 ) +); static const DECLARE_TLV_DB_SCALE(beep_tlv, -9600, 600, 1); static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1); static const DECLARE_TLV_DB_SCALE(st_tlv, -3600, 300, 0);
@@ -1471,11 +1470,10 @@ static const DECLARE_TLV_DB_SCALE(inmix_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0); static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); static const DECLARE_TLV_DB_SCALE(hp_tlv, -700, 100, 0); -static const unsigned int classd_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(classd_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (0 ,150 ,0 ), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; +7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);static int wm8962_dsp2_write_config (struct snd_soc_codec *codec)
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 36/42 ASoC: wm8990: Don't use range container for TLV with one entry
In reply to Lars-Peter ClausenFor TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().
--- sound/soc/codecs/wm8990.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/wm8990.c +1 -4
@@ -418,10 +418,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,600 ,0 ), -}; +static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8990_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8990: Don't use range container for TLV with one entry" to the asoc tree
The patch
ASoC: wm8990: Don't use range container for TLV with one entry
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
dfd0edda1fb3cd7a7cdde56467d718b1e49e32d5Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:04 +0200
Subject: [PATCH] ASoC: wm8990: Don't use range container for TLV with one
entry
For TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().
--- sound/soc/codecs/wm8990.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/wm8990.c +1 -4
@@ -418,10 +418,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_SCALE_ITEM (-1200 ,600 ,0 ), -}; +static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8990_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 37/42 ASoC: wm8991: Don't use range container for TLVs with one entry
In reply to Lars-Peter ClausenFor TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_LINEAR() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_LINEAR_ITEM().
--- sound/soc/codecs/wm8991.c | 52 ++++++++--------------------------------------- 1 file changed, 9 insertions(+), 43 deletions(-)
sound/soc/codecs/wm8991.c +9 -43
@@ -111,45 +111,14 @@ static bool wm8991_volatile(struct device *dev, unsigned int reg) } } -static const unsigned int rec_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-1500 ,600 ), -}; - -static const unsigned int in_pga_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,0x1F ,TLV_DB_LINEAR_ITEM (-1650 ,3000 ), -}; - -static const unsigned int out_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (0 ,-2100 ), -}; - -static const unsigned int out_pga_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,127 ,TLV_DB_LINEAR_ITEM (-7300 ,600 ), -}; - -static const unsigned int out_omix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-600 ,0 ), -}; - -static const unsigned int out_dac_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,255 ,TLV_DB_LINEAR_ITEM (-7163 ,0 ), -}; - -static const unsigned int in_adc_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,255 ,TLV_DB_LINEAR_ITEM (-7163 ,1763 ), -}; - -static const unsigned int out_sidetone_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,31 ,TLV_DB_LINEAR_ITEM (-3600 ,0 ), -}; +static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600); +static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000); +static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, 0, -2100); +static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600); +static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0); +static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0); +static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763); +static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0);static int wm899x_outpga_put_volsw_vu (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
@@ -429,10 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-1200 ,600 ), -}; +static const DECLARE_TLV_DB_LINEAR(in_mix_tlv, -1200, 600);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8991_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8991: Don't use range container for TLVs with one entry" to the asoc tree
The patch
ASoC: wm8991: Don't use range container for TLVs with one entry
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
00769dbe3982c76dd68dac1d3f54328fa935bd21Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:05 +0200
Subject: [PATCH] ASoC: wm8991: Don't use range container for TLVs with one
entry
For TLVs with only a single entry it is not necessary to use a range container. Use DECLARE_TLV_DB_LINEAR() directly instead of a combination of TLV_DB_RANGE_HEAD() and TLV_DB_LINEAR_ITEM().
--- sound/soc/codecs/wm8991.c | 52 ++++++++--------------------------------------- 1 file changed, 9 insertions(+), 43 deletions(-)
sound/soc/codecs/wm8991.c +9 -43
@@ -111,45 +111,14 @@ static bool wm8991_volatile(struct device *dev, unsigned int reg) } } -static const unsigned int rec_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-1500 ,600 ), -}; - -static const unsigned int in_pga_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,0x1F ,TLV_DB_LINEAR_ITEM (-1650 ,3000 ), -}; - -static const unsigned int out_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (0 ,-2100 ), -}; - -static const unsigned int out_pga_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,127 ,TLV_DB_LINEAR_ITEM (-7300 ,600 ), -}; - -static const unsigned int out_omix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-600 ,0 ), -}; - -static const unsigned int out_dac_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,255 ,TLV_DB_LINEAR_ITEM (-7163 ,0 ), -}; - -static const unsigned int in_adc_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,255 ,TLV_DB_LINEAR_ITEM (-7163 ,1763 ), -}; - -static const unsigned int out_sidetone_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,31 ,TLV_DB_LINEAR_ITEM (-3600 ,0 ), -}; +static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600); +static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000); +static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, 0, -2100); +static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600); +static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0); +static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0); +static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763); +static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0);static int wm899x_outpga_put_volsw_vu (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol)
@@ -429,10 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, }/* INMIX dB values */ -static const unsigned int in_mix_tlv[] = { -TLV_DB_RANGE_HEAD (1 ), -0 ,7 ,TLV_DB_LINEAR_ITEM (-1200 ,600 ), -}; +static const DECLARE_TLV_DB_LINEAR(in_mix_tlv, -1200, 600);/* Left In PGA Connections */ static const struct snd_kcontrol_new wm8991_dapm_lin12_pga_controls[] = {
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 38/42 ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8993.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8993.c +3 -4
@@ -628,11 +628,10 @@ static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 300, 0); static const DECLARE_TLV_DB_SCALE(drc_comp_threash, -4500, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_comp_amp, -2250, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_min_tlv, -1800, 600, 0); -static const unsigned int drc_max_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(drc_max_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (1200 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(drc_qr_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(drc_startup_tlv, -1800, 300, 0); static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
f1022087d372b02c8ffe5e1e084a3de763bea16bMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:06 +0200
Subject: [PATCH] ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm8993.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8993.c +3 -4
@@ -628,11 +628,10 @@ static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 300, 0); static const DECLARE_TLV_DB_SCALE(drc_comp_threash, -4500, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_comp_amp, -2250, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_min_tlv, -1800, 600, 0); -static const unsigned int drc_max_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(drc_max_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (1200 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(drc_qr_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(drc_startup_tlv, -1800, 300, 0); static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 39/42 ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9081.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm9081.c +3 -4
@@ -243,13 +243,12 @@ static int wm9081_reset(struct regmap *map) static const DECLARE_TLV_DB_SCALE(drc_in_tlv, -4500, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_out_tlv, -2250, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_min_tlv, -1800, 600, 0); -static unsigned int drc_max_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(drc_max_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (1800 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(drc_qr_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(drc_startup_tlv, -300, 50, 0);
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5d9a5e609bd026294c0d5c02372303cb969c9d98Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:07 +0200
Subject: [PATCH] ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9081.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm9081.c +3 -4
@@ -243,13 +243,12 @@ static int wm9081_reset(struct regmap *map) static const DECLARE_TLV_DB_SCALE(drc_in_tlv, -4500, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_out_tlv, -2250, 75, 0); static const DECLARE_TLV_DB_SCALE(drc_min_tlv, -1800, 600, 0); -static unsigned int drc_max_tlv[] = { -TLV_DB_RANGE_HEAD (4 ), +static const DECLARE_TLV_DB_RANGE(drc_max_tlv,0 ,0 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ),1 ,1 ,TLV_DB_SCALE_ITEM (1800 ,0 ,0 ),2 ,2 ,TLV_DB_SCALE_ITEM (2400 ,0 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3600 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(drc_qr_tlv, 1200, 600, 0); static const DECLARE_TLV_DB_SCALE(drc_startup_tlv, -300, 50, 0);
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 40/42 ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9090.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/wm9090.c +9 -12
@@ -162,23 +162,20 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec)dev_err (codec->dev,"Timed out waiting for DC Servo\n" ); } -static const unsigned int in_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(in_tlv, 0, 0, TLV_DB_SCALE_ITEM(-600, 0, 0), 1, 3, TLV_DB_SCALE_ITEM(-350, 350, 0), -4 ,6 ,TLV_DB_SCALE_ITEM (600 ,600 ,0 ), -}; -static const unsigned int mix_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), + 4, 6, TLV_DB_SCALE_ITEM(600, 600, 0) +); +static const DECLARE_TLV_DB_RANGE(mix_tlv, 0, 2, TLV_DB_SCALE_ITEM(-1200, 300, 0), -3 ,3 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -}; + 3, 3, TLV_DB_SCALE_ITEM(0, 0, 0) +); static const DECLARE_TLV_DB_SCALE(out_tlv, -5700, 100, 0); -static const unsigned int spkboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(spkboost_tlv, 0, 6, TLV_DB_SCALE_ITEM(0, 150, 0), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; + 7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0) +);static const struct snd_kcontrol_new wm9090_controls[] = { SOC_SINGLE_TLV("IN1A Volume", WM9090_IN1_LINE_INPUT_A_VOLUME, 0, 6, 0,
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
0894e2b3cddaf00a52302d0eb83edb717c6fb913Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:08 +0200
Subject: [PATCH] ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9090.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/codecs/wm9090.c +9 -12
@@ -162,23 +162,20 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec)dev_err (codec->dev,"Timed out waiting for DC Servo\n" ); } -static const unsigned int in_tlv[] = { -TLV_DB_RANGE_HEAD (3 ), +static const DECLARE_TLV_DB_RANGE(in_tlv, 0, 0, TLV_DB_SCALE_ITEM(-600, 0, 0), 1, 3, TLV_DB_SCALE_ITEM(-350, 350, 0), -4 ,6 ,TLV_DB_SCALE_ITEM (600 ,600 ,0 ), -}; -static const unsigned int mix_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), + 4, 6, TLV_DB_SCALE_ITEM(600, 600, 0) +); +static const DECLARE_TLV_DB_RANGE(mix_tlv, 0, 2, TLV_DB_SCALE_ITEM(-1200, 300, 0), -3 ,3 ,TLV_DB_SCALE_ITEM (0 ,0 ,0 ), -}; + 3, 3, TLV_DB_SCALE_ITEM(0, 0, 0) +); static const DECLARE_TLV_DB_SCALE(out_tlv, -5700, 100, 0); -static const unsigned int spkboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(spkboost_tlv, 0, 6, TLV_DB_SCALE_ITEM(0, 150, 0), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; + 7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0) +);static const struct snd_kcontrol_new wm9090_controls[] = { SOC_SINGLE_TLV("IN1A Volume", WM9090_IN1_LINE_INPUT_A_VOLUME, 0, 6, 0,
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 41/42 ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9713.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm9713.c +3 -4
@@ -119,11 +119,10 @@ SOC_ENUM_SINGLE_VIRT(2, wm9713_micb_select), /* mic selection 19 */ static const DECLARE_TLV_DB_SCALE(out_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(misc_tlv, -1500, 300, 0); -static unsigned int mic_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mic_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (1200 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +);static const struct snd_kcontrol_new wm9713_snd_ac97_controls[] = {SOC_DOUBLE_TLV ("Speaker Playback Volume" ,AC97_MASTER ,8 ,0 ,31 ,1 , out_tlv),
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5092e76b8ab406af56b6a24629a7daf30ea94f78Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:09 +0200
Subject: [PATCH] ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm9713.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm9713.c +3 -4
@@ -116,11 +116,10 @@ SOC_ENUM_SINGLE_VIRT(2, wm9713_micb_select), /* mic selection 19 */ static const DECLARE_TLV_DB_SCALE(out_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(misc_tlv, -1500, 300, 0); -static unsigned int mic_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(mic_tlv,0 ,2 ,TLV_DB_SCALE_ITEM (1200 ,600 ,0 ), -3 ,3 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ), -}; +3 ,3 ,TLV_DB_SCALE_ITEM (3000 ,0 ,0 ) +);static const struct snd_kcontrol_new wm9713_snd_ac97_controls[] = {SOC_DOUBLE_TLV ("Speaker Playback Volume" ,AC97_MASTER ,8 ,0 ,31 ,1 , out_tlv),
Signature · 1 line
2.1.4
Lars-Peter Clausen
maintainerPATCH 42/42 ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
In reply to Lars-Peter ClausenDECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm_hubs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm_hubs.c +3 -4
@@ -38,11 +38,10 @@ static const DECLARE_TLV_DB_SCALE(earpiece_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(outmix_tlv, -2100, 300, 0); static const DECLARE_TLV_DB_SCALE(spkmixout_tlv, -1800, 600, 1); static const DECLARE_TLV_DB_SCALE(outpga_tlv, -5700, 100, 0); -static const unsigned int spkboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(spkboost_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (0 ,150 ,0 ), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; +7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(line_tlv, -600, 600, 0);static const char *speaker_ref_text[] = {
Signature · 1 line
2.1.4
Mark Brown
maintainerApplied "ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE" to the asoc tree
The patch
ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
2e45a25f9cb6546d8b3c20d9461e21f8c0a75a8aMon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Sun, 2 Aug 2015 17:20:10 +0200
Subject: [PATCH] ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with
DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD() that it automatically calculates the number of items in the TLV and is hence less prone to manual error.
Generate using the following coccinelle script
// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>
--- sound/soc/codecs/wm_hubs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/wm_hubs.c +3 -4
@@ -38,11 +38,10 @@ static const DECLARE_TLV_DB_SCALE(earpiece_tlv, -600, 600, 0); static const DECLARE_TLV_DB_SCALE(outmix_tlv, -2100, 300, 0); static const DECLARE_TLV_DB_SCALE(spkmixout_tlv, -1800, 600, 1); static const DECLARE_TLV_DB_SCALE(outpga_tlv, -5700, 100, 0); -static const unsigned int spkboost_tlv[] = { -TLV_DB_RANGE_HEAD (2 ), +static const DECLARE_TLV_DB_RANGE(spkboost_tlv,0 ,6 ,TLV_DB_SCALE_ITEM (0 ,150 ,0 ), -7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ), -}; +7 ,7 ,TLV_DB_SCALE_ITEM (1200 ,0 ,0 ) +); static const DECLARE_TLV_DB_SCALE(line_tlv, -600, 600, 0);static const char *speaker_ref_text[] = {
Signature · 1 line
2.1.4
Quoted 5 lines · Lars-Peter Clausen
Usage of
TLV_DB_RANGE_HEAD()is deprecated in favor ofDECLARE_TLV_DB_RANGE(). The reason for this is that the former requires to specify the number of items inside the range container while the later is able to calculate this automatically and hence leaves less room for error.
Quoted 8 lines
While non of the current users of
TLV_DB_RANGE_HEAD()gets it wrong it still makes sense to clean this up since existing drivers are often used as templates for new drivers. As an added bonus the code is also slightly shorter.There are also a few drivers which use
TLV_DB_RANGE_HEAD()with only a single sub-item. Those are updated to not use a range container at all since it is not necessary.
For the Cirrus CODECS
Thanks,
Quoted 31 lines · Lars-Peter Clausen
Usage of
TLV_DB_RANGE_HEAD()is deprecated in favor ofDECLARE_TLV_DB_RANGE(). The reason for this is that the former requires to specify the number of items inside the range container while the later is able to calculate this automatically and hence leaves less room for error.While non of the current users of
TLV_DB_RANGE_HEAD()gets it wrong it still makes sense to clean this up since existing drivers are often used as templates for new drivers. As an added bonus the code is also slightly shorter.There are also a few drivers which use
TLV_DB_RANGE_HEAD()with only a single sub-item. Those are updated to not use a range container at all since it is not necessary.Most of the conversion was auto-generated using the following coccinelle script:
// <smpl>
@@
declarer nameDECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@(quoted diff) +2
-3-unsigned int tlv[] = { - TLV_DB_RANGE_HEAD(x), +DECLARE_TLV_DB_RANGE(tlv, -}; +);// </smpl>
Quoted 2 lines
- Lars
For the Wolfson parts:
Thanks,
Charles