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
11 Dec, 2011
1 commit
-
The message was obviously copied from soc_init_codec_debugfs()
Signed-off-by: Lothar Waßmann
Signed-off-by: Mark Brown
09 Dec, 2011
1 commit
-
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
Acked-by: Liam Girdwood
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
28 Nov, 2011
1 commit
-
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
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
23 Nov, 2011
3 commits
-
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] [] (unwind_backtrace+0x0/0xec) from [] (dump_stack+0x20/0x24)
[ 176.741082] [] (dump_stack+0x20/0x24) from [] (do_raw_spin_lock+0x118/0x158)
[ 176.749882] [] (do_raw_spin_lock+0x118/0x158) from [] (_raw_spin_lock_irqsave+0x5c/0x68)
[ 176.759723] [] (_raw_spin_lock_irqsave+0x5c/0x68) from [] (__wake_up+0x2c/0x5c)
[ 176.768781] [] (__wake_up+0x2c/0x5c) from [] (soc_resume_deferred+0x3c/0x2b0)
[ 176.777666] [] (soc_resume_deferred+0x3c/0x2b0) from [] (process_one_work+0x2e8/0x50c)
[ 176.787334] [] (process_one_work+0x2e8/0x50c) from [] (worker_thread+0x1c8/0x2e0)
[ 176.796566] [] (worker_thread+0x1c8/0x2e0) from [] (kthread+0xa4/0xb0)
[ 176.804843] [] (kthread+0xa4/0xb0) from [] (kernel_thread_exit+0x0/0x8)Signed-off-by: Eric Miao
Signed-off-by: Mark Brown -
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:
//
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
//Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown
18 Oct, 2011
1 commit
-
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
Acked-by: Liam Girdwood
12 Oct, 2011
1 commit
-
This ensures they are available prior to the card late_probe().
Signed-off-by: Mark Brown
09 Oct, 2011
1 commit
-
Specifically for the widgets added by machine driver late probe functions.
Signed-off-by: Mark Brown
08 Oct, 2011
1 commit
-
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
06 Oct, 2011
3 commits
-
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
04 Oct, 2011
2 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
-
The DAI init function may want to do something that needs the widgets to
be instantiated.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
-
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
Acked-by: Takashi Iwai
09 Sep, 2011
1 commit
-
We don't use the step size so there's no need to work it out.
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
31 Aug, 2011
4 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
-
Use snd_soc_codec_readable_register instead of open-coding it.
Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Change the default return value of snd_soc_codec_{readable,writable}_register to
true when no codec specific callback for this function is given. Otherwise all
registers of that codec will neither be readable nor writable, which is most
certainly not what we want.Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
23 Aug, 2011
3 commits
-
GFP_ATOMIC is not needed here, use GFP_KERNEL instead.
Signed-off-by: Axel Lin
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
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
01 Aug, 2011
1 commit
-
Utterly trivial but it annoys me.
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
19 Jul, 2011
2 commits
-
In one comment, cpu_dai was mentioned although codec_dai was used in the
code. Also, fix the name for the card dai list which has no seperation
into card_dai and codec_dai.Signed-off-by: Wolfram Sang
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Since quite a few drivers are not managing to flag the cache as needing
to be resynced after suspend and it's a reasonable thing to do flag the
cache as needing sync automatically when suspending.The expectation is that systems will mainly only keep the CODEC powered
when doing audio through the CODEC so we won't actually suspend the
device anyway; drivers which want to can override this behaviour when
they resume.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
Cc: stable@kernel.org
09 Jul, 2011
1 commit
06 Jul, 2011
2 commits
-
Trace platform IO just like CODEC IO.
Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown -
Allow platform probe to register platform kcontrols and DAPM just like
the CODEC probe().Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown