summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/fix/wm8960' and 'asoc/fix/wm8962' into ↵Mark Brown2015-09-232-9/+20
|\ \ | | | | | | | | | asoc-linus
| | * ASoC: wm8962: remove 64k sample rate supportZidan Wang2015-09-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | wm8962 can't support 64k sample rate. When playing a 64KHz wave file, 'Unsupported rate 64000Hz' will be prompted. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: wm8960: correct the max register value of mic boost pgaZidan Wang2015-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | the max register value of mic boost pga should be 3. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: wm8960: correct gain value for input PGA and add microphone PGAZidan Wang2015-09-111-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input PGAs have a gain range from -17.25dB to +30dB in 0.75dB steps. The boost stage can provide additional gain. For line inputs, -12dB to +6dB gain is available on the boost mixer. For micphone inputs, it can provide up to +29dB additional gain from the microphone PGA. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: wm8960: correct the min gain value of some PGAZidan Wang2015-09-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The min gain is the corresponding gain value when the register value is 0 instead of 1, just correct it. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/psc', ↵Mark Brown2015-09-231-14/+9Star
|\ \ \ \ | | |_|/ | |/| | | | | | 'asoc/fix/pxa', 'asoc/fix/spear', 'asoc/fix/sti' and 'asoc/fix/wm0010' into asoc-linus
| | * | ASoC: wm0010: fix error pathSudip Mukherjee2015-09-191-12/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the error path so that we can free the allocated memory on the error path instead of releasing them individually on each error. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: wm0010: fix memory leakSudip Mukherjee2015-09-191-9/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have requested for the firmware but we have missed releasing it both on success and on error path. While checking the code it turned out that the requested firmware is not even used. More over the same firmware is being loaded by wm0010_stage2_load(). Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: wm0010: fix memory leakSudip Mukherjee2015-09-011-1/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | We were aborting if the kzalloc of img_swap fails but without freeing the already allocated out. Similarly we were aborting if spi_sync fails without releasing out and img_swap. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Prevent the pop sound in case of playback and the jack is pluggingOder Chiou2015-09-231-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Increase the delay time to remove the pop soundOder Chiou2015-09-231-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rt5645: Use the type SOC_DAPM_SINGLE_AUTODISABLE to prevent the weird ↵Oder Chiou2015-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | sound in runtime of power up Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge branch 'fix/rt5645' of ↵Mark Brown2015-09-141-0/+7
|\ \ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fix-rt5645
| * | | ASoC: rt5645: Add struct dmi_system_id "Google Ultima" for chrome platformJohn Lin2015-09-091-0/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: rt5645: Remove incorrect settingsOder Chiou2015-09-111-6/+0Star
| |/ / |/| | | | | | | | | | | | | | | | | | | | The patch removes the incorrect settings to avoid the pop sound in the first playback with headphone after boot. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and ↵Mark Brown2015-08-301-4/+2Star
|\ \ \ \ | | | |/ | | |/| | | | | 'asoc/topic/zx296702' into asoc-next
| * / | ASoC: wm8996: Remove spurious IRQF_ONESHOT flagAxel Lin2015-07-081-4/+2Star
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts ed043aebe6ec ("ASoC: wm8996: Pass the IRQF_ONESHOT flag"). The coccinelle warnings is false positive because the original code does set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;". Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', ↵Mark Brown2015-08-306-162/+211
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/wm8904', 'asoc/topic/wm8960' and 'asoc/topic/wm8983' into asoc-next
| | | | | * | | ASoC: wm8983: Get rid of wm8983_access_masks tableAxel Lin2015-07-291-66/+14Star
| | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max8983_access table is used for look up readable/writable attributes of registers. The writable registers are mostly in continuous ranges, so we can replace max8983_access table by using case range. The read fields are all 0, so just drop implement of .readable callback. Also set .max_register setting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * / / ASoC: wm8960: update pll and clock setting functionZidan Wang2015-08-112-41/+180
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add sysclk auto mode. When it's sysclk auto mode, if the MCLK is available for clock configure, using MCLK to provide sysclk directly, otherwise, search a available pll out frequcncy and set pll. Configure clock in hw_params may cause problems when using bypass style paths without hw_params in machine driver getting called. So add configure clock to set_bias_level. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / / ASoC: wm8904: Check for clk_prepare_enable() errorFabio Estevam2015-07-081-1/+3
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * / / ASoC: wm8753: Drop wm8753_writeable functionAxel Lin2015-08-051-6/+0Star
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When .max_register is set and .writeable_reg is not implement, registers between 0 and .max_register are writeable. This is the same as current implementation of wm8753_writeable(), so just drop implementation for .writeable_reg callback. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm8741: Drop misleading readable_reg callback implementationAxel Lin2015-08-181-21/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regmap_readable() returns false if map->format.format_write is set. For .reg_bits = 7, .val_bits = 9, setting, map->format.format_write = regmap_format_7_9_write; Even current code has implemented map->readable_reg, regmap_readable() still returns false anyway. Thus drop the misleading readable_reg callback implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: wm8741: Simplify wm8741_set_dai_sysclk implementationAxel Lin2015-08-051-27/+14Star
| |/ / | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm5100', ↵Mark Brown2015-08-305-56/+327
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/wm5110', 'asoc/topic/wm8004' and 'asoc/topic/wm8731' into asoc-next
| | | | | * | | ASoC: wm8731: Drop wm8731_writeable functionAxel Lin2015-08-051-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When .max_register is set and .writeable_reg is not implement, registers between 0 and .max_register are writeable. This is the same as current implementation of wm8731_writeable(), so just drop implementation for .writeable_reg callback. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | ASoC: wm8731: Check for clk_prepare_enable() errorFabio Estevam2015-07-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | ASoC: wm8731: initialize the hardware when loading the codec driverSergey Kiselev2015-07-071-32/+42
| | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the requesting supplies, hardware reset and initialization from wm8731_probe to wm8731_i2c_probe and wm8731_spi_probe. So that the codec hardware is initialized when loading the codec driver, and not when loading the machine driver. This avoids unnecesary hardware resets and re-initializations when re-loading the machine driver. Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * / / ASoC: wm8804: Drop duplicate constLars-Peter Clausen2015-07-291-1/+1
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC_ENUM_SINGLE_DECL() already includes a const, drop the extra const. Fixes the following sparse warning: sound/soc/codecs/wm8804.c:101:14: warning: duplicate const Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | ASoC: wm5110: Use reg_sequence for multi_reg_write/register_patchNariman Poushin2015-07-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by: commit 8019ff6cfc04 ("regmap: Use reg_sequence for multi_reg_write / register_patch") Interacting with: commit d1acd31883d7 ("ASoC: wm5110: Add special DRE on/off handling for the headphone path") Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | Merge tag 'regmap-seq-delay-api' of ↵Mark Brown2015-07-1714-16/+16
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-wm5110 regmap: Create a new struct reg_sequence for register sequences In order to allow us to start adding extra annotations for sequences without bloating register default tables duplicate the structure under the new name reg_sequence and update the APIs to use that instead of reg_default.
| | | * | | | ASoC: wm5110: Add special DRE on/off handling for the headphone pathCharles Keepax2015-07-081-9/+276
| | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the best performance the headphone path enable/disable must be handled specially for the situations of DRE on and DRE off. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * / | | ASoC: wm5100: Remove spurious IRQF_ONESHOT flagAxel Lin2015-07-081-4/+2Star
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 3d907cc30d07 ("ASoC: wm5100: Pass the IRQF_ONESHOT flag"). The coccinelle warnings is false positive because the original code does set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;". Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | ASoC: wm0010: Remove spurious missing IRQF_ONESHOTAxel Lin2015-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 58d468328646 ("ASoC: wm0010: Add missing IRQF_ONESHOT"). The coccinelle warnings is false positive because the original code does set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;". Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | ASoC: wm0010: Remove redundant spi driver bus initializationAntonio Borneo2015-07-061-1/+0Star
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_register_driver(), so we can drop the manual assignment. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | |
| \ \ \
| \ \ \
| \ \ \
*---. \ \ \ Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', ↵Mark Brown2015-08-308-114/+84Star
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | 'asoc/topic/ux500' and 'asoc/topic/width' into asoc-next
| | | * | | ASoC: Use params_width() at appropriate placesAxel Lin2015-07-246-8/+8
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: uda134x: Use regmap_update_bits() were appropriateLars-Peter Clausen2015-07-131-43/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing the read-modify-update cycle by hand when updating a register use regmap_update_bits(). This also means we can now remove uda134x_read_reg_cache() and uda134x_write() since they are unused. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: uda134x: Convert to regmapLars-Peter Clausen2015-07-132-55/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use regmap rather then the legacy ASoC IO for the uda134x driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: uda134x: Explicitly handle in-data addressesLars-Peter Clausen2015-07-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UDA134X family extends the rather limited L3 register set by using part of the register value as additional address bits. These extra address bits are currently stored in the default register cache and rely on them remaining constant. While this works it is rather idiomatic and slightly confusing. Change it so that the additional address bits are explicitly added when writing a register. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: uda134x: Move state struct allocation to bus probeLars-Peter Clausen2015-07-131-18/+9Star
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resource allocations should be done in the bus probe rather than the CODEC probe. Move the allocation of the drivers state struct there. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | |
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
*-------. \ \ \ Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown2015-08-3045-341/+229Star
|\ \ \ \ \ \ \ \ | | | | |_|/ / / | | | |/| | | | | | | | | | | | 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
| | | | * | | | ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-12/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm8991: Don't use range container for TLVs with one entryLars-Peter Clausen2015-08-051-43/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm8990: Don't use range container for TLV with one entryLars-Peter Clausen2015-08-051-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-8/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>