summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ASoC: Factor out DAPM widget power check into separate functionMark Brown2009-03-061-121/+137
| | | | | | | Essentially simple code motion to facilitate refactoring of the power decisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add SND_SOC_DAPM_PIN_SWITCH controls for exposing DAPM pinsMark Brown2009-02-281-0/+70
| | | | | | | | | On some systems it is desirable for control for DAPM pins to be provided to user space. This is the case with things like GSM modems which are controlled primarily from user space, for example. Provide a helper which exposes the state of a DAPM pin to user space for use in cases like this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Push the codec runtime storage into the card structureMark Brown2009-01-271-3/+3
| | | | | | | This is a further stage on the road to refactoring away the ASoC platform device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'topic/asoc' into next/asocTakashi Iwai2009-01-151-1/+2
|\
| * ASoC: Fix the power update function for snd_soc_dapm_value_muxPeter Ujfalusi2009-01-151-1/+2
| | | | | | | | | | | | | | | | Modify the check for the mux type to also handle the snd_soc_dapm_value_mux type in a same way as the snd_soc_dapm_mux. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-2.6.29' into for-2.6.30Mark Brown2009-01-091-75/+5Star
|\|
| * ASoC: Merge the soc_value_enum to soc_enum structPeter Ujfalusi2009-01-081-75/+5Star
| | | | | | | | | | | | | | | | | | Merge the recently introduced soc_value_enum structure to the soc_enum. The value based enums are still handled separately from the normal enum types, but with the merge some of the newly introduced functions can be removed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify pin names for DAPM pin status APIsMark Brown2009-01-091-5/+5
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: dapm: Allow explictly named mixer controlsIan Molton2009-01-071-11/+36
|/ | | | | | | | | | This patch allows you to define the mixer paths as having the same name as the paths they represent. This is required to support codecs such as the wm9705 neatly without extra controls in the alsa mixer. Signed-off-by: Ian Molton <ian@mnementh.co.uk>
* ASoC: New enum type: value_enumPeter Ujfalusi2009-01-051-3/+194
| | | | | | | | | | | | | This patch introduces a new enum type. In this enum type each enumerated items referred with a value. This new enum type can handle enums encoded in bitfield, or any other weird ways. twl4030 codec has several mux selection register, where the input/output mux is coded in a bitfield. With the normal enum type this type of mux can not be handled in a clean way. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Clean up kerneldoc warningsMark Brown2009-01-011-5/+5
| | | | | | Almost all parameters that have been misnamed in the comments. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Complain if we fail to create DAPM controlsMark Brown2008-12-181-1/+5
| | | | | | | This should never happen and it's helpful to identify the specific control that failed when it does happen. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Rename snd_soc_card to snd_soc_machineMark Brown2008-11-211-3/+3
| | | | | | | | | | | | | | | | | One of the issues with the ASoC v1 API which has been addressed in the ASoC v2 work that Liam Girdwood has done is that the ALSA card provided by ASoC is distributed around the ASoC structures. For example, machine wide data such as the struct snd_card are maintained as part of the CODEC data structure, preventing the use of multiple codecs. This has been addressed by refactoring the data structures so that all the data for the ALSA card is contained in a single structure snd_soc_card which replaces the existing snd_soc_machine and snd_soc_device. Begin the process of backporting this by renaming struct snd_soc_machine to struct snd_soc_card, better reflecting its function and bringing it closer to standard ALSA terminology. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ALSA: SOC: Fix setting codec register with debugfs filesystem merge errorTroy Kisky2008-11-041-6/+0Star
| | | | | | | | Call device_create_file only once in snd_soc_dapm_sys_add function. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC - restore removed variable declarationStephen Rothwell2008-10-311-0/+2
| | | | | | | | sound/soc/soc-dapm.c: In function 'snd_soc_dapm_sys_add': sound/soc/soc-dapm.c:828: error: 'ret' undeclared (first use in this function) Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: Remove DAPM restriction on mixer control name lengthsMark Brown2008-10-301-3/+8
| | | | | | | | As well as ensuring that UI-relevant parts of control names don't get truncated in the DAPM code this avoids conflicts in long control names that differ only at the end of a long string. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Allow setting codec register with debugfs filesystemTroy Kisky2008-10-301-25/+8Star
| | | | | | | | | | i.e. echo 6 59 >/sys/kernel/debug/soc-audio.0/codec_reg will set register 0x06 to a value of 0x59. Also, pop_time debugfs interface setup is moved so that it is setup in the same function as codec_reg Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'topic/asoc-next' into topic/asocTakashi Iwai2008-10-271-22/+0Star
|\
| * ALSA: ASoC: Remove snd_soc_dapm_connect_input()Mark Brown2008-10-161-22/+0Star
| | | | | | | | | | | | | | | | This was marked as deprecated in 2.6.27 and all users except for playpaq_wm8510 fixed in that release. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Fix debugfs_create_dir's error checking method for sound/soc/Zhaolei2008-10-171-1/+1
|/ | | | | | | | | debugfs_create_dir() returns NULL if an error occurs, returns -ENODEV when debugfs is not enabled in the kernel. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: update email address for Liam GirdwoodLiam Girdwood2008-10-131-3/+2Star
| | | | | | | | Update the contact information for Liam Girdwood in ASoC core and drivers as my old email address is no longer valid. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: Allow machine drivers to mark pins as not connectedMark Brown2008-10-131-0/+20
| | | | | | | | | | | | Add a new API call snd_soc_dapm_nc_pin() which allows machine drivers to mark pins as being permanently disabled. At present this is identical to snd_soc_dapm_disable_pin() except in terms of improving the internal documentation of machine drivers that use it. The intention is that in future it will be extended to provide additional features such as hiding controls that are only relevant to paths using the disconnected pin. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: add new param mux to dapm_mux_update_powerRichard Zhao2008-10-101-4/+4
| | | | | | | | | | | | | Function dapm_mux_update_power needs enum index mux and register mask value val as parameters, but it only has a parameter val, and uses it as both val and mux. snd_soc_test_bits(widget->codec, e->reg, mask, val) val is register mask here, e->texts[val] but val should be enum index mux here. This patch adds a new param mux to fix it. Signed-off-by: Richard Zhao <linuxzsc@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Convert DAPM pop time configuration to debugfsMark Brown2008-08-291-33/+20Star
| | | | | | | | | | | Pop time configuration is a debugging feature which shouldn't be used in normal operation so move it to debugfs where it is clearer. This also simplifies the code since debugfs provides standard facilities for exposing simple integer values to user space. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: convert use of uint to unsigned intJon Smirl2008-07-291-18/+18
| | | | | | | | | ASOC: convert use of uint to unsigned int Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Rename mask to max to reflect usageJon Smirl2008-07-291-7/+7
| | | | | | | | | | | | Most of the ASoC controls refer to the maximum value that can be set for a control as mask but there is no actual requirement for all bits to be set at the highest possible value making the name mask misleading. Change the code to use max instead. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Convert bitfields in ASoC into full int widthJon Smirl2008-07-291-21/+31
| | | | | | | | | | | Convert bitfields in ASoC into full int width. This is a simple mechanical conversion. Two places in the DAPM code were fixed to properly use mask. Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Export dapm_reg_event() fullyMark Brown2008-07-291-0/+1
| | | | | | | | | dapm_reg_event() is used by devices using SND_SOC_DAPM_REG() so needs to be exported to support building them as modules and prototyped to avoid sparse warnings and potential build issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: Factor PGA DAPM handling into mainMark Brown2008-07-171-18/+8Star
| | | | | | | This allows pre and post event hooks to be provided for PGA widgets. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: Refactor DAPM event handlerMark Brown2008-07-171-38/+41
| | | | | | | | | The DAPM event callback code has many layers of indentation, taking it over 80 columns. Refactor the code to give less indentation in order to avoid checkpatch issues on further changes and exploding indentation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC: Dump DAPM state for non-stream changesMark Brown2008-07-101-3/+9
| | | | | | | | | Explicit DAPM syncs are likely to cause DAPM state updates, as are mixer and mux configuration changes, so display the DAPM status after them too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Switch DAPM to use of standard DEBUG macroMark Brown2008-07-101-12/+10Star
| | | | | | | | | | | | | DAPM contains debug output controlled by a DAPM_DEBUG macro. Change this to be controlled by the standard DEBUG, dropping the custom dbg() macro as we go. Also fix the error printed when configuring an unknown pin to be an unconditionally displayed error rather than debug output. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: asoc: core - refactored DAPM pin control API.Liam Girdwood2008-07-101-30/+51
| | | | | | | | | | | | | Refactored snd_soc_dapm_set_endpoint() to snd_soc_dapm_enable_pin() and snd_soc_dapm_disable_pin(). Renamed snd_soc_dapm_sync_endpoints() to snd_soc_dapm_sync(). Renamed snd_soc_dapm_get_endpoint_status() to snd_soc_dapm_get_pin_status(). Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Fix warning from strict_strtoul()Mark Brown2008-07-101-1/+5
| | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Make pop/click debug wait times dynamically configurableMark Brown2008-07-101-14/+53
| | | | | | | | | | | DAPM supports adding a compile time configurable delay to the widget power sequences, aiding diagnosis of problems with pops and clicks being generated during them. This patch converts this to be configurable at run time via a sysfs file. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: ASoC: Add support for generic DAPM register modifier widgetJarkko Nikula2008-06-261-0/+19
| | | | | | | | | | This generic register modifier widget is for updating multiple codec register bits at once when the widget changes its power state. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] ASoC: Clarify API for bias configurationMark Brown2008-05-191-23/+21Star
| | | | | | | | | | | | | | | | | | | | | Currently the ASoC core configures the bias levels in the system using a callback on codecs and machines called 'dapm_event', passing it PCI style power levels as SNDRV_CTL_POWER_ constants. This is more obscure than it needs to be and has caused confusion to driver authors, especially given that DAPM is also performing power management. Address this by renaming the callback function to 'set_bias_level' and using constants explicitly representing the off, standby, pre-on and on states which DAPM transitions through. Also unexport the API for setting bias level: there are currently no in-tree users of this API other than the core itself and it is likely that the core would need to be extended to cater for any users. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] ASoC: Remove in-code changelogsMark Brown2008-05-191-5/+0Star
| | | | | | | | | The overwhelming majority just say 'initial version' anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - DAPM - Bulk route registrationMark Brown2008-05-191-15/+57
| | | | | | | | | | | | | | | | ASoC codecs and machine drivers that use DAPM routes all cut'n'paste a loop iterating over a null terminated array of routes. Factor out this into a bulk registration function, improving the error reporting for most users, and deprecate the old API to help out of tree users pick up the changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Graeme Gregory <graeme@openmoko.org> Cc: Frank Mandarino <fmandarino@endrelia.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - DAPM - Add bulk control registrationMark Brown2008-05-191-0/+27
| | | | | | | | | | | | | Most SoC drivers cut'n'paste a loop iterating over an array to register their DAPM controls. Provide a function they can call instead. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Graeme Gregory <graeme@openmoko.org> Cc: Frank Mandarino <fmandarino@endrelia.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] sound: fix export symbol typoStephen Rothwell2008-05-191-1/+1
| | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - DAPM - add hook to read state of DAPM widgetGraeme Gregory2008-05-191-0/+23
| | | | | | | | | | | This adds a hook to read the power state of a DAPM widget, I use this in the gta02 driver to expose certain DAPM widgets in the mixer for ease of audio routing. Signed-off-by: Graeme Gregory <graeme@openmoko.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - Include register in DAPM debug outputMark Brown2008-04-241-1/+1
| | | | | | | | When logging register changes in DAPM debug output include the register number. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] sound: replace remaining __FUNCTION__ occurencesHarvey Harrison2008-04-241-1/+1
| | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] soc - Report errors from snd_soc_dapm_set_endpoint()Mark Brown2008-04-241-1/+2
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] soc - Don't lock the codec list in snd_soc_dapm_new_widgets()Mark Brown2008-01-311-2/+0Star
| | | | | | | | | | | | | snd_soc_dapm_new_widgets() takes the codec lock when adding new widgets, causing lockdep warnings when applications later call down through ALSA to adjust controls. Since widgets are only added during probe this lock should be unneeded so don't take it. Thanks to Dmitry Baryshkov <dbaryshkov@gmail.com> for reporting this issue. Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - Add support for passing kcontrols with eventsLaim Girdwood2008-01-311-13/+27
| | | | | | Signed-off-by: Laim Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - Clean up tabsLiam Girdwood2008-01-311-2/+2
| | | | | | Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] soc - Fix power switching support for DAPM_SWITCH widgetsMilan plzik2008-01-311-2/+3
| | | | | | | Signed-off-by: Milan plzik <milan.plzik@gmail.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] ASoC TLV supportPhilipp Zabel2008-01-311-6/+8
| | | | | | | | | Add TLV support to ASoC. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>