15 Jan, 2011
1 commit
-
Signed-off-by: Hanno Boeck
Signed-off-by: Takashi Iwai
13 Jan, 2011
1 commit
10 Jan, 2011
1 commit
-
Introduce the helper function snd_ctl_enum_info() to fill out the
elem_info fields for an enumerated control.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
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
13 Dec, 2010
2 commits
-
Conflicts:
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8753.c
sound/soc/sh/fsi.c
sound/soc/soc-core.c
09 Dec, 2010
1 commit
-
This patch removes some legacy structure definitions which are not using
in current ASoC drivers.Signed-off-by: Seungwhan Youn
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
06 Dec, 2010
2 commits
-
Added an optional name member to snd_soc_cache_ops to enable more
sensible diagnostic messages during cache init, exit and sync.Remove redundant newline in source code.
Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Currently the machine driver can only do bias level configuration before
the CODEC bias level is brought up. This means that the machine cannot do
any configuration which depends on the CODEC bias level being maintained.
Provide a post-CODEC callback which allows the machine driver to do things
like enable the FLL on a CODEC which is brought down to BIAS_OFF when idle.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
04 Dec, 2010
6 commits
-
Allow the CODEC driver structure to be marked const by making all
the APIs that use it do so.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
This patch allows machine drivers to override the compression type
provided by the codec driver.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Make sure to use codec->reg_def_copy instead of codec_drv->reg_cache_default
wherever necessary. This change is necessary because in the next patch we
move the cache initialization code outside snd_soc_register_codec() and by that
time any data marked as __devinitconst such as the original reg_cache_default
array might have already been freed by the kernel.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
The snd_soc_codec_conf struct now holds codec specific configuration
information.A new configuration option has been added to allow machine drivers to
override the compression type set by the codec driver.In the absence of providing an snd_soc_codec_conf struct or when providing
one but not setting the compress_type member to anything, the one supplied
by the codec driver will be used instead. In all other cases the one
set in the snd_soc_codec_conf struct takes effect.Signed-off-by: Dimitris Papastamos
Acked-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
Ensure that the base value of compress_type starts at 1 so that
we know whether the machine driver has provided a compress_type
for overriding the codec supplied one.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
We need to keep a copy of the compress_type supplied by the codec driver
so that we can override it if necessary with whatever the machine driver
has provided us with. The reason for not modifying the codec->driver
struct directly is that ideally we'd like to keep it const.Adjust the code in soc-cache and soc-core to make use of the compress_type
member in the snd_soc_codec struct.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
03 Dec, 2010
2 commits
-
We shouldn't be assigning to the driver structure (which really ought
to be const, further patch to follow) though there's unlikely to be any
actual problem except in the unlikely case that two devices with the
same driver but different bus types appear in the same system.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood -
Neither drivers nor the core should be fiddling with the actual ops
structure at runtime.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
01 Dec, 2010
1 commit
-
Add support for the RME HDSP RPM IO box. Changes have been made in the identification of the IO box and the neccessary controls have been added.
Signed-off-by: Florian Faber
Signed-off-by: Takashi Iwai
30 Nov, 2010
1 commit
-
This makes possible to register auxiliary dailess codecs in a machine
driver. Term dailess is used here for amplifiers and codecs without DAI or
DAI being unused.Dailess auxiliary codecs are kept in struct snd_soc_aux_dev and those codecs
are probed after initializing the DAI links. There are no major differences
between DAI link codecs and dailess codecs in ASoC core point of view. DAPM
handles them equally and sysfs and debugfs directories for dailess codecs
are similar except the pmdown_time node is not created.Only suspend and resume functions are modified to traverse all probed codecs
instead of DAI link codecs.Example below shows a dailess codec registration.
struct snd_soc_aux_dev foo_aux_dev[] = {
{
.name = "Amp",
.codec_name = "codec.2",
.init = foo_init2,
},
};static struct snd_soc_card card = {
...
.aux_dev = foo_aux_dev,
.num_aux_devs = ARRAY_SIZE(foo_aux_dev),
};Signed-off-by: Jarkko Nikula
Signed-off-by: Mark Brown
29 Nov, 2010
1 commit
-
Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
24 Nov, 2010
2 commits
-
Current AP4 FSI set_rate function used bogus clock process
which didn't care enable/disable and clk->usecound.
To solve this issue, this patch also modify FSI driver to call
set_rate with enough options.
This patch modify it.Signed-off-by: Kuninori Morimoto
Signed-off-by: Paul Mundt -
If CONFIG_SND_DYNAMIC_MINORS is used, assign /dev/snd/seq and
/dev/snd/timer the usual static minors, and export specific
module aliases to generate udev module on-demand loading
instructions:$ cat /lib/modules/2.6.33.4-smp/modules.devname
# Device nodes to trigger on-demand module loading.
microcode cpu/microcode c10:184
fuse fuse c10:229
ppp_generic ppp c108:0
tun net/tun c10:200
uinput uinput c10:223
dm_mod mapper/control c10:236
snd_timer snd/timer c116:33
snd_seq snd/seq c116:1The last two lines instruct udev to create device nodes, even
when the modules are not loaded at that time.As soon as userspace accesses any of these nodes, the in-kernel
module-loader will load the module, and the device can be used.The header file minor calculation needed to be simplified to
make __stringify() (supports only two indirections) in
the MODULE_ALIAS macro work.This is part of systemd's effort to get rid of unconditional
module load instructions and needless init scripts.Cc: Lennart Poettering
Signed-off-by: Kay Sievers
Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
22 Nov, 2010
2 commits
-
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 -
This patch allows to disable period interrupts which are
not needed when the application relies on a system timer
to wake-up and refill the ring buffer. The behavior of
the driver is left unchanged, and interrupts are only
disabled if the application requests this configuration.
The behavior in case of underruns is slightly different,
instead of being detected during the period interrupts the
underruns are detected when the application calls
snd_pcm_update_avail, which in turns forces a refresh of the
hw pointer and shows the buffer is empty.More specifically this patch makes a lot of sense when
PulseAudio relies on timer-based scheduling to access audio
devices such as HDAudio or Intel SST. Disabling interrupts
removes two unwanted wake-ups due to period elapsed events
in low-power playback modes. It also simplifies PulseAudio
voice modules used for speech calls.To quote Lennart "This patch looks very interesting and
desirable. This is something have long been waiting for."Support for this in hardware drivers is optional.
Signed-off-by: Pierre-Louis Bossart
Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
15 Nov, 2010
1 commit
-
There is a need to prefix codec kcontrol, widget and internal route names in
an ASoC machine that has multiple codecs with conflicting names. The name
collision would occur when codec drivers try to registering kcontrols with
the same name or when building audio paths.This patch introduces optional prefix_map into struct snd_soc_card. With it
machine drivers can specify a unique name prefix to each codec that have
conflicting names with anothers. Prefix to codec is matched with codec
name.Following example illustrates a machine that has two same codec instances.
Name collision from kcontrol registration is avoided by specifying a name
prefix "foo" for the second codec. As the codec widget names are prefixed
then second audio map for that codec shows a prefixed widget name.static const struct snd_soc_dapm_route map0[] = {
{"Spk", NULL, "MONO"},
};static const struct snd_soc_dapm_route map1[] = {
{"Vibra", NULL, "foo MONO"},
};static struct snd_soc_prefix_map codec_prefix[] = {
{
.dev_name = "codec.2",
.name_prefix = "foo",
},
};static struct snd_soc_card card = {
...
.prefix_map = codec_prefix,
.num_prefixes = ARRAY_SIZE(codec_prefix),
};Signed-off-by: Jarkko Nikula
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
11 Nov, 2010
3 commits
-
This patch adds support for rbtree compression when storing the
register cache. It does this by not adding any uninitialized registers
(those whose value is 0). If any of those registers is written
with a nonzero value they get added into the rbtree.Consider a sample device with a large sparse register map. The
register indices are between [0, 0x31ff]. An array of 12800 registers
is thus created each of which is 2 bytes. This results in a 25kB
region. This array normally lives outside soc-core, normally in the
driver itself. The original soc-core code would kmemdup this region
resulting in 50kB total memory. When using the rbtree compression
technique and __devinitconst on the original array the figures are
as follows. For this typical device, you might have 100 initialized
registers, that is registers that are nonzero by default. We build
an rbtree with 100 nodes, each of which is 24 bytes. This results
in ~2kB of memory. Assuming that the target arch can freeup the
memory used by the initial __devinitconst array, we end up using
about ~2kB bytes of actual memory. The memory footprint will increase
as uninitialized registers get written and thus new nodes created in
the rbtree. In practice, most of those registers are never changed.
If the target arch can't freeup the __devinitconst array, we end up
using a total of ~27kB. The difference between the rbtree and the LZO
caching techniques, is that if using the LZO technique the size of
the cache will increase slower as more uninitialized registers get
changed.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
This patch adds support for LZO compression when storing the register
cache. The initial register defaults cache is marked as __devinitconst
and the only change required for a driver to use LZO compression is
to set the compress_type member in codec->driver to SND_SOC_LZO_COMPRESSION.For a typical device whose register map would normally occupy 25kB or 50kB
by using the LZO compression technique, one can get down to ~5-7kB. There
might be a performance penalty associated with each individual read/write
due to decompressing/compressing the underlying cache, however that should not
be noticeable. These memory benefits depend on whether the target architecture
can get rid of the memory occupied by the original register defaults cache
which is marked as __devinitconst. Nevertheless there will be some memory
gain even if the target architecture can't get rid of the original register
map, this should be around ~30-32kB instead of 50kB.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown -
This patch introduces the new caching API and migrates the
old caching interface into the new one. The flat register caching
technique does not use compression at all and it is equivalent to
the old caching technique. One can still access codec->reg_cache
directly but this is not advised as that will not be portable
across different caching strategies.None of the existing drivers need to be changed to adapt to this
caching technique. There should be no noticeable overhead associated
with using the new caching API.Signed-off-by: Dimitris Papastamos
Acked-by: Liam Girdwood
Signed-off-by: Mark Brown
06 Nov, 2010
3 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 -
There will be need to have sound card specific debugfs entries. This patch
introduces a new debugfs/asoc/{card->name}/ directory but does not add yet
any entries there.Signed-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
04 Nov, 2010
1 commit
-
Facilitating adding trace type stuff. For a first pass add some dev_dbg()
statements into them.Signed-off-by: Mark Brown
Acked-by: Liam Girdwood
02 Nov, 2010
2 commits
-
WARN() fix from Joe moved.
Conflicts:
sound/soc/codecs/wm_hubs.c