11 Jan, 2012
1 commit
-
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
23 Dec, 2011
1 commit
-
Ensure that everything is seeing the same declaration by moving it to
a header file rather than putting the declaration in soc-core.cSigned-off-by: Mark Brown
Acked-by: Liam Girdwood
22 Dec, 2011
1 commit
-
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
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
20 Dec, 2011
2 commits
-
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
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown
13 Dec, 2011
1 commit
-
All users now use regmap directly so delete the ASoC version of the code.
Signed-off-by: Mark Brown
02 Dec, 2011
1 commit
-
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
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
24 Nov, 2011
1 commit
-
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
Signed-off-by: Mark Brown
10 Nov, 2011
2 commits
-
There are no current users and new drivers ought to be using the regmap
API and its cache implementation directly so just delete the ASoC copy.Signed-off-by: Mark Brown
-
My usual technique for finding definitions is to search for "name {"
which breaks with the extra space.Signed-off-by: Mark Brown
27 Oct, 2011
1 commit
-
With this flag, each dai_link in machine driver can choose
to ignore pmdown_time during DAPM shut down sequence.If the ignore_pmdown_time is set, the DAPM for corresponding DAI
will be executed immediately.Signed-off-by: Ramesh Babu K V
Signed-off-by: Vinod Koul
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
15 Oct, 2011
1 commit
-
With this flag codec drivers can indicate that it is desired
to ignore the pmdown_time for DAPM shutdown sequence when
playback stream is stopped.
The DAPM sequence will be executed without delay in this case.Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown
07 Oct, 2011
1 commit
-
By accident few places still uses the _2r calls from
the core.
This is a quick fix, the drivers using the old callbacks
going to be changed.Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown
06 Oct, 2011
5 commits
-
We do not have users for snd_soc_put_volsw_2r anymore.
It can be removed.Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown -
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
Signed-off-by: Mark Brown -
Handle the get_volsw/get_volsw_2r in one function.
Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown -
Handle the info_volsw/info_volsw_2r in one function.
Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown -
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->rshiftis stereo, within single register:
mc->reg == mc->rreg && mc->shift != mc->rshiftis stereo, in two registers:
mc->reg != mc->rregThe patch provide a small inline function to query, if the mixer
is stereo, or mono.Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown
04 Oct, 2011
3 commits
-
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 1327which seems useful.
Signed-off-by: Mark Brown
-
With the new macro we can remove duplicated code
for the SOC_DOUBLE_R type of controls.Signed-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown -
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_VALUESigned-off-by: Peter Ujfalusi
Signed-off-by: Mark Brown
28 Sep, 2011
1 commit
-
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
21 Sep, 2011
2 commits
-
The orginal code does not cover the case that one DAI such as codec
may be shared between other two DAIs(CPU).
When do symmetry checking, altough the codec DAI requires symmetry,
the two CPU DAIs may still be configured to run on different rates.We change to check each DAI's state separately instead of only checking
the dai link to prevent this issue.Signed-off-by: Dong Aisheng
Tested-by: Wolfram Sang
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
One of the longest standing areas for improvement in ASoC has been the
DAPM algorithm - it repeats the same checks many times whenever it is run
and makes no effort to limit the areas of the graph it checks meaning we
do an awful lot of walks over the full graph. This has never mattered too
much as the size of the graph has generally been small in relation to the
size of the devices supported and the speed of CPUs but it is annoying.In preparation for work on improving this insert a trace point after the
graph walk has been done. This gives us specific timing information for
the walk, and in order to give quantifiable (non-benchmark) numbers also
count every time we check a link or check the power for a widget and report
those numbers. Substantial changes in the algorithm may require tweaks to
the stats but they should be useful for simpler things.Signed-off-by: Mark Brown
31 Aug, 2011
2 commits
-
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
-
Devices that need this exist; obviously the newer regmap defaults
mechanism will deal with this more happily.Signed-off-by: Mark Brown
23 Aug, 2011
1 commit
-
If devices can unconditionally support idle_bias_off let them flag it in
their driver structure.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
08 Aug, 2011
3 commits
-
Allow drivers to set up their own regmap API structures. This is mainly
useful with MFDs where the core driver will have set up regmap at the
minute, though it may make sense to push the existing regmap setup out
of the core into the drivers.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
Remove all the ASoC specific physical I/O code and replace it with calls
into the regmap API. The bulk write code can only be used safely if all
regmap calls are locked with the CODEC lock, we need to add bulk support
to the regmap API or replace the code with an open coded loop (though
currently it has no users...).Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
26 Jul, 2011
1 commit
-
In preparation for Dynamic PCM (AKA DSP) support.
This adds a callback function to be called at the completion of a DAPM stream
event.This can be used by DSP components to perform calculations based on DAPM graphs
after completion of stream events.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
06 Jul, 2011
3 commits
-
Allow platform probe to register platform kcontrols and DAPM just like
the CODEC probe().Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown -
Allow platform driver widgets to perform any IO required for DAPM.
Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown -
In preparation for Dynamic PCM (AKA DSP) support.
Allow platform drivers to register kcontrols.
Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
05 Jul, 2011
1 commit
-
In preparation for ASoC Dynamic PCM (AKA DSP) support.
Allow platform driver to perform IO. Intended for platform DAPM.
Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
14 Jun, 2011
2 commits
-
Trival fixup for move of I/O code into separate file.
Conflicts:
sound/soc/soc-cache.c -
This will be removed in -next so let's drop it from mainline as soon as
we can in order to minimise surprises.Signed-off-by: Mark Brown
10 Jun, 2011
1 commit
-
In preparation for the new ASoC Dynamic PCM support (AKA DSP support).
The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
at runtime between the PCM device end (or Frontend - FE) and the physical DAI
(Backend - BE) using regular kcontrols (just like a hardware CODEC routes
audio in the analog domain). The Dynamic PCM core therefore must be
able to call PCM operations for both the Frontend and Backend(s) DAIs at
the same time.Currently we have a global pcm_mutex that is used to serialise
the ASoC PCM operations. This patch removes the global mutex
and adds a mutex per RTD allowing the PCM operations to be reentrant and
allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
could configure multiple backend DAI hw_params() with similar or different
hw parameters at the same time.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
08 Jun, 2011
2 commits
-
Some ASoC components depend on other ASoC components to provide clocks and
power resources in order to probe() and vice versa for remove().Allow components to be ordered so that components can be probed() and removed()
in sequences that conform to their dependencies.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown -
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.
Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown