summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Implement fully_routed card propertyStephen Warren2011-11-234-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | A card is fully routed if the DAPM route table describes all connections on the board. When a card is fully routed, some operations can be automated by the ASoC core. The first, and currently only, such operation is described below, and implemented by this patch. Codecs often have a large number of external pins, and not all of these pins will be connected on all board designs. Some machine drivers therefore call snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core never to activate them. However, when a card is fully routed, the information needed to derive the set of unused pins is present in card->dapm_routes. In this case, have the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused codec pin. This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Tegra I2S: Remove dependency on pdev->idStephen Warren2011-11-232-49/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | When devices are instantiated from device-tree, pdev->id is set to -1. Rework the driver so it doesn't depend on the ID. Tegra I2S instantiated from board files are configured with pdev name "tegra-i2s" and ID 0 or 1. The driver core then names the device "tegra-i2s.0" or "tegra-i2s.1". This is not changing. When a device is instantiated from device-tree, it will have pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is not something we can rely on. This patch doesn't actually change any names though: When a device is instantiated from device-tree, the overall device name will be "${unit_address}.${node_name}". This causes issues such as clk_get() failures due to lack of a device-name match. To solve that, AUXDATA was invented, to force a specific device name, thus allowing dev_name() to return the same as the non-device-tree case. Tegra currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will go away, most likely replaced by phandle-based references within the device tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unused variable in wm8776 driverMark Brown2011-11-231-1/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-231-0/+6
|\
| * ASoC: skip resume of soc-audio devices without codecsEric Miao2011-11-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where there is no working codec on the soc-audio devices, and snd_soc_suspend() will skip such device when suspending. Yet its counterpart snd_soc_resume() does not check this, causing complaints about spinlock lockup: [ 176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8 [ 176.732539] [<80014a14>] (unwind_backtrace+0x0/0xec) from [<805b3fc8>] (dump_stack+0x20/0x24) [ 176.741082] [<805b3fc8>] (dump_stack+0x20/0x24) from [<80322208>] (do_raw_spin_lock+0x118/0x158) [ 176.749882] [<80322208>] (do_raw_spin_lock+0x118/0x158) from [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) [ 176.759723] [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) from [<8002a020>] (__wake_up+0x2c/0x5c) [ 176.768781] [<8002a020>] (__wake_up+0x2c/0x5c) from [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) [ 176.777666] [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) from [<8004ee20>] (process_one_work+0x2e8/0x50c) [ 176.787334] [<8004ee20>] (process_one_work+0x2e8/0x50c) from [<8004fd08>] (worker_thread+0x1c8/0x2e0) [ 176.796566] [<8004fd08>] (worker_thread+0x1c8/0x2e0) from [<80053ec8>] (kthread+0xa4/0xb0) [ 176.804843] [<80053ec8>] (kthread+0xa4/0xb0) from [<8000ea70>] (kernel_thread_exit+0x0/0x8) Signed-off-by: Eric Miao <eric.miao@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-231-1/+1
|\|
| * ASoC: cs42l51: Fix off-by-one for reg_cache_sizeAxel Lin2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Just checking the code in cs42l51_fill_cache(): The cache pointer points to codec->reg_cache + 1. I think it is because CS42L51_FIRSTREG is 0x01, so codec->reg_cache[0] is not used here. Then we read CS42L51_NUMREGS bytes to cache. So we need reg_cache_size to be CS42L51_NUMREGS + 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Cleanup duplicated constLars-Peter Clausen2011-11-235-5/+5
| | | | | | | | | | | | | | | | Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally introduced a few duplicated consts. This patch cleans it up. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-233-497/+1
|\|
| * ASoC: drop support for PlayPaq with WM8510Paul Bolle2011-11-233-497/+1
| | | | | | | | | | | | | | | | | | | | | | SoC Audio support for PlayPaq with WM8510 got added in commit 9aaca9683b ("[ALSA] Revised AT32 ASoC Patch"). That support depends on BOARD_PLAYPAQ. That Kconfig symbol didn't exist when that support got added in v2.6.27. It still doesn't. It has never been possible to even build this driver. Drop it. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driverStephen Warren2011-11-231-19/+7
| | | | | | | | | | | | | | | | | | | | module_platform_driver saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driverStephen Warren2011-11-231-19/+7
| | | | | | | | | | | | | | | | | | | | module_platform_driver saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra DAS: Add device tree bindingStephen Warren2011-11-232-0/+20
| | | | | | | | | | Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-23121-147/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra I2S: Use devm_ APIs and module_platform_driverStephen Warren2011-11-231-35/+10
| | | | | | | | | | | | | | | | | | | | module_platform_drive saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra: Move DAS configuration into machine driversStephen Warren2011-11-233-18/+28
| | | | | | | | | | | | | | | | | | This removes potentially machine-specific routing knowledge from the I2S driverinto the machine drivers, which is better equipped to know what the appropriate routing configuration is. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra DAS: Use devm_ APIs and module_platform_driverStephen Warren2011-11-231-35/+10
| | | | | | | | | | | | | | | | | | | | module_platform_drive saves some boiler-plate code. The devm_ APIs remove the need to manually clean up allocations, thus removing some code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Tegra PCM: Use module_platform_driverStephen Warren2011-11-231-12/+1
| | | | | | | | | | | | | | This saves some boiler-plate code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Convert wm8776 to table based control and DAPM initMark Brown2011-11-231-6/+7
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Staticise and constify cs42l73_reg_defaultsMark Brown2011-11-231-1/+1
| | | | | | | | | | | | It's not exported and doesn't need to change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-222-17/+17
|\|
| * ASoC: mpc8610: tell the CS4270 codec that it's the masterTimur Tabi2011-11-221-8/+16
| | | | | | | | | | | | | | | | | | Commit ac601555 ("ASoC: Return early with -EINVAL if invalid dai format is detected") requires the machine driver to tell the CS4270 codec driver whether the CS4270 should be configured for master or slave operation. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: cs4720: use snd_soc_cache_sync()Daniel Mack2011-11-221-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the manual register restore mechanism in cs4270.c and call the generic snd_soc_cache_sync() handler instead. This factors code out in favour of core facilities and also fixes a bus confusion that is most probably caused by intermixing i2c-regmap functions and i2c_smbus_* accessors. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-221-0/+1
|\|
| * ASoC: SAMSUNG: Fix build errorBoojin Kim2011-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds <linux/modules.h> to fix following build errors. sound/soc/codecs/wm8994.c: In function 'wm8994_readable': sound/soc/codecs/wm8994.c:58: warning: unused variable 'wm8994' sound/soc/samsung/smdk_wm8994.c:176: error: expected declaration specifiers or '...' before string constant sound/soc/samsung/smdk_wm8994.c:176: warning: data definition has no type or storage class sound/soc/samsung/smdk_wm8994.c:176: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' sound/soc/samsung/smdk_wm8994.c:176: warning: function declaration isn't a prototype sound/soc/samsung/smdk_wm8994.c:177: error: expected declaration specifiers or '...' before string constant Signed-off-by: Boojin Kim <boojin.kim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-222-6/+6
|\|
| * ASoC: max9877: Update register if either val or val2 is changedAxel Lin2011-11-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | In the case of ((max9877_regs[reg] >> shift) & mask) != val but ((max9877_regs[reg2] >> shift) & mask) == val2, current code does not update the registers. Fix the logic to update registers if either val or val2 is changed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSETAxel Lin2011-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the datasheet: The BIT[5:4] of ADC Control Register 2 is to control the word width. 00 = 25 Bits 01 = 20 Bits 10 = 16 Bits 11 = Invalid Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | ASoC: cs42l73: Make inv and format to be unsigned intAxel Lin2011-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix below smatch warning: sound/soc/codecs/cs42l73.c +1030 cs42l73_set_dai_fmt(53) error: inv is never equal to 1024 (wrong type 0 - 255). sound/soc/codecs/cs42l73.c +1032 cs42l73_set_dai_fmt(55) error: inv is never equal to 768 (wrong type 0 - 255). sound/soc/codecs/cs42l73.c +1036 cs42l73_set_dai_fmt(59) error: inv is never equal to 1024 (wrong type 0 - 255). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: cs42l73: Unify the way to define bits of registerAxel Lin2011-11-222-12/+12
| | | | | | | | | | | | | | | | | | | | Current code defines some bits with left shift to the proper bit defined in datasheet, but some don't. Unify the definition with proper left shift and adjust the code accordingly. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove conditional I2C usage from tlv320aic3x driverMark Brown2011-11-221-6/+0
| | | | | | | | | | | | | | The driver only supports I2C so doesn't need to do things conditionally. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com>
* | ASoC: Remove WM5100 DSP memory windows from register default dataMark Brown2011-11-211-168/+0
| | | | | | | | | | | | | | | | | | They're all volatile so shouldn't have defaults and as we've got pages into the DSP memory the registers themselves aren't that useful - a further patch adding support for the DSPs will provide direct diagnostic access to the DSP memories. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Convert WM8753 to table based DAPM and control initMark Brown2011-11-211-16/+8
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove redundant regcache_sync call in cs42l73_resumeAxel Lin2011-11-211-4/+0
| | | | | | | | | | | | | | | | It's done in cs42l73_set_bias_level when the dapm.bias_level is switching from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: cs42l73: Show correct revision idAxel Lin2011-11-211-1/+1
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: cs42l73: Return proper error code if device id mismatchAxel Lin2011-11-211-0/+1
| | | | | | | | | | | | | | Return -ENODEV instead of 0 if device id mismatch. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-211-0/+1
|\|
| * ASoC: Ensure WM8731 register cache is synced when resuming from disabledMark Brown2011-11-211-0/+1
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | ASoC: Use table based init for wm8731_snd_controlsMark Brown2011-11-211-3/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-218-13/+15
|\|
| * Merge branch 'DB_RANGE-size-fixes' of ↵Mark Brown2011-11-217-10/+10
| |\ | | | | | | | | | git://git.alsa-project.org/alsa-kprivate into for-3.2
| | * ASoC: wm_hubs: fix DB_RANGE sizeClemens Ladisch2011-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: wm9090: fix DB_RANGE sizeClemens Ladisch2011-11-201-3/+3
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: wm8993: fix DB_RANGE sizeClemens Ladisch2011-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: wm8962: fix DB_RANGE sizeClemens Ladisch2011-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: sgtl5000: fix DB_RANGE sizeClemens Ladisch2011-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: rt5631: fix DB_RANGE sizeClemens Ladisch2011-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent the last entry from being omitted. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| | * ASoC: adau1373: fix DB_RANGE sizeClemens Ladisch2011-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * | ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits callsAxel Lin2011-11-201-3/+5
| | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alexander Sverdlin <subaparts@yandex.ru> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | devicetree: Document Wolfson prefixMark Brown2011-11-211-0/+1
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>