31 Aug, 2011
1 commit
-
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
1 commit
-
GFP_ATOMIC is not needed here, use GFP_KERNEL instead.
Signed-off-by: Axel Lin
Acked-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
4 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 -
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
2 commits
-
The snd_card->driver field contains a driver name string, and in
general it shouldn't contain space or special letters. The commit
2b39535b9e54888649923beaab443af212b6c0fd changed the string copy from
card->name, but the long name string may contain such letters, thus
it may still lead to a segfault.A temporary fix is not to copy the long name string but just keep it
empty as the earlier version did.Reported-by: Kuninori Morimoto
Acked-by: Liam Girdwood
Signed-off-by: Takashi Iwai -
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
03 Jul, 2011
1 commit
-
In preparation for ASoC dynamic PCM support (AKA ASoC DSP)
Platform will also support DAPM so separate out the probe function
to simplify the code (just like the codec probe).Signed-off-by: Liam Girdwood
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
09 Jun, 2011
1 commit
-
In preparation for Dynamic PCM support (AKA DSP support).
There will be future patches that add support to allow PCMs to be dynamically
routed to multiple DAIs at startup and also during stream runtime. This patch
moves the ASoC core PCM operaitions into a new file called soc-pcm.c. This will
in simplify the ASoC core features into distinct files.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
06 Jun, 2011
1 commit
-
Avoids issues if someone does a read followed by restore and doesn't mask
out only the bits being updated.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
30 May, 2011
1 commit
26 May, 2011
1 commit
-
For cards that have two or more DAIs, snd_soc_resume's loop over all
DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
Since this is the same work item each time, the 2nd and subsequent
calls return 0 (work item already queued), and trigger the dev_err
message below stating that a work item may have been lost.Solve this by adjusting the loop to simply calculate whether to run the
resume work immediately or defer it, and then call schedule work (or not)
one time based on that.Note: This has not been tested in mainline, but only in chromeos-2.6.38;
mainline doesn't support suspend/resume on Tegra, nor does the mainline
Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
mainline.Signed-off-by: Stephen Warren
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
25 May, 2011
1 commit
-
Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
24 May, 2011
1 commit
-
Currently CODEC and platform drivers have their module reference count
incremented soc_probe_dai_link() whilst CPU DAI drivers have their reference
count incremented in soc_bind_dai_link().CPU DAIs should have their reference count incremented in soc_probe_dai_link()
just like the CODEC and platform drivers.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
22 May, 2011
1 commit
-
Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name")
writes "(null)" to driver name string in struct snd_card if card->driver_name
is NULL. This causes segmentation faults with some user space ALSA utilities
like aplay and arecord.Fix this by using the card->name if no driver name is specified.
Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
17 May, 2011
1 commit
-
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:In file included from arch/x86/include/asm/uaccess.h:573,
from include/linux/poll.h:14,
from include/sound/pcm.h:29,
from include/sound/ac97_codec.h:31,
from sound/soc/soc-core.c:34:
In function 'copy_from_user',
inlined from 'codec_reg_write_file' at
sound/soc/soc-core.c:252:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correctpresumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.Acked-by: Liam Girdwood
Signed-off-by: Stephen Boyd
Signed-off-by: Mark Brown
12 May, 2011
1 commit
-
Allow ASoC machine drivers to register a driver name
and a longname. This allows user space to determine
the flavour of machine driver.Signed-off-by: Liam Girdwood
Signed-off-by: Mark Brown
08 May, 2011
1 commit
-
This allows to create DAPM routes depending on those widgets in the
codecs probe function. This is helpful when supporting similar codecs
with minor differences in the DAPM routing with the same driver.Something similar has already been done for cards in commit
a841ebb9 (ASoC: Create card DAPM widgets early so they can be used in
callbacks).Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
04 May, 2011
5 commits
-
The move over to exposing snd_soc_register_card() let the initialisation
of the driver data we use to find the card in PM operations go AWOL. Fix
this by setting the driver data when we register the card.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
Currently debugfs entries for a DAPM widgets are only added in
snd_soc_dapm_debugfs_init. If a widget is added later (for example in the
dai_link's probe callback) it will not show up in debugfs.
This patch moves the creation of the widget debugfs entry to
snd_soc_dapm_new_widgets where it will be added after the widget has been
properly instantiated.As a side-effect this will also reduce the number of times the DAPM widget list
is iterated during a card's instantiation.Since it is possible that snd_soc_dapm_new_widgets is invoked form the codecs or
cards probe callbacks, the creation of the debugfs dapm directory has to be
moved before these are called.Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Move the creation of the DAPM debugfs directory to snd_soc_dapm_debugfs_init
instead of having the same duplicated code in both codec and card DAPM setup.Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Free the card's DAPM context when the card is removed.
Signed-off-by: Lars-Peter Clausen
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
28 Apr, 2011
3 commits
-
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
Since we can now support multiple platforms allow machines to not specify
a platform in a DAI link. Since the rest of the code requires that we have
a struct device for all objects we do this by substituting in a dummy
device that we register automatically.Signed-off-by: Mark Brown
Acked-by: Jassi Brar
Acked-by: Liam Girdwood -
Signed-off-by: Mark Brown
Acked-by: Jassi Brar
Acked-by: Liam Girdwood
20 Apr, 2011
1 commit
-
Signed-off-by: Lu Guanqun
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
14 Apr, 2011
1 commit
-
This helps with things like setting up the initial state.
Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
12 Apr, 2011
1 commit
-
card->num_rtd should be 0 after soc_romve_dai_link
Signed-off-by: Kuninori Morimoto
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
08 Apr, 2011
1 commit
-
Allow CODEC and card drivers to point to an array of controls from their
driver structure rather than explicitly calling snd_soc_add_controls().Signed-off-by: Mark Brown
07 Apr, 2011
3 commits
-
initialize ret to invalid value so that when we reach the config error path in
soc_pcm_open, it will return the correct error code. without this patch, though
config error path is executed, soc_pcm_open will return 0 in
snd_pcm_open_substream and then cause double release of substream.Signed-off-by: Lu Guanqun
Signed-off-by: Mark Brown -
Suppose we have:
cpu_dai
channels_min = 1
channels_max = 1codec_dai
channels_min = 2
channels_max = 2This is a mismatch that should not happen, however according to the current
code, the result of runtime->hw will be:channels_min = 2
channels_max = 1We better spot it early. This patch checks this mismatch.
Signed-off-by: Lu Guanqun
Signed-off-by: Mark Brown