08 Apr, 2011
1 commit
-
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
Fix common misspellings
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
24 Mar, 2011
1 commit
-
This stops code that handles widgets generically from attempting to access
registers for these widgets.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
Cc: stable@kernel.org
27 Jan, 2011
1 commit
-
Allows drivers to distinguish which subsequence is being notified when
they get called back.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
25 Jan, 2011
1 commit
-
We have zero users for PGA controls and the core support for them was
removed a while ago so no point in cut'n'pasting them into new macros,
even if it's too much hassle to update the existing ones.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
19 Jan, 2011
2 commits
-
Many modern devices have features such as DC servos which take time to start.
Currently these are handled by per-widget events but this makes it difficult
to paralleise operations on multiple widgets, meaning delays can end up
being needlessly serialised. By providing a callback to drivers when all
widgets of a given type have been handled during a DAPM sequence the core
allows drivers to start operations separately and wait for them to complete
much more simply.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
With larger devices there may be many widgets of the same type in series
in an audio path. Allow drivers to specify an additional level of ordering
within each widget type by adding a subsequence number to widgets and then
splitting operations on widgets so that widgets of the same type but
different sequence numbers are processed separately. A typical example
would be a supply widget which requires that another widget be enabled
to provide power or clocking.SND_SOC_DAPM_PGA_S() and SND_SOC_DAPM_SUPPLY_S() macros are provided
allowing this to be used with PGAs and supplies as these are the most
commonly affected widgets.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
18 Dec, 2010
1 commit
-
This new type is a virtual version of snd_soc_dapm_mux. It is used
when a backing register value is not necessary for deciding which
input path to connect. A simple virtual enumeration control e.g.
SOC_DAPM_ENUM_VIRT() can be exposed to userspace which will be used
to choose which path to connect.The snd_soc_dapm_virt_mux type ensures that during the initial
path setup, the first (which is also the default) input path will
be connected.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
17 Dec, 2010
1 commit
-
Attempt to minimise audible effects from mixer and mux updates by
implementing the actual register changes between powering down widgets
that have become unused and powering up widgets that are newly used.This means that we're making the change with the minimum set of widgets
powered, that the input path is connected when we're powering up widgets
(so things like DC offset correction can run with their signal active)
and that we bring things down to cold before switching away. Since
hardware tends to be designed for the power on/off case more than for
dynamic reconfiguration this should minimise pops and clicks during
reconfiguration while active.Signed-off-by: Mark Brown
Acked-by: Peter Ujfalusi
Tested-by: Peter Ujfalusi
Acked-by: Liam Girdwood
16 Dec, 2010
3 commits
-
Power change event like stream start/stop or kcontrol change in a
cross-device path originates from one device but codec bias and widget power
changes must be populated to another devices on that path as well.This patch modifies the dapm_power_widgets so that all the widgets on a
sound card are checked for a power change, not just those that are specific
to originating device. Also bias management is extended to check all the
devices. Only exception in bias management are widgetless codecs whose bias
state is changed only if power change is originating from that context.DAPM context test is added to dapm_seq_run to take care of if power sequence
extends to an another device which requires separate register writes.Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Decoupling widgets from DAPM context is required when extending the ASoC
core to cross-device paths. Even the list of widgets are now kept in
struct snd_soc_card, the widget listing in sysfs and debugs remain sorted
per device.This patch makes possible to build cross-device paths but does not extend
yet the DAPM to handle codec bias and widget power changes of an another
device.Cross-device paths are registered by listing the widgets from device A in
a map for device B. In case of conflicting widget names between the devices,
a uniform name prefix is needed to separate them. See commit ead9b91
"ASoC: Add optional name_prefix for kcontrol, widget and route names" for
help.An example below shows a path that connects MONO out of A into Line In of B:
static const struct snd_soc_dapm_route mapA[] = {
{"MONO", NULL, "DAC"},
};static const struct snd_soc_dapm_route mapB[] = {
{"Line In", NULL, "MONO"},
};Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Decoupling DAPM paths from DAPM context is a first prerequisite when
extending ASoC core to cross-device paths. This patch is almost a nullop and
does not allow to construct cross-device setup but the path clean-up part in
dapm_free_widgets is prepared to remove cross-device paths between a device
being removed and others.Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
15 Dec, 2010
1 commit
-
There are no users of these and it's not clear what they would do given
the mono flow modelling which DAPM does. If need arises we can add them
again.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
14 Dec, 2010
1 commit
-
In some cases it was not possible to follow the appropiate power
ON/OFF sequence like in cases where the PGA needs to be enabled
before the driver and disabled before the PGA for pop reduction.Add a widget to support output driver (speaker, haptic, vibra, etc)
drivers where power ON/OFF ordering is important.Signed-off-by: Margarita Olaya Cabrera
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
22 Nov, 2010
1 commit
-
There is no need anymore to include soc.h in soc-dapm.h and soc-dai.h as
drivers are converted to include only soc.h.Thanks to Lars-Peter Clausen for pointing out the issue.
Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
06 Nov, 2010
2 commits
-
Based on discussion the dapm_pop_time in debugsfs should be per card rather
than per device. Single pop time value for entire card is cleaner when the
DAPM sequencing is extended to cross-device paths.debugfs/asoc/{card->name}/{codec dir}/dapm_pop_time
->
debugfs/asoc/{card->name}/dapm_pop_timeSigned-off-by: Jarkko Nikula
Signed-off-by: Mark Brown -
Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
required when developing ASoC further. Such as for other ASoC components to
have DAPM widgets or when extending DAPM to handle cross-device paths.This patch decouples DAPM related variables from struct snd_soc_codec and
moves them to new struct snd_soc_dapm_context that is used to encapsulate
DAPM context of a device. ASoC core and API of DAPM functions are modified
to use DAPM context instead of codec.This patch does not change current functionality and a large part of changes
come because of structure and internal API changes.Core implementation is from Liam Girdwood with some
minor core changes, codecs and machine driver conversions from
Jarkko Nikula .Signed-off-by: Liam Girdwood
Signed-off-by: Jarkko Nikula
Cc: Nicolas Ferre
Cc: Manuel Lauss
Cc: Mike Frysinger
Cc: Cliff Cai
Cc: Kevin Hilman
Cc: Ryan Mallon
Cc: Timur Tabi
Cc: Sascha Hauer
Cc: Lars-Peter Clausen
Cc: Arnaud Patard (Rtp)
Cc: Wan ZongShun
Cc: Eric Miao
Cc: Jassi Brar
Cc: Daniel Gloeckner
Cc: Kuninori Morimoto
Signed-off-by: Mark Brown
06 Sep, 2010
1 commit
-
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
12 Aug, 2010
1 commit
-
This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.struct snd_soc_codec ---> struct snd_soc_codec (device data)
+-> struct snd_soc_codec_driver (driver data)struct snd_soc_platform ---> struct snd_soc_platform (device data)
+-> struct snd_soc_platform_driver (driver data)struct snd_soc_dai ---> struct snd_soc_dai (device data)
+-> struct snd_soc_dai_driver (driver data)struct snd_soc_device ---> deleted
This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.Other notable multi-component changes:-
* Stream operations now de-reference less structures.
* close_delayed work() now runs on a DAI basis rather than looping all DAIs
in a card.
* PM suspend()/resume() operations can now handle N CODECs and Platforms
per sound card.
* Added soc_bind_dai_link() to bind the component devices to the sound card.
* Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
DAI link components.
* sysfs entries can now be registered per component per card.
* snd_soc_new_pcms() functionailty rolled into dai_link_probe().
* snd_soc_register_codec() now does all the codec list and mutex init.This patch changes the probe() and remove() of the CODEC drivers as follows:-
o Make CODEC driver a platform driver
o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
o Removed all static codec pointers (drivers now support > 1 codec dev)
o snd_soc_register_pcms() now done by core.
o snd_soc_register_dai() folded into snd_soc_register_codec().CS4270 portions:
Acked-by: Timur TabiSome TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan MallonTI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi
Signed-off-by: Janusz Krzysztofik
Signed-off-by: Jarkko NikulaSamsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi
Signed-off-by: Joonyoung Shim
Signed-off-by: Kyungmin Park
Reviewed-by: Jassi Brar
Signed-off-by: Seungwhan YounMPC8610 and PPC fixes.
Signed-off-by: Timur Tabii.MX fixes and some core fixes.
Signed-off-by: Sascha HauerJ4740 platform fixes:-
Signed-off-by: Lars-Peter ClausenCC: Tony Lindgren
CC: Nicolas Ferre
CC: Kevin Hilman
CC: Sascha Hauer
CC: Atsushi Nemoto
CC: Kuninori Morimoto
CC: Daniel Gloeckner
CC: Manuel Lauss
CC: Mike Frysinger
CC: Arnaud Patard
CC: Wan ZongShunAcked-by: Mark Brown
Signed-off-by: Liam Girdwood
31 May, 2010
1 commit
-
Some systems codecs need to configure some registers before and after
powering down some of their part. As a convenience add a macro for that.Signed-off-by: Arnaud Patard
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
10 May, 2010
2 commits
-
Some devices can usefully run audio while the Linux system is suspended.
One of the most common examples is smartphone systems, which are normally
designed to allow audio to be run between the baseband and the CODEC
without passing through the CPU and so can suspend the CPU when on a
voice call for additional power savings.Support such systems by providing an API snd_soc_dapm_ignore_suspend().
This can be used to mark DAPM endpoints as not being sensitive to
system suspend. When the system is being suspended paths between
endpoints which are marked as ignoring suspend will be kept active.
Both source and sink must be marked, and there must already be an
active path between the two endpoints prior to suspend.When paths are active over suspend the bias management will hold the
device bias in the ON state. This is used to avoid suspending the
CODEC while it is still in use.Tested-by: Peter Ujfalusi
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
We now manage suspend within the main power analysis rather than by
flipping the state of widgets.Tested-by: Peter Ujfalusi
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
16 Mar, 2010
2 commits
-
Allow pins to be forced on regardless of their power state. This is
intended for use with microphone bias supplies which need to be
enabled in order to support microphone detection - in systems without
appropriate hardware leaving the microphone unbiased when not in use
saves power.The force done at power check time in order to avoid disrupting other
power detection logic.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
06 Mar, 2010
1 commit
-
The flag is no longer used in the code so it just wastes a bit.
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
25 Jan, 2010
1 commit
-
Many macros from include/sound/soc-dapm.h take an array and a number of
elements in it as arguments, whereas most users use static arrays and use
"x, ARRAY_SIZE(x)" as arguments. This patch adds simplified versions of
those macros, calling ARRAY_SIZE() internally.Signed-off-by: Guennadi Liakhovetski
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
06 Oct, 2009
1 commit
-
Sometimes it is desirable to have a mux which does not reflect any
direct register configuration but which will instead only have an
effect implicitly (for example, as a result of changing which parts
of the device are powered up). Provide a virtual mux for this purpose.Signed-off-by: Mark Brown
09 Sep, 2009
1 commit
-
Some chips with complex internal supply (particularly clocking)
arragements may have multiple options for some of the supply
connections. Since these don't affect user-visible audio routing
the expectation would be that they would be managed automatically
by one of the drivers.Support these users by allowing routes to have a connected function
which is queried before the connectedness of the path is checked as
normal. Currently this is only done for supplies, other widgets
could be supported but are not currently since the expectation for
them is that audio routing will be under the control of userspace.Signed-off-by: Mark Brown
25 Aug, 2009
1 commit
22 Aug, 2009
1 commit
-
Currently when built with DEBUG DAPM will dump information about
the power state decisions it is taking for each widget to dmesg.
This isn't an ideal way of getting the information - it requires
a kernel build to turn it on and off and for large hub CODECs the
volume of information is so large as to be illegible. When the
output goes to the console it can also cause a noticable impact
on performance simply to print it out.Improve the situation by adding a dapm directory to our debugfs
tree containing a file per widget with the same information in
it. This still requires a decision to build with debugfs support
but is easier to navigate and much less intrusive.In addition to the previously displayed information active streams
are also shown in these files.Signed-off-by: Mark Brown
18 Aug, 2009
1 commit
-
Currently DAPM interfaces with the audio streams to and from the
processor at the DAC and ADC widgets. As the digital capabilities
of parts increases this is becoming a less and less able to meet
the needs of parts.To meet the needs of these devices create new widgets interfacing
with the TDM bus but not integrated into any other functionality.
Audio can then be routed to and from these widgets using existing
routing widgets.A slot number is provided in the definition but this is currently
not used yet. This is intended to support devices which can use
more than one TDM slot on a single interface.Signed-off-by: Mark Brown
24 Jun, 2009
1 commit
-
Ensure that the audio subsystem is powered down cleanly when the system
shuts down by providing a shutdown operation. This ensures that all the
components have been returned to an off state cleanly which should avoid
audio issues from partially charged capacitors or noise on digital inputs
if the system is restarted quickly.Signed-off-by: Mark Brown
Tested-by: Ben Dooks
18 May, 2009
2 commits
-
Rather than managing the bias level of the system based on if there is
an active audio stream manage it based on there being an active DAPM
widget. This simplifies the code a little, moving the power handling
into one place, and improves audio performance for bypass paths when no
playbacks or captures are active.Signed-off-by: Mark Brown
-
DAPM has always applied any changes to the power state of widgets as soon
as it has determined that they are required. Instead of doing this store
all the changes that are required on lists of widgets to power up and
down, then iterate over those lists and apply the changes. This changes
the sequence in which changes are implemented, doing all power downs
before power ups and always using the up/down sequences (previously they
were only used when changes were due to DAC/ADC power events). The error
handling is also changed so that we continue attempting to power widgets
if some changes fail.The main benefit of this is to allow future changes to do optimisations
over the whole power sequence and to reduce the number of walks of the
widget graph required to check the power status of widgets.Signed-off-by: Mark Brown
23 Apr, 2009
1 commit
-
Many modern CODECs have shared resources on chip which must be enabled
for portions of the chip to work but which can be disabled at other times
in order to achieve power savings. Examples of such resources include
power supplies and some internal clocks.Since these widgets are dependencies for the audio path but do not carry
audio signals they require slightly different handling to most widgets -
they do not contribute to the audio path and so should not be counted as
either inputs or outputs during path walks.Cases where one supply provides a supply for another will require
additional work. There is also room for more optimisation of the graph
walking to avoid repeated checks for the same thing.Signed-off-by: Mark Brown
21 Apr, 2009
1 commit
-
Rather than having switch statements at point of use make the DAPM
power check a member of the widget structure and set it when we
instantiate the widget.Signed-off-by: Mark Brown
13 Apr, 2009
1 commit
-
Signed-off-by: Mark Brown
01 Mar, 2009
1 commit
-
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
23 Jan, 2009
2 commits
-
Typo fix.
Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown