summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Remove redundant snd_soc_dapm_sync() calls from machine driversMark Brown2011-10-0831-73/+0
| | | | | | | | | The core will sync DAPM as part of the card initialization, there is no need for machine drivers to do so during their setup. OMAP drivers are omitted as I know Peter already has patches for them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Suppress early calls to snd_soc_dapm_sync()Mark Brown2011-10-082-0/+8
| | | | | | | | | | Ensure we only have one sync during the initial startup of the card by making snd_soc_dapm_sync() a noop on non-instantiated cards. This avoids any bounces due to things like jacks reporting their initial state on partially initialised cards. The callers that don't also get called at runtime should just be removed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Add WM1811 supportMark Brown2011-10-071-0/+13
| | | | | | | The WM1811 has a slightly different range on LDO2 to other WM8994 class devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.1' into for-3.2Mark Brown2011-10-061-2/+2
|\
| * ASoC: tlv320aic32x4 fix initialization of micpga routingWolfram Sang2011-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | Checking the pdata-flags used 'or', so the check is always true. Use 'and' to correctly mask the flags. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Javier Martin <javier.martin@vista-silicon.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Return early with -EINVAL if invalid dai format is detectedAxel Lin2011-10-062-9/+8
| | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8990: Remove incorrect commentsAxel Lin2011-10-061-4/+0
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8990: Convert to snd_soc_cache_sync for sync reg_cache with the hardwareAxel Lin2011-10-061-13/+19
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: fix codec breakage caused by the volsw/volsw_2r mergerPeter Ujfalusi2011-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | By accident few places still uses the _2r calls from the core. This is a quick fix, the drivers using the old callbacks going to be changed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Ensure DAPM widgets are set up before we sync jacksMark Brown2011-10-061-0/+2
| | | | | | | | | | | | | | | | | | We synchronise jack state on startup - when we do that make sure that we have set up all the DAPM widgets first in case we end up touching any of the partially set up widgets when syncing the jack pins. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
* | ASoC: Replace remaining use of *_volsw_2r with *_volswPeter Ujfalusi2011-10-063-8/+8
| | | | | | | | | | | | | | | | | | | | The snd_soc_*_volsw_2r functionality has been merged to *volsw callbacks. Few places still used the get, or put variant of volsw_2r, replace those with the corresponding *_volsw. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove references to linux@wolfsonmicro.comMark Brown2011-10-064-4/+4
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove unused variable 'wm9090' in wm9090_probeAxel Lin2011-10-051-1/+0
| | | | | | | | | | | | | | | | | | | | Eliminate below build warning: CC sound/soc/codecs/wm9090.o sound/soc/codecs/wm9090.c: In function 'wm9090_probe': sound/soc/codecs/wm9090.c:550: warning: unused variable 'wm9090' Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: imx: Remove unused variable 'dai'Axel Lin2011-10-052-2/+0
| | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove unused function declaration in imx-ssi.hAxel Lin2011-10-051-6/+0
| | | | | | | | | | | | | | | | | | These functions are removed in commit f0fba2ad "ASoC: multi-component - ASoC Multi-Component Support". Let's remove the leftover function declaration in header file. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: twl6040: Warn user in twl6040_put_volsw for error casePeter Ujfalusi2011-10-051-0/+2
| | | | | | | | | | | | | | | | Let the user know, that the callback has been called with unexpected register parameter. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Remove snd_soc_put_volsw_2r definitionPeter Ujfalusi2011-10-051-1/+0
| | | | | | | | | | | | | | | | We do not have users for snd_soc_put_volsw_2r anymore. It can be removed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: twl6040: Simply call snd_soc_put_volsw form the custom codePeter Ujfalusi2011-10-051-9/+2
| | | | | | | | | | | | | | | | The ASoC core now have one callback function, which can handle single, and double register mixer controls. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Combine snd_soc_put_volsw/put_volsw_2r functionsPeter Ujfalusi2011-10-052-51/+22
| | | | | | | | | | | | | | | | | | | | Handle the put_volsw/put_volsw_2r in one function. To avoid build breakage in twl6040 keep the snd_soc_put_volsw_2r as define, and map it snd_soc_put_volsw. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Combine snd_soc_get_volsw/get_volsw_2r functionsPeter Ujfalusi2011-10-052-47/+15
| | | | | | | | | | | | | | Handle the get_volsw/get_volsw_2r in one function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Combine snd_soc_info_volsw/info_volsw_2r functionsPeter Ujfalusi2011-10-052-42/+6
| | | | | | | | | | | | | | Handle the info_volsw/info_volsw_2r in one function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Change SOC_SINGLE/DOUBLE_VALUE representationPeter Ujfalusi2011-10-051-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC_SINGLE/DOUBLE_VALUE is used for mixer controls, where the bits are within one register. Assign .rreg to be the same as .reg for these types. With this change we can tell if the mixer in question: is mono: mc->reg == mc->rreg && mc->shift == mc->rshift is stereo, within single register: mc->reg == mc->rreg && mc->shift != mc->rshift is stereo, in two registers: mc->reg != mc->rreg The patch provide a small inline function to query, if the mixer is stereo, or mono. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: twl6040: Prepare for core put_volsw/volsw_2r mergerPeter Ujfalusi2011-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | Avoid using the mc->rreg to identify the 2r type of gain control. Introduce a variable to track this. This change is needed to avoid breakage with the upcoming volsw volsw_2r merger. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: twl6040: Simplify custom get_volsw callbackPeter Ujfalusi2011-10-051-12/+6
| | | | | | | | | | | | | | | | | | | | The custom get_volsw does not need to call any core get_volsw calls, since we are returning the shadow values for the gains. Return -EINVAL in the unlikely event, if the function has been called for unhandled control. This way we can remove one check in the code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Consolidate use of controls with custom get/put functionPeter Ujfalusi2011-10-056-139/+53
| | | | | | | | | | | | | | | | | | | | | | Use the macros for controls require custom get/put function. This is to make sure that the soc_mixer_control is used consistently among the drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Arun KS <arunks@mistralsolutions.com> Cc: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Use dapm_mark_dirty() for new DAPM widgets for consistencyMark Brown2011-10-051-1/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Stop checking for supplied widgets after we find the firstMark Brown2011-10-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | We don't really care how many widgets a supply is supplying, we just care if the number is non-zero. This didn't actually produce any improvement in the test cases I've been using but seems obviously sensible enough that I'm pushing it out anyway. We could do a similar thing for other widgets but this may be unhelpful for further refactorings Liam was working on aiming to allow us to identify connected audio paths. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Don't mark the outputs of supplies as dirty on state changesMark Brown2011-10-051-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole point of supply widgets is that they aren't inputs to their sinks so a state change in a supply should never affect the state of the widget being supplied and we don't need to mark them as dirty. Power Path Neighbour Before: 69 727 905 After: 63 607 731 This is particularly useful where supplies affect large portions of the chip (eg, a bandgap supplying the analogue sections). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Only run power_check() on a widget once per runMark Brown2011-10-052-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some widgets will get power_check() run on them more than once during a DAPM run, most commonly due to supply widgets checking to see if their consumers are powered up. It's wasteful to do this so cache the result of power_check() during a run. For one system I tested this on I got an improvement of: Power Path Neighbour Before: 106 970 1186 After: 69 727 905 from this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add verbose debugging showing why widgets get marked dirtyMark Brown2011-10-051-11/+15
| | | | | | | | | | | | | | | | | | Help diagnose why we're checking widgets by providing some logging when we first dirty them. This should possibly be a trace point if it's useful but can be absurdly verbose if enabled, we can always change it later if desired. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Reduce the number of neigbours we mark dirty when updating powerMark Brown2011-10-041-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two widgets are not currently connected then there is no need to propagate a power state change between them as we mark the affected widgets when we change a connection. Similarly if a neighbour widget is already in the state being set for the current widget then there is no need to recheck. On one system I tested this gave: Power Path Neighbour Before: 114 1066 1327 After: 106 970 1186 which is an improvement, although relatively small. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Do DAPM power checks only for widgets changed since last runMark Brown2011-10-044-6/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to reduce the number of DAPM power checks we run keep a list of widgets which have been changed since the last DAPM run and iterate over that rather than the full widget list. Whenever we change the power state for a widget we add all the source and sink widgets it has to the dirty list, ensuring that all widgets in the path are checked. This covers more widgets than we need to as some of the neighbour widgets won't be connected but it's simpler as a first step. On one system I tried this gave: Power Path Neighbour Before: 207 1939 2461 After: 114 1066 1327 which seems useful. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Mark headphone, mic, speaker and line widgets as always connectedMark Brown2011-10-041-4/+4
| | | | | | | | | | | | | | | | We're not actually doing any dynamic power management based on connection and output drivers (which are pretty much the same thing) are marked as unconditionally connected already. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Factor out widget power check operationMark Brown2011-10-041-11/+10
| | | | | | | | | | | | | | We've got the same code in two different places, let's have it in a single place instead. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Ensure all DAPM widgets have a power check callbackMark Brown2011-10-041-3/+8
| | | | | | | | | | | | Makes the code simpler. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Move bias level decision into main dapm_power_widgets()Mark Brown2011-10-041-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Future patches will try to reduce the number of widgets we check on each DAPM run but we're still going to need to look and see if the devices is on at all so we can manage the overall device bias. Move these checks out into the main dapm_power_widgets() function so we don't have to think about them for now. Once we're doing more incremental updates it'll probably be worth using refcounts for each bias level to avoid having to do the sweep over all widgets but that's not going to be where the big performance wins are. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Factor write of widget power out into a separate functionMark Brown2011-10-041-11/+18
| | | | | | | | | | | | | | Split the decision about what the new power should be out from the implementation of that decision. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: Fix return code from regulator_disable_deferred()Mark Brown2011-10-041-2/+7
| | | | | | | | | | | | | | schedule_delayed_work() returns a bool indicating if the work was already queued when it succeeds so we need to squash a true down to zero. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove direct register cache accesses from WM8962 driverMark Brown2011-10-041-10/+11
| | | | | | | | | | | | | | Also fix return values for speaker switch updates. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: twl6040: Simplify custom put_volsw callbackPeter Ujfalusi2011-10-041-7/+5
| | | | | | | | | | | | | | | | Return -EINVAL in the unlikely event, if the function has been called for unhandled control. This way we can remove one check in the code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Introduce SOC_DOUBLE_R_VALUE macroPeter Ujfalusi2011-10-041-9/+10
| | | | | | | | | | | | | | | | With the new macro we can remove duplicated code for the SOC_DOUBLE_R type of controls. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Introduce SOC_DOUBLE_VALUE macroPeter Ujfalusi2011-10-041-18/+16
| | | | | | | | | | | | | | | | | | | | With the new macro we can remove duplicated code for the SOC_DOUBLE type of controls. We can also remap the SOC_SINGLE_VALUE macro to SOC_DOUBLE_VALUE Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove unneeded hw_write initialisation in wm8523Axel Lin2011-10-041-1/+0
| | | | | | | | | | | | | | | | It is not required after commit 8d50e447 "ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs" Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove unneeded hw_write initialisation in ak4671Axel Lin2011-10-041-2/+0
| | | | | | | | | | | | | | It is not required now. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8711: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-041-1/+1
| | | | | | | | | | | | | | | | Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8988: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-041-1/+0
| | | | | | | | | | | | | | | | Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8750: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-041-17/+9
| | | | | | | | | | | | | | | | Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Avoid writing to WM8971_RESET in wm8971_resumeAxel Lin2011-10-041-1/+1
| | | | | | | | | | | | | | | | Writing to WM8971_RESET resets all registers to the default state. Thus we should avoid writing to WM8971_RESET on resume. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.1' into for-3.2Mark Brown2011-10-041-1/+1
|\ \
| * | ASoC: wm8994: Fix setting rate_reg for wm8994-aif2Axel Lin2011-10-041-1/+1
| |/ | | | | | | | | | | | | | | For wm8994-aif2, the rate_reg should be WM8994_AIF2_RATE. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
OpenPOWER on IntegriCloud