summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
Commit message (Collapse)AuthorAgeFilesLines
* spi: Drop owner assignment from spi_driversAndrew F. Davis2015-10-281-1/+0
| | | | | | | | | An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', ↵Mark Brown2015-08-301-6/+0
|\ \ | | | | | | | | | 'asoc/topic/wm8904', 'asoc/topic/wm8960' and 'asoc/topic/wm8983' into asoc-next
| | * ASoC: wm8753: Drop wm8753_writeable functionAxel Lin2015-08-051-6/+0
| |/ | | | | | | | | | | | | | | | | | | 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>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown2015-08-301-4/+3
|\ \ \ | | |/ | |/| | | | 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
| | * ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGELars-Peter Clausen2015-08-051-4/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
|/ | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: wm8753: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-06-011-1/+1
| | | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level(). 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: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: wm8753: Cleanup manual bias level transitionsLars-Peter Clausen2015-04-011-18/+1
| | | | | | | | | | | | | | | | | | Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. 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: wm8753: Integrate capacitor charging into the DAPM sequenceLars-Peter Clausen2015-04-011-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When being powered on, either initially on probe or when resuming from suspend, the wm8971 configures the device for quick output capacitor charging. Since the charging can take a rather long time (up to multiple seconds) it is done asynchronously without blocking. A delayed work item is run once the charging is finished and the device is switched to the target bias level. This all done asynchronously to the regular DAPM sequence accessing the same data structures and registers without any looking, which can lead to race conditions. Furthermore this potentially delays the start of stream on the CODEC while the rest of the system is already up and running, meaning the first bytes of audio are lost. It also does no comply with the assumption of the DAPM core that if set_bias_level() returned successfully the device will be at the requested bias level. This patch slightly refactors things and makes sure that the caps charging is properly integrated into the DAPM sequence. When transitioning from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY the part will be put into fast charging mode and a work item will be scheduled that puts it back into standby charging once the charging period has elapsed. If a playback or capture stream is started while charging is in progress the driver will now wait in SND_SOC_BIAS_PREPARE until the charging is done. This makes sure that charging is done asynchronously in the background when the chip is idle, but at the same time makes sure that playback/capture is not started before the charging is done. 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: wm8{350,753,971}: Use snd_soc_dapm_to_codec() instead of dapm->codecLars-Peter Clausen2014-09-291-1/+1
| | | | | | | | | The CODEC struct in the snd_soc_dapm_context struct is deprecated and scheduled for removal. Use the snd_soc_dapm_to_codec() function instead. 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: wm8753: Convert to params_width()Mark Brown2014-07-311-10/+10
| | | | | | | The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
* ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen2014-04-141-2/+2
| | | | | | | | | | | | | | | For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-7/+0
|\
| * ASoC: codec: Simplify ASoC probe code.Xiubo Li2014-03-111-7/+0
| | | | | | | | | | | | | | | | For some CODEC drivers like who act as the MFDs children are ignored by this patch. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'asoc/topic/wm5100', 'asoc/topic/wm8523', ↵Mark Brown2014-03-121-1/+0
|\ \ \ \ | | |_|/ | |/| | | | | | 'asoc/topic/wm8731', 'asoc/topic/wm8737', 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic/wm8903', 'asoc/topic/wm8904', 'asoc/topic/wm8940' and 'asoc/topic/wm8955' into asoc-next
| | | * ASoC: wm8753: Remove superfluous 'codec->cache_sync = 1'Lars-Peter Clausen2014-03-041-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wm8763 driver uses regmap for IO which means that codec->cache_sync is not used. The line was added in commit d3398ff ('ASoC: Convert WM8753 to direct regmap API usage'). Presumably this was meant to be regcache_mark_dirty(), but since we already call regcache_mark_dirty() in the core when suspending the CODEC it is safe to just remove the line. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | ASoC: Add helper function to check whether a CODEC is activeLars-Peter Clausen2014-03-061-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | Instead of directly checking the 'active' field of the CODEC struct add a new helper function that will return either true or false depending on whether the CODEC is active. This will make the migration to the component level easier. The patch also updates all CODEC drivers that check the active attribute to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm8753: Use IS_ENABLED() macroFabio Estevam2013-11-271-3/+3
|/ | | | | | | Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm8753: Use power efficient workqueueMark Brown2013-07-191-2/+3
| | | | | | | | | The work used to allow the capcitors to ramp is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
* ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-7/+7
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8753: Convert to use devm_regmap_init_{spi,i2c}()Tushar Behera2012-11-231-26/+6
| | | | | Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8753: remove invalid free of devm_ allocated dataTushar Behera2012-11-231-1/+0
| | | | | | | | Fixes following warning. sound/soc/codecs/wm8753.c:1594:1-6: WARNING: invalid free of devm_ allocated data Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* workqueue: deprecate flush[_delayed]_work_sync()Tejun Heo2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flush[_delayed]_work_sync() are now spurious. Mark them deprecated and convert all users to flush[_delayed]_work(). If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant and the regular flushes guarantee that the work item is not pending or running on any CPU on return, so there's no reason to use the sync flushes at all and they're going away. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Mattia Dongili <malattia@linux.it> Cc: Kent Yoder <key@linux.vnet.ibm.com> Cc: David Airlie <airlied@linux.ie> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-wireless@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Petr Vandrovec <petr@vandrovec.name> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Avi Kivity <avi@redhat.com>
* ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown2012-06-031-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown2012-04-041-4/+2
| | | | | | | | | | In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8753: fix initializationDenis 'GNUtoo' Carikli2012-03-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Without that fix the wm8753 SPI initialization fails, and then produces a kernel panic during boot with the following call trace: Unable to handle kernel paging request at virtual address 37386d9b [<c01ccafc>] (regmap_get_val_bytes+0x0/0x14) from [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc) [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc) from [<c0244a4c>] (wm8753_probe+0x5c/0x1c4) [<c0244a4c>] (wm8753_probe+0x5c/0x1c4) from [<c023bb24>] (soc_probe_codec+0x174/0x284) [<c023bb24>] (soc_probe_codec+0x174/0x284) from [<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28) [<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28) from [<c023d278>] (snd_soc_register_card+0x240/0x2d4) [<c023d278>] (snd_soc_register_card+0x240/0x2d4) from [<c023d330>] (soc_probe+0x24/0x40) [<c023d330>] (soc_probe+0x24/0x40) from [<c01c3900>] (platform_drv_probe+0x14/0x18) [...] The commit d3398ff05907167f463e119421b053ce043741d1 ( ASoC: Convert WM8753 to direct regmap API usage ) introduced the problem. Thanks to Lars-Peter Clausen for helping me a bit during the debugging. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8753: Convert to devm_kzalloc()Mark Brown2012-02-271-5/+5
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert WM8753 to direct regmap API usageMark Brown2012-01-201-47/+139
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen2011-12-021-1/+1
| | | | | | | | | | The existence of this parameter is purely historical. None of the CODEC drivers uses it and we always pass in the same value anyway, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown2011-11-271-1/+0
| | | | | | They've not been needed for a long time if they were ever required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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: Convert WM8753 to table based DAPM and control initMark Brown2011-11-211-16/+8
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8753: Skip noop reconfiguration of DAI modeTimo Juhani Lindfors2011-11-171-0/+3
| | | | | | | | | | | | | | | | This patch makes it possible to set DAI mode to its currently applied value even if codec is active. This is necessary to allow aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom & alsactl store -f backup.state alsactl restore -f backup.state to work without returning errors. This patch is based on a patch sent by Klaus Kurzmann <mok@fluxnetz.de>. Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* Merge branch 'for-3.1' into for-3.2Mark Brown2011-10-021-2/+2
|\
| * ASoC: Fix setting update bits for WM8753_LADC and WM8753_RADCAxel Lin2011-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Current code set update bits for WM8753_LDAC and WM8753_RDAC twice, but missed setting update bits for WM8753_LADC and WM8753_RADC. I think it is a copy-paste bug in commit 776065 "ASoC: codecs: wm8753: Fix register cache incoherency". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Add device tree binding for WM8753Mark Brown2011-08-141-0/+9
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Remove unneeded -codec from WM8753 driver nameMark Brown2011-08-091-2/+2
|/ | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* ASoC: codecs: wm8753: Fix DAI mode switchingLars-Peter Clausen2011-02-071-175/+121
| | | | | | | | | | | | | | | | | | | | | | The wm8753 codec supports switching between different DAI modes. The current drivers tries to implement this by changing the DAI driver at runtime. But to properly work this would require support from the ASoC core. So this patch takes a different approch on how the DAI mode switching is implemented. The only difference, from a driver point of view, between the different DAI modes is how to program the DAI format to the hardware. So what this patch is, it stores the current format for each DAI in the drivers private struct and when the DAI mode is changed the format gets simply reprogrammed according to the new DAI mode. Futhermore this patch restricts the changing of the DAI format to when the codec is inactive. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-2.6.37' into for-2.6.38Mark Brown2010-12-281-143/+83
|\
| * ASoC: codecs: wm8753: Fix register cache incoherencyLars-Peter Clausen2010-12-281-143/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The multi-component patch(commit f0fba2ad1) moved the allocation of the register cache from the driver to the ASoC core. Most drivers where adjusted to this, but the wm8753 driver still uses its own register cache for its private functions, while functions from the ASoC core use the generic cache. Furthermore the generic cache uses zero-based numbering while the wm8753 cache uses one-based numbering. Thus we end up with two from each other incoherent caches, which leads to undefined behaviour and crashes. This patch fixes the issue by changing the wm8753 driver to use the generic register cache in its private functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix merge errors with flush_scheduled_work() removalTakashi Iwai2010-12-131-1/+1
| | | | | | | | | | | | | | | | delayed_work was moved to dapm in the commit ce6120cca2589ede530200c7cfe11ac9f144333c ASoC: Decouple DAPM from CODECs Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/workq-update' into topic/asocTakashi Iwai2010-12-131-20/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: sound/soc/codecs/wm8350.c sound/soc/codecs/wm8753.c sound/soc/sh/fsi.c sound/soc/soc-core.c
| * | sound: don't use flush_scheduled_work()Tejun Heo2010-12-131-20/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flush_scheduled_work() is deprecated and scheduled to be removed. * cancel[_delayed]_work() + flush_scheduled_work() -> cancel[_delayed]_work_sync(). * wm8350, wm8753 and soc-core use custom code to cancel a delayed work, execute it immediately if it was pending and wait for its completion. This is equivalent to flush_delayed_work_sync(). Use it instead. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: Do not include soc-dapm.hJarkko Nikula2010-11-221-1/+0
| | | | | | | | | | | | | | | | There is no need to include soc-dapm.h since soc.h includes it. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Decouple DAPM from CODECsLiam Girdwood2010-11-061-13/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoupling Dynamic Audio Power Management (DAPM) from codec devices is required when developing ASoC further. Such as for other ASoC components to have DAPM widgets or when extending DAPM to handle cross-device paths. This patch decouples DAPM related variables from struct snd_soc_codec and moves them to new struct snd_soc_dapm_context that is used to encapsulate DAPM context of a device. ASoC core and API of DAPM functions are modified to use DAPM context instead of codec. This patch does not change current functionality and a large part of changes come because of structure and internal API changes. Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some minor core changes, codecs and machine driver conversions from Jarkko Nikula <jhnikula@gmail.com>. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Cliff Cai <cliff.cai@analog.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Ryan Mallon <ryan@bluewatersys.com> Cc: Timur Tabi <timur@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Jassi Brar <jassi.brar@samsung.com> Cc: Daniel Gloeckner <dg@emlix.com> Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unneeded use of spi_bus_typeDimitris Papastamos2010-09-301-1/+0
| | | | | | | | | No need to explicitly set the bus type, spi_register_driver does that for us. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove needless codec->bias_level assignment to SND_SOC_BIAS_OFFJarkko Nikula2010-09-151-1/+0
| | | | | | | | | This assignment is done by the snd_soc_register_codec so there is no need to redo it in probe function of a codec driver. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix incorrect register cache size configurationDimitris Papastamos2010-09-101-1/+1
| | | | | | | | | | | The reg_cache_size is the number of elements in the register cache, not the size of the cache itself. This is not a problem if the size of each element of the cache is 1 byte but it matters in any other case. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud