aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* ASoC: Remove unused variable 'wm9090' in wm9090_probeAxel Lin2011-10-05
| | | | | | | | | | 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-05
| | | | | 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-05
| | | | | | | | | 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-05
| | | | | | | | 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-05
| | | | | | | | 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-05
| | | | | | | | 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-05
| | | | | | | | | | 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-05
| | | | | | | 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-05
| | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | | 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-05
| | | | | | | | | | 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-05
| | | | | | | | | | | 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-05
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Stop checking for supplied widgets after we find the firstMark Brown2011-10-05
| | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | 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-05
| | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | 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-04
| | | | | | 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-04
| | | | | | | | | | | | | | 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-04
| | | | | | | 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-04
| | | | | | | 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-04
| | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | | 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-04
| | | | | | | | 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-04
|\
| * ASoC: wm8994: Fix setting rate_reg for wm8994-aif2Axel Lin2011-10-04
| | | | | | | | | | | | | | | | 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
* | ASoC: wm8995: Slightly optimize configure_clockAxel Lin2011-10-04
| | | | | | | | | | | | | | | | | | | | snd_soc_update_bits() will only write new register value if the old value is different from the new value. In additional, snd_soc_update_bits() returns 0 for no change. No need to read WM8995_CLOCKING_1 register before calling snd_soc_update_bits(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Slightly optimize configure_clockAxel Lin2011-10-04
| | | | | | | | | | | | | | | | | | | | snd_soc_update_bits() will only write new register value if the old value is different from the new value. In additional, snd_soc_update_bits() returns 0 for no change. No need to read WM8994_CLOCKING_1 register before calling snd_soc_update_bits(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: omap-pcm: Fix the no period wakeup implementationPeter Ujfalusi2011-10-04
| | | | | | | | | | | | | | | | | | | | | | After omap_request_dma the BLOCK_IRQ is enabled as default configuration for the channel. If we are requested for no period wakeup, we need to disable the BLOCK_IRQ in order to not receive any interrupts. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8988: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-04
| | | | | | | | | | | | | | | | 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: wm8971: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-04
| | | | | | | | | | | | | | | | 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: wm8711: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-10-04
| | | | | | | | | | | | | | | | 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: max98095 codec: Catch driver bugs for biquad channel nameRyan Mallon2011-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the biquad channel names to a separate array and iterate over it in max98095_get_bq_channel rather than duplicating the hardcoded channel names. Add an error message if an invalid channel is passed and check the error in the callers. Also added a BUILD_BUG_ON to ensure that the bq_mode_name and controls arrays are the same size. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: max98088 codec: Catch driver bugs for eq channel nameRyan Mallon2011-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the EQ channel names to a separate array and iterate over it in max98088_get_channel rather than duplicating the hardcoded channel names. Add an error message if an invalid channel is passed and check the error in the callers. Also added a BUILD_BUG_ON to ensure that the eq_mode_name and controls arrays are the same size. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add WM1811 supportMark Brown2011-10-04
| | | | | | | | | | | | | | | | The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | mfd: Add WM1811 supportMark Brown2011-10-04
| | | | | | | | | | | | | | | | | | The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
* | ASoC: Fix typo in 24.576MHz rate in WM5100Mark Brown2011-10-03
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Instantiate DAPM widgets before we do the DAI link initMark Brown2011-10-03
| | | | | | | | | | | | | | The DAI init function may want to do something that needs the widgets to be instantiated. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>