summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: core: Fix obscure leak of runtime arrayMark Brown2012-03-151-4/+4
| | | | | | | | | We're currently not freeing card->rtd in cases where the card is unregistered before being instantiated - convert it to devm_kzalloc() to make sure that happens. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: core: missing set_fmt should not be complaintShawn Guo2012-03-081-5/+6
| | | | | | | | Not having a DAI link set_fmt operation is perfectly normal and should not be complaint. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add platform component mutexLiam Girdwood2012-03-061-0/+1
| | | | | | | | Add mutex support for platform IO operations. e.g. can be used for platform DAPM widget IO ops. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Log a warning when machines use soc-audioMark Brown2012-03-021-0/+4
| | | | | | | | | | snd_soc_register_card() has been available and strongly preferred since 2.6.38 but we're still seeing new drivers using it and the conversion rate for older machines has been low. Help address both issues by logging a warning when the soc-audio device probes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: core: cleanup platform debugfs on probe failure.Liam Girdwood2012-03-021-0/+1
| | | | | | | Make sure we cleanup the platform debugfs when probe fails. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Don't overwrite .poweroff in snd_soc_pm_opsViresh Kumar2012-02-241-1/+5
| | | | | | | | | | SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the second one overwrites the first one, this is not the correct way. Fix this by expanding SET_SYSTEM_SLEEP_PM_OPS in our structure. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add support for masking out parts of coefficient blocksMark Brown2012-02-211-7/+67
| | | | | | | | | | | | | | | | Chip designers frequently include things like the enable and disable controls for algorithms in the register blocks which also hold the coefficients. Since it's desirable to split out the enable/disable control from userspace the plain SND_SOC_BYTES() isn't optimal for these devices. Add a SND_SOC_BYTES_MASK() which allows a bitmask from the first word of the block to be excluded from the control. This supports the needs of devices I've looked at and lets us have a reasonably simple API. Further controls can be added in future if that's needed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: core: Add SND_SOC_BYTES control for coefficient blocksMark Brown2012-02-211-0/+49
| | | | | | | | | | | | | | | | | | Allow devices to export blocks of registers to the application layer, intended for use for reading and writing coefficient data which can't usefully be worked with by the kernel at runtime (for example, due to requiring complex and expensive calculations or being the results of callibration procedures). Currently drivers are using platform data to provide configurations for coefficient blocks which isn't at all convenient for runtime management or configuration development. Currently only devices using regmap are supported, an error will be generated for any attempt to work with a byte control on a non-regmap device. There's no fundamental block to other devices so support could be added if required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: soc-core: Show the returned values on error messagesFabio Estevam2012-02-171-17/+22
| | | | | | | | | Showing the returned values on error messages is useful information. While at it, use pr_err/pr_warn whenever possible. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: Implement and instantiate DAI widgetsMark Brown2012-02-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow us to do smarter things with DAI links create DAPM widgets which directly represent the DAIs in the DAPM graph. These are automatically created from the DAIs as we probe the card with references held in both directions between the widget and the DAI. The widgets are not made available for direct instantiation by drivers, they are created automatically from the DAIs. Drivers should be updated to create stream routes using DAPM maps rather than by annotating AIF and DAC widgets with streams. In order to ease transition to this model from existing drivers we automatically create DAPM routes between the DAI widgets and the existing stream widgets which are started and stopped by the DAI widgets, though the old stream handling mechanism is still in place. This also has the nice effect of removing non-DAPM devices as any device with a DAI acquires a widget automatically which will allow future simplifications to the core DAPM logic. The intention is that in future the AIF and DAI widgets will gain the ability to interact such that we are able to manage activity on individual channels independantly rather than powering up and down the entire AIF as we do currently. Currently we only generate these for CODECs, mostly as I have no systems with non-CODEC DAPM to integrate with. It should be a simple matter of programming to add the additional hookup for these. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: dapm: Constify lots of names that are never modifiedMark Brown2012-02-171-1/+1
| | | | | | | | Neater and avoids warnings when used in other places where const strings are desired. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: dapm: Supply the DAI and substream when calling stream eventsMark Brown2012-02-171-14/+16
| | | | | | | | | | | | | In order to allow us to do something smarter than iterate through widgets doing strcmp() to work out what to power up for stream events change the interface used to generate them to be based on the combination of a DAI and a stream direction rather than just a simple string identifying the stream. At some point we'll probably want a set of channels too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: core: add platform DAPM debugfs supportSebastien Guiriec2012-02-151-0/+32
| | | | | | | Allow platform widgets to be visible in debugfs like codec widgets. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Convert CODEC debugfs init to use dev_warn()Liam Girdwood2012-02-151-4/+2Star
| | | | | | | | Update the codec debugfs initialisation to use dev_warn() instead of printk(KERN_WARNING). Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'v3.3-rc3' as we've got several bugfixes in there which areMark Brown2012-02-091-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | colliding annoyingly with development. Linux 3.3-rc3 .. the number of the half-beast? Conflicts: sound/soc/codecs/wm5100.c sound/soc/codecs/wm8994.c
| * ASoC: core: Better support for idle_bias_off suspend ignoresMark Brown2012-01-311-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an idle_bias_off device is in any state other than off then it is still active for some reason (typically a low power function such as accessory detection). This wasn't an issue when the feature was implemented as we always went to _ON for any active function, subsequent power improvements have changed things. With the modern way of doing things we should overhaul the infrastructure to allow devices to explicitly take references for these functions but that's a much more invasive change and will require driver updates to deploy, this will bring the framework into line with the existing driver set before we do that work. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: core: Allow CODECs to set ignore_pmdown_time in the driver structMark Brown2012-02-091-0/+1
| | | | | | | | | | | | | | This is usually not a use case dependant flag anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood2012-02-041-38/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently ASoC can only add kcontrols using codec and platform component device handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for SoC card machine drivers too. This allows the kcontrol to have a direct handle to the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily get it's private data. This change makes snd_soc_add_controls() static and wraps it in the folowing calls (card and dai are new) :- snd_soc_add_card_controls() snd_soc_add_codec_controls() snd_soc_add_dai_controls() snd_soc_add_platform_controls() This patch also does a lot of small mechanical changes in individual codec drivers to replace snd_soc_add_controls() with snd_soc_add_codec_controls(). It also updates the McBSP DAI driver to use snd_soc_add_dai_controls(). Finally, it updates the existing machine drivers that register controls to either :- 1) Use snd_soc_add_card_controls() where no direct codec control is required. 2) Use snd_soc_add_codec_controls() where there is direct codec control. In the case of 1) above we also update the machine drivers to get the correct component data pointers from the kcontrol (rather than getting the machine pointer via the codec pointer). Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Support suspend to diskMark Brown2012-01-311-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | Use the same pm_ops for all system suspend and resume paths. This isn't ideal for suspend to disk with older CODECs as we'll suspend and then resume the CODEC before powering off all of which takes a long time due to VMID ramps but it's very simple to implement and for modern CODECs the overhead should be minimal. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Use regmap update bits operation for drivers using regmapMark Brown2012-01-211-10/+15
| | | | | | | | | | | | | | | | | | If a driver is using regmap directly ensure that we're coherent with non-ASoC register updates by using the regmap API directly to do our read/modify/write cycles. This will bypass the ASoC cache but drivers using regmap directly should not be using the ASoC cache. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core - Improve card registration error messaging for large DAI links.Liam Girdwood2012-01-201-3/+5
|/ | | | | | | | Print out the offending DAI link entry when a naming error occurs. Makes thing easier to debug for machines with a large number of DAI links. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core - Free platform DAPM context at platform removal.Liam Girdwood2012-01-161-0/+4
| | | | | | | | Fix platform removal by freeing the platform DAPM resources and remove it from the DAPM list. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Dynamically allocate the rtd device for a non-empty release()Mark Brown2012-01-101-19/+25
| | | | | | | The device model needs a release() function so it can free devices when they become dereferenced. Do that for rtds. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Declare soc_new_pcm() properlyMark Brown2011-12-221-2/+0Star
| | | | | | | | Ensure that everything is seeing the same declaration by moving it to a header file rather than putting the declaration in soc-core.c Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Allow DAI links to be specified using device tree nodesStephen Warren2011-12-221-7/+57
| | | | | | | | | | | | | | | | | DAI link endpoints and platform (DMA) devices are currently specified by name. When instantiating sound cards from device tree, it may be more convenient to refer to these devices by phandle in the device tree, and for code to describe DAI links using the "struct device_node *" ("of_node") those phandles map to. This change adds new fields to snd_soc_dai_link which can "name" devices using of_node, enhances soc_bind_dai_link() to allow binding based on of_node, and enhances snd_soc_register_card() to ensure that illegal combinations of name and of_node are not used. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add utility to parse DAPM routes from device treeStephen Warren2011-12-201-0/+57
| | | | | | | | | Implement snd_soc_of_parse_audio_routing(), a utility function that can parses a simple DAPM route table from device tree.The machine driver specifies the DT property to use, since this is binding-specific. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add utility to set a card's name from device treeStephen Warren2011-12-201-0/+25
| | | | | | | | | Implement snd_soc_of_parse_card_name(), a utility function that sets a card's name from device tree. The machine driver specifies the DT property to use, since this is binding-specific. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix an obvious copy paste error in an error messageLothar Waßmann2011-12-111-1/+1
| | | | | | | The message was obviously copied from soc_init_codec_debugfs() Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Refactor some conditions and loop in soc_bind_dai_link()Stephen Warren2011-12-091-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Transform some loops from: for_each(x) { if (f(x)) { work_on(x); } } to new structure: for_each(x) { if (!f(x)) continue; work_on(x); } This will allow future modification of f(x) with less impact to the code. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> 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: Fix CODEC enumeration for auto_nc_codec_pinsMark Brown2011-11-271-1/+1
| | | | | | | | We need to enumerate all the CODECs that are part of the card we're instantiating, not all the CODECs that are in the system as the system may have multiple cards. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Implement fully_routed card propertyStephen Warren2011-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | A card is fully routed if the DAPM route table describes all connections on the board. When a card is fully routed, some operations can be automated by the ASoC core. The first, and currently only, such operation is described below, and implemented by this patch. Codecs often have a large number of external pins, and not all of these pins will be connected on all board designs. Some machine drivers therefore call snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core never to activate them. However, when a card is fully routed, the information needed to derive the set of unused pins is present in card->dapm_routes. In this case, have the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused codec pin. This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-231-0/+6
|\
| * ASoC: skip resume of soc-audio devices without codecsEric Miao2011-11-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where there is no working codec on the soc-audio devices, and snd_soc_suspend() will skip such device when suspending. Yet its counterpart snd_soc_resume() does not check this, causing complaints about spinlock lockup: [ 176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8 [ 176.732539] [<80014a14>] (unwind_backtrace+0x0/0xec) from [<805b3fc8>] (dump_stack+0x20/0x24) [ 176.741082] [<805b3fc8>] (dump_stack+0x20/0x24) from [<80322208>] (do_raw_spin_lock+0x118/0x158) [ 176.749882] [<80322208>] (do_raw_spin_lock+0x118/0x158) from [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) [ 176.759723] [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) from [<8002a020>] (__wake_up+0x2c/0x5c) [ 176.768781] [<8002a020>] (__wake_up+0x2c/0x5c) from [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) [ 176.777666] [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) from [<8004ee20>] (process_one_work+0x2e8/0x50c) [ 176.787334] [<8004ee20>] (process_one_work+0x2e8/0x50c) from [<8004fd08>] (worker_thread+0x1c8/0x2e0) [ 176.796566] [<8004fd08>] (worker_thread+0x1c8/0x2e0) from [<80053ec8>] (kthread+0xa4/0xb0) [ 176.804843] [<80053ec8>] (kthread+0xa4/0xb0) from [<8000ea70>] (kernel_thread_exit+0x0/0x8) Signed-off-by: Eric Miao <eric.miao@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | 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: Fix prefixing of DAPM controlsMark Brown2011-10-181-3/+3
| | | | | | | | We don't want to clear the prefix while we're creating the DAPM controls for the device as the prefix is applied during control creation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Instantiate card widgets immediatelyMark Brown2011-10-111-0/+2
| | | | | | This ensures they are available prior to the card late_probe(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ensure all DAPM widgets are instantiated with the cardMark Brown2011-10-081-0/+2
| | | | | | Specifically for the widgets added by machine driver late probe functions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Suppress early calls to snd_soc_dapm_sync()Mark Brown2011-10-081-0/+1
| | | | | | | | | | 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>
* ASoC: core: Combine snd_soc_put_volsw/put_volsw_2r functionsPeter Ujfalusi2011-10-051-47/+19Star
| | | | | | | | | | 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-051-43/+13Star
| | | | | | | 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-051-37/+3Star
| | | | | | | 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: Do DAPM power checks only for widgets changed since last runMark Brown2011-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | 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: Instantiate DAPM widgets before we do the DAI link initMark Brown2011-10-031-3/+3
| | | | | | | 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>
* ASoC: Allow DAI formats to be specified in the dai_linkMark Brown2011-09-281-0/+21
| | | | | | | | | | | | | | | | For almost all machines the DAI format is a constant, always set to the same thing. This means that not only should we normally set it on init rather than in hw_params() (where it has been for historical reasons) we should also allow users to configure this by setting a variable in the dai_link structure. The combination of these two will make many machine drivers even more data driven. Implement a new dai_fmt field in the dai_link doing just that. Since 0 is a valid value for many format flags and we need to be able to tell if the field is actually set also add one to all the values used to configure formats. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.1' into for-3.2Mark Brown2011-09-211-3/+15
|\
| * ASoC: Ensure we generate a driver nameMark Brown2011-09-211-3/+15
| | | | | | | | | | | | | | | | | | | | Commit 873bd4c (ASoC: Don't set invalid name string to snd_card->driver field) broke generation of a driver name for all ASoC cards relying on the automatic generation of one. Fix this by using the old default with spaces replaced by underscores. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: Remove unused step size from debugfs CODEC write functionMark Brown2011-09-091-4/+0Star
| | | | | | | | | | | | | | We don't use the step size so there's no need to work it out. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Allow source specification for CODEC level sysclkMark Brown2011-08-311-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to PLLs/FLLs some modern CODECs provide selectable system clock sources. When the clock is the clock for a DAI we do not usually need to identify which clock is being configured so can use clk_id for the source clock but with CODEC wide system clocks we will need to specify both the clock being configured and the source. Add a source argument to the CODEC driver set_sysclk() operation to reflect this. As this operation is not as widely used as the DAI set_sysclk() operation the change is not very invasive. We probably ought to go and make the same alternation for DAIs at some point. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: soc_codec_reg_show use snd_soc_codec_readable_registerLars-Peter Clausen2011-08-311-1/+1
| | | | | | | | | | | | | | | | Use snd_soc_codec_readable_register instead of open-coding 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>