aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-12-09ASoC: Add platform registration APIMark Brown1-0/+38
ASoC v2 allows platform drivers to instantiate independantly of the overall ASoC card. This API allows drivers to notify the core when they are registered. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09ASoC: Add DAI registration APIMark Brown1-0/+83
Add API calls to register and unregister DAIs with the core. Currently these APIs are ineffective. Since multiple DAIs for a given device are a common case bulk variants are provided. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09ASoC: Add card registration APIMark Brown1-0/+62
ASoC v2 allows cards, codecs and platforms to instantiate separately, with the overall ASoC device only being instantiated once all the required components have registered. As part of backporting Liam's work introduce an initial version of the card registration functions. At present these do nothing active and are internal only, they will be exposed to machine drivers after further backporting. Adding this now allows the datastructures used for dynamic card instantiation to be built up gradually. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03ASoC: Remove platform device from DAI suspend and resume operationsMark Brown1-4/+4
None of the DAIs use it except s3c2412-i2s which only uses it for dev_() printouts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03ASoC: Remove device from platform suspend and resume operationsMark Brown1-2/+2
None of the platforms are actually using the SoC device so remove it (only atmel actually has a suspend method). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03ASoC: Push debugfs files out of the snd_soc_device structureMark Brown1-32/+41
This is in preparation for the removal of struct snd_soc_device. The pop time configuration should really be a property of the card not the codec but since DAPM currently uses the codec rather than the card using the codec is fine for now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-02ASoC: Push platform registration down into the cardMark Brown1-19/+25
As part of the deprecation of snd_soc_device push the registration of the platform down into the card structure. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-02ASoC: Push workqueue data into snd_soc_cardMark Brown1-13/+20
ASoC v2 does not use the struct snd_soc_device at runtime, using struct snd_soc_card as the root of the card. Begin removing data from snd_soc_device by pushing the workqueue data into snd_soc_card, using a backpointer to the snd_soc_device to keep things going for the time being. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01ASoC: Annotate core removal functionMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01ASoC: Rename snd_soc_register_card() to snd_soc_init_card()Mark Brown1-3/+3
Currently ASoC card initialisation is completed by a function called snd_soc_register_card(). As part of the work to allow independant registration of cards, codecs and machines in ASoC v2 a new function of the same name has been added so rename the existing function to facilitate the merge of v2. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01Merge branch 'upstream' into topic/asocTakashi Iwai1-2/+2
2008-11-25ASoC: Clean up kernel-doc for snd_soc_dai_set_fmtQinghuang Feng1-1/+0
There is no argument named @clk_id in snd_soc_dai_set_fmt, remove its' comment. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24ASoC: Lower priority of resume work loggingMark Brown1-4/+4
Now that the ASoC resume has been punted to a workqueue for a release cycle without attracting bug reports it should be safe to make the log messages associated with it debug level, reducing noise and kernel size in production configurations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24ASoC: Remove DAI type informationMark Brown1-23/+8
DAI type information is only ever used within ASoC in order to special case AC97 and for diagnostic purposes. Since modern CPUs and codecs support multi function DAIs which can be configured for several modes it is more trouble than it's worth to maintain anything other than a flag identifying AC97 DAIs so remove the type field and replace it with an ac97_control flag. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21ASoC: Merge snd_soc_ops into snd_soc_dai_opsMark Brown1-37/+37
Liam Girdwood's ASoC v2 work avoids having two different ops structures for DAIs by merging the members of struct snd_soc_ops into struct snd_soc_dai_ops, allowing per DAI configuration for everything. Backport this change. This paves the way for future work allowing any combination of DAIs to be connected rather than having fixed purpose CODEC and CPU DAIs and only allowing CODEC<->CPU interconnections. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21ASoC: Rename snd_soc_card to snd_soc_machineMark Brown1-45/+45
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>
2008-11-05ASoC: Remove core version numberMark Brown1-1/+0
Rather than try to remember to keep the core version number updated (which hasn't been happening) just remove it. It was much more useful when ASoC was out of tree. Signed-off-by: Mark brown <broonie@opensource.wolfsonmicro.com>
2008-11-03Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linusTakashi Iwai1-2/+2
2008-11-03sound: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-2/+2
[stripped sound/isa/* changes, replaced with the next patch -- tiwai] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-31Merge branch 'topic/fix/asoc' into topic/asocTakashi Iwai1-1/+1
2008-10-30ASoC: Convert core to use standard debug print macrosMark Brown1-22/+14
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-10-30ASoC: Fix handling of DAPM suspend workMark Brown1-32/+23
Since we can query the playback stream power state directly we do not need to infer if it is powered up from the timer being scheduled. Doing this avoids problems that previously existed with streams being incorrectly determined to be powered up caused when the timer is scheduled when streams are closed after being partially set up. Reported-by: Nobin Mathew <nobin.mathew@gmail.com> Reported-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-10-30ASoC: Allow setting codec register with debugfs filesystemTroy Kisky1-3/+113
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>
2008-10-30ALSA: ASoC: Fix mono controls after conversion to support full int masksMark Brown1-1/+1
When ASoC was converted to support full int width masks SOC_SINGLE_VALUE() omitted the assignment of rshift, causing the control operatins to report some mono controls as stereo. This happened to work some of the time due to a confusion between shift and min in snd_soc_info_volsw(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: ASoC: update email address for Liam GirdwoodLiam Girdwood1-3/+2
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>
2008-09-09ALSA: ASoC: Use codec digital mute when stopping playbackMark Brown1-0/+6
Muting the DAC masks artefacts introduced as the digital stream shuts down, for example when the input stops being clocked. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-29ALSA: ASoC: convert use of uint to unsigned intJon Smirl1-24/+24
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>
2008-07-29ALSA: ASoC: Rename mask to max to reflect usageJon Smirl1-10/+10
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>
2008-07-29ALSA: ASoC: Convert bitfields in ASoC into full int widthJon Smirl1-34/+52
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>
2008-07-29ALSA: ASoC: Allow codecs to override register displayMark Brown1-3/+23
Some codecs have unusual features in their register maps such as very large registers representing arrays of coefficients. Support these codecs in the register cache sysfs file by allowing them to provide a function register_display() overriding the default output for register contents. Also ensure that we don't overflow PAGE_SIZE while writing out the register dump. 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>
2008-07-10ALSA: asoc: core - add Digital Audio Interface (DAI) control functions.Liam Girdwood1-8/+132
This patch adds several functions for DAI control and config and replaces the current method of calling function pointers within the DAI struct. 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>
2008-07-10ALSA: asoc: core - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.Liam Girdwood1-25/+25
This patch series merges struct snd_soc_codec_dai and struct snd_soc_cpu_dai into struct snd_soc_dai in preparation for further ASoC v2 patches. This merger removes duplication in both DAI structures and simplifies the API for other users. 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>
2008-06-18ALSA: ASoC: fix PM=n buildRandy Dunlap1-0/+2
Fix sound/soc build failure when CONFIG_PM=n: linux-next-20080617/sound/soc/soc-core.c:829: error: 'soc_resume_deferred' undeclared (first use in this function) soc3.out:make[3]: *** [sound/soc/soc-core.o] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.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>
2008-06-16ALSA: ASoC: Don't block system resumeAndy Green1-3/+43
On OpenMoko soc-audio resume is taking 700ms of the whole resume time of 1.3s, dominated by writes to the codec over I2C. This patch shunts the resume guts into a workqueue which then is done asynchronously. The "card" is locked using the ALSA power state APIs as suggested by Mark Brown. [Added fix for race with resume to suspend and fixed a couple of nits from checkpatch -- broonie.] Signed-off-by: Andy Green <andy@openmoko.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>
2008-06-13ALSA: ASoC: Pass the DAI being configured into CPU DAI probe and removeMark Brown1-3/+3
This allows per-DAI initialisation to be done by the CPU DAI drivers. 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>
2008-05-29[ALSA] ASoC: Add SOC_DOUBLE_S8_TLV control typeMark Brown1-0/+72
The SOC_DOUBLE_S8_TLV control type was originally implemented in the UDA1380 driver by Philipp Zabel and was moved into the core by me. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-19[ALSA] ASoC: core checkpatch cleanupsMark Brown1-46/+54
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>
2008-05-19[ALSA] ASoC: Clarify API for bias configurationMark Brown1-12/+13
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>
2008-05-19[ALSA] ASoC: Remove in-code changelogsMark Brown1-4/+0
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>
2008-04-24[ALSA] sound: fix platform driver hotplug/coldplugKay Sievers1-0/+2
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable sound platform drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: more drivers, registration fixes] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Fix lockdep warning in ASoC machine probeMark Brown1-2/+5
Don't take the codec mutex during machine probe until we have registered with ALSA, fixing a lockdep warning reported by Dmitry Baryshkov. 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>
2008-01-31[ALSA] soc - Ensure PCMs are suspendedLiam Girdwood1-0/+5
This fixes a bug whereby PCMs were not being suspended when the rest of the audio subsystem was suspended. 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>
2008-01-31[ALSA] soc - Add D1 power event to power down event sequenceLiam Girdwood1-0/+8
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>
2008-01-31[ALSA] ASoC TLV supportPhilipp Zabel1-28/+38
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>
2008-01-31[ALSA] soc - Add device level DAPM eventLiam Girdwood1-12/+11
Added a device level dapm event so that both the machine and codec are informed when dapm events occur. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.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>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai1-1/+0
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day1-1/+1
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-16[ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai1-20/+0
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16[ALSA] ASoC AC97 device reg bugfixLiam Girdwood1-3/+15
This patch fixes a bug whereby AC97 bus device data was being clobbered when AC97 codecs using the generic ac97_codec.c driver were being registered. Codecs that didn't use the generic driver were unaffected (e.g. WM9712, WM9713). Changes:- o Add new AC97 codec class for custom (or need bus dev registration) AC97 codecs. o Only register/deregister this custom codec device with the AC97 bus. The generic AC97 driver already does this for generic codec devices. This may be related to bug #3038 :- https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3038 Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] soc - ASoC 0.13 core changesLiam Girdwood1-633/+148
This patch updates the ASoC core to the new DAI matching and clocking API in version 0.13 Changes:- o Removed DAI capabilities matching code in favour of manual matching in the machine drivers. o Added DAI operations for codec and CPU interfaces. o Removed config_sysclk() function and struct snd_soc_clock_info. No longer needed as clocking is now configured manually in the machine drivers. Also removed other clocking data from structures. o Added machine driver prepare callback. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>