History log of /linux-master/sound/soc/codecs/wm8996.c
Revision Date Author Comments
# 729f02ec 08-Dec-2023 Linus Walleij <linus.walleij@linaro.org>

ASoC: wm8996: Convert to GPIO descriptors

This converts the WM8996 codec to use GPIO descriptors, an a similar
way to WM5100.

The driver is instantiating a GPIO chip named wm8996, and we get
rid of the base address for the GPIO chip from the platform data and
just use dynamic numbering. Move base and ngpio into the static
gpio_chip template.

Fix up the only in-tree user which is the Cragganmore 6410 module.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-5-c4dab6f521ec@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# a4b6c6ec 12-Jul-2023 Mark Brown <broonie@kernel.org>

ASoC: wm8996: Update to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the wm8996 driver to use the more modern data structure.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230713-asoc-cirrus-maple-v1-38-a62651831735@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 9abcd240 25-Apr-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
Link: https://lore.kernel.org/r/20230425095716.331419-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org


# ed5c2f5f 15-Aug-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

i2c: Make remove callback return void

The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# 02004449 23-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: wm*: Remove now redundant non_legacy_dai_naming flag

The ASoC core has now been changed to default to the non-legacy DAI
naming, as such drivers using the new scheme no longer need to specify
the non_legacy_dai_naming flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-66-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 97b0b6e3 05-Apr-2022 Stephen Kitt <steve@sk2.org>

ASoC: wm*: use simple i2c probe function

The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

wm8731.c is excluded and will be submitted separately.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220405122411.2096387-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# ea80d499 10-Mar-2021 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: wm8996: clarify expression

cppcheck warning:
sound/soc/codecs/wm8996.c:2109:23: style: Clarify calculation
precedence for '/' and '?'. [clarifyCalculation]
timeout = timeout/2 ? : 1;
^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210311004332.120901-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3e146b55 08-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ASoC: codecs: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1].

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709010359.GA18971@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>


# 824186fb 01-Jul-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: codecs: wm8986: fix missing kernel-doc arguments

Fix W=1 warning

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200701181320.80848-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 6d75dfc3 15-Jun-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: codecs: wm*: rename to snd_soc_component_read()

We need to use snd_soc_component_read()
instead of snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eeqf4mcl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0bb423f2 08-Feb-2019 Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

ASoC: regulator notifier registration should be managed

Regulator notifiers, that were registered during codec driver probing,
must be unregistered during driver release, or device managed versions
have to be used. This patch fixes codec drivers, that weren't explicitly
unregistering notifiers and simplifies those, that did that manually.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# eb086306 04-Aug-2018 Gustavo A. R. Silva <gustavo@embeddedor.com>

ASoC: wm8996: use true and false for boolean values

Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 42ef3c94 01-Aug-2018 Gustavo A. R. Silva <gustavo@embeddedor.com>

ASoC: wm8996: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 146354 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5d61ef8b 28-Jan-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: wm8996: replace codec to component

Now we can replace Codec to Component. Let's do it.

Note:
xxx_codec_xxx() -> xxx_component_xxx()
.idle_bias_off = 1 -> .idle_bias_on = 0
.ignore_pmdown_time = 0 -> .use_pmdown_time = 1
- -> .endianness = 1
- -> .non_legacy_dai_naming = 1

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c59b24f8 11-Sep-2016 Julia Lawall <Julia.Lawall@lip6.fr>

ASoC: constify gpio_chip structures

These structures are only used to copy into other structures, so declare
them as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i@p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct gpio_chip i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>


# f802d6c0 31-Aug-2016 Julia Lawall <Julia.Lawall@lip6.fr>

ASoC: constify snd_soc_codec_driver structures

Check for snd_soc_codec_driver structures that are only passed to
snd_soc_register_codec or memcpy (2nd arg), for which the corresponding
parameters are declared const. Declare as const snd_soc_codec_driver
structures that have these properties.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_soc_codec_driver i@p = { ... };

@ok@
identifier r.i;
expression e1,e2,e3;
position p;
@@
(
snd_soc_register_codec(e1,&i@p,e2,e3)
|
memcpy(e1,&i@p,e2)
)

@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_soc_codec_driver i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# efee13aa 08-Aug-2016 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: codec duplicated callback function goes to component on wm8996

codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c2aea142 08-Dec-2015 Linus Walleij <linus.walleij@linaro.org>

ASoC: wm8996: use gpiochip data pointer

This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 8293004c 29-Feb-2016 Takashi Iwai <tiwai@suse.de>

ASoC: wm8996: Fix enum ctl accesses in a wrong type

"DSP1 EQ Mode" and "DSP2 EQ Mode" ctls in wm8996 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[]. They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 58383c78 04-Nov-2015 Linus Walleij <linus.walleij@linaro.org>

gpio: change member .dev to .parent

The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.

This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:

@@
struct gpio_chip *var;
@@
-var->dev
+var->parent

and:

@@
struct gpio_chip var;
@@
-var.dev
+var.parent

and:

@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parent

Plus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.

This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.

Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Alek Du <alek.du@intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 0a3dcb50 24-Jul-2015 Axel Lin <axel.lin@ingics.com>

ASoC: Use params_width() at appropriate places

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1c07a4de 14-Jul-2015 Krzysztof Kozlowski <krzk@kernel.org>

ASoC: drivers: Drop owner assignment from i2c_driver

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# ca940851 02-Jul-2015 Axel Lin <axel.lin@ingics.com>

ASoC: wm8996: Remove spurious IRQF_ONESHOT flag

This reverts ed043aebe6ec ("ASoC: wm8996: Pass the IRQF_ONESHOT flag").

The coccinelle warnings is false positive because the original code does
set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;".

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c418a84a 05-Jul-2015 Axel Lin <axel.lin@ingics.com>

ASoC: Constify reg_default tables

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 6a141e46 01-Jun-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: wm8996: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# ed043aeb 11-May-2015 Fabio Estevam <fabio.estevam@freescale.com>

ASoC: wm8996: Pass the IRQF_ONESHOT flag

Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# f4bf8d77 27-Apr-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Move bias level update to the core

All drivers have the same line at the end of the set_bias_level callback to
update the bias_level state. Move this update into
snd_soc_dapm_force_bias_level() and remove them from the drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 159366ea 08-Mar-2015 Nicholas Mc Guire <hofrat@osadl.org>

ASoC: wm8996: ensure lower bounds of 1 for timeout

wait_for_completion_timeout can be called with timeout == 0 due to
msecs_to_jiffies(2) == 1 for HZ < 1000 and usecs_to_jiffies(300) == 1
for all reasonable values of HZ, thus the following timeout /= 2; sets
timeout to 0. This patch simply adds a lower-bounds of 1.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 62c76fe2 08-Mar-2015 Nicholas Mc Guire <hofrat@osadl.org>

ASoC: wm8996: match wait_for_completion_timeout return type

return type of wait_for_completion_timeout is unsigned long not int. An
appropriately named unsigned long is added and the assignment fixed up
in case of completion occurring the remaining time is >=1 so ret is set to
1 if no timeout occurred.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 00748490 13-Jan-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: wm8996: Replace w->codec snd_soc_dapm_to_codec(w->dapm)

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 88d5e520 12-Jul-2014 abdoulaye berthe <berthe.ab@gmail.com>

driver:gpio remove all usage of gpio_remove retval in driver

this remove all reference to gpio_remove retval in all driver
except pinctrl and gpio. the same thing is done for gpio and
pinctrl in two different patches.

Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com>
Acked-by: Michael Büsch <m@bues.ch>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 5d5e63af 17-Sep-2014 Axel Lin <axel.lin@ingics.com>

ASoC: Remove return value checking for gpiochip_remove()

gpiochip_remove() will return void eventually.
Thus this patch removes return value checking for gpiochip_remove().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 63d36f88 30-Jun-2014 Sachin Kamat <sachin.kamat@samsung.com>

ASoC: wm8996: Remove unused variable

'ret' is not used in the function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# e73a2571 18-Jun-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: wm5100/wm8903/wm8996: Replace open-coded snd_soc_dapm_to_codec()

We now have a generic helper function to cast from a DAPM context to a CODEC.
Make use of it in the places which previously open-coded it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# ea53bf77 18-Mar-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Add snd_soc_kcontrol_codec() helper function

For CODEC controls snd_kcontrol_chip() currently returns a pointer to the
CODEC that registered the control. With the upcoming consolidation of
platform and CODEC controls this will change. Prepare for this by introducing
the snd_soc_kcontrol_codec() helper function that will hide the implementation
details of how the CODEC for a control can be obtained. This will allow us to
change this easily in the future.

The patch also updates all CODEC drivers to use the new helper function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 5d6be5aa 10-Mar-2014 Xiubo Li <Li.Xiubo@freescale.com>

ASoC: codec: Simplify ASoC probe code.

For some CODEC drivers like who act as the MFDs children are ignored
by this patch.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# b7c1b730 22-Feb-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: wm8996: Replace codec->control_data with wm8996->regmap

With the ongoing component-ization of the ASoC framework and the continuing
migration to using regmap for IO the control_data field of the snd_soc_codec
struct will eventually be removed. Prepare the wm8996 driver for this by using
wm8996->regmap instead of accessing the CODEC's control_data field.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 5cca5a91 18-Feb-2014 Takashi Iwai <tiwai@suse.de>

ASoC: wm8996: Use SOC_ENUM_SINGLE_DECL()

Just replace with the helper macro. No functional change at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 02afc6a2 18-Feb-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm8996: Update locking around use of DAPM pin API

The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 9a8d38db 18-Feb-2014 Takashi Iwai <tiwai@suse.de>

ASoC: Rename soc_enum.max field with items

The name "max" in struct soc_enum is rather confusing since it
actually takes the number of items. With "max", one might try to
assign (nitems - 1) value.

Rename the field to a more appropriate one, "items", which is also
used in struct snd_ctl_elem_info, too.

This patch also rewrites some code like "if (x > e->nitems - 1)" with
"if (x >= e->nitems)". Not only the latter improves the readability,
it also fixes a potential bug when e->items is zero.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# d8e9a544 06-Nov-2013 Takashi Iwai <tiwai@suse.de>

ASoC: wm8996: Replace BUG() with WARN()

BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation. For that
purpose, it'd be more convenient to use WARN() instead with more
error information.

Cc: patches@opensource.wolfsonmicro.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# fe329a1a 30-Oct-2013 Takashi Iwai <tiwai@suse.de>

ASoC: wm8996: Fix negative array index read

Spotted by coverity CID 146355.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 7a79e94e 07-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ASoC: codecs: remove __dev* attributes

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 822b4b8d 06-Sep-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: dapm: Add flags to regulator supplies

This will be used to enable additional control of the regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# ec8ffe18 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Move register default configuration to I2C probe

This gets the registers set up as early as possible, mainly useful for the
GPIOs to ensure that they're in the correct mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d4b3d0fb 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Inline wm8996_reset() and optimise cache-only usage

There is only one caller and this allows us to cleanly leave the CODEC
with the internal LDO powered down which is the default state we're
looking for and means that we can robustly disable the register cache
only when we either disable the LDO or power down the external
regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 625c4888 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Move regulator notifier callbacks into I2C level

Now that we're using regmap the cache is available here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# af691fb6 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Convert to devm_regmap_init_i2c()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 66c2b737 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Remove write sequencer registers from the defaults table

They aren't marked as readable and the feature is never used so they'll
never get referenced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 9c699e0a 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Mark the CODEC as cache only when powering off on boot

Otherwise we might try to write to a powered off device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# db133409 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Move reset before the initial regulator disable

If we don't have control over the LDO but do have control over the other
regulators then we may end up trying to write to a powered off device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 90ba6859 11-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Remove spurious regulator_bulk_free()

We're using demv_regulator_bulk_get() so don't need to manually free and
this is in the CODEC driver not the I2C driver anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 656baaeb 22-May-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: codecs: Refresh copyrights for Wolfson drivers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 501bf035 26-Apr-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Put the microphone biases into bypass mode when idle

When we're not actively doing audio we don't need the microphone biases
to be regulated, noise is not important when we are not looking at the
audio signal. Save some power by putting the MICBIAS regulators into
bypass mode when not doing audio.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4eb98f45 14-Mar-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Add 44.1kHz support

The WM8996 specification has been updated to specify 44.1kHz as a supported
sample rate. Update the driver to accept this configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5b596483 08-Mar-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Remove separate output stage enable step

Marginally improve performance during startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# da7f910b 08-Mar-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Remove some volatile regisers from the defaults table

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6449c9f8 29-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Remove stub register cache

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1dd4c8e4 29-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Fix /RESET bounce ordering

We want to leave the device out of rather than in reset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1ec1cdfb 17-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Convert to use DAPM routes for stream connections

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 29e3cc15 21-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Implement DRC coefficient configuration

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d5a7f23f 17-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Make sure we bounce /RESET to reset

While it matches the current code only bringing the device out of reset
isn't actually doing what the function says so make sure we set the GPIO
high before we pull it low.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 8005f394 16-Feb-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Convert to module_i2c_driver()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 905b4195 15-Feb-2012 Axel Lin <axel.lin@gmail.com>

ASoC: Show device id in the debug message

Show the id we read when the id mismatch is detected.
This is useful for debugging.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 022658be 03-Feb-2012 Liam Girdwood <lrg@ti.com>

ASoC: core: Add support for DAI and machine kcontrols.

Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.

This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-

snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()

This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().

It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().

Finally, it updates the existing machine drivers that register controls to either :-

1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.

In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 24e0c57b 21-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Use devm_regulator_bulk_get()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 4a086e4c 21-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Switch to using common code for managing CPVDD supply

Nice code saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# eb3032f8 27-Jan-2012 Axel Lin <axel.lin@gmail.com>

ASoC: Set idle_bias_off flag in snd_soc_codec_driver

Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# d7b35570 26-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Handle failures to determine accessory polarity

If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 1b76d2ee 25-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Mark register cache as dirty when regulators are disabled

Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a14304ed 21-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm8996: Call _POST_PMU callback for CPVDD

We should be allowing a 5ms delay after the charge pump is started in
order to ensure it has finished ramping.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# a4b52337 16-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: 24 bits are significant on the WM8996 audio interfaces

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fed22007 18-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK

With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# 1b39bf34 28-Dec-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Enable ASoC register map dump for some regmap CODECs

It's still useful to be able to poke around in the register map at
runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 45ba82d8 14-Dec-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Tune the accessory detection rates for WM8996

Use longer intervals when the microphone is not inserted to increase
robustness against leisurely insertion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 37d5993c 10-Dec-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix WM8996 24.576MHz clock operation

Record the clock after the divider as that is what all SYSCLK users see.
Without this the other clock configuration in the device comes out at
half rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# a290986b 27-Nov-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Convert wm8996 to use devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 85e7652d 23-Nov-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Constify snd_soc_dai_ops structs

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:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b2d1e233 19-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Convert WM8996 gpiolib to regmap

Actually pretty straightforward.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ee5f3872 19-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Move most WM8996 resource acquisition to I2C probe

Now that the WM8996 driver is using the regmap API for register I/O we no
longer need the ASoC card to be active in order to interact with the chip.
In order to be more idiomatic for Linux move most of the existing probe()
function out into the I2C probe() function prior to registration with ASoC.

The IRQ and GPIO init will be moved separately as these are slightly more
involved.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 79172746 19-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Convert WM8996 to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 753ddf52 23-Oct-2011 Axel Lin <axel.lin@gmail.com>

ASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_remove

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 3205e662 20-Oct-2011 Axel Lin <axel.lin@gmail.com>

ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# ff39dbe9 19-Oct-2011 Axel Lin <axel.lin@gmail.com>

ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# 43419b80 03-Oct-2011 Axel Lin <axel.lin@gmail.com>

ASoC: Remove needless codec->dapm.bias_level assignment to SND_SOC_BIAS_OFF

This assignment is done by the snd_soc_register_codec so there is no need
to redo it in probe function of a codec driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# bcec267a 27-Sep-2011 Karl Tsou <karl@opensource.wolfsonmicro.com>

ASoC: Add DRC control for WM8996

Signed-off-by: Karl Tsou <karl@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ded71dcb 19-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Refcount WM8996 bandgap from FLL too

For digital only paths we need to make sure the bandgap is enabled prior
to starting the FLL which isn't tied into DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# c9d023ad 19-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix unused variable warning in WM8996

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 0b684cc1 04-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Initial WM8996 headphone impedance measurement support

The WM8996 can measure the impedance of accessories connected to the
headphone output. Implement initial support for this, measuring the
left channel impedance when an accessory is detected and using this
to distinguish between a line load and a headphone load.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 8259df12 16-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: WM8996 only needs bandgap for analogue functionality

Rather than managing the bandgap in the bias level control use a supply
widget as we only actually need to enable it for analogue paths, not
fully digital ones.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# f998f257 15-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix WM8996 DC servo operation without IRQ

We need to count the timeout down.

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 32d2a0c1 10-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Correct channel numbers for WM8996 AIF2

The AIF1 channels are numbered from zero than one; do the same thing for
AIF2 too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# c83495af 11-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Disable WM8996 CPVDD supply when not in use

The WM8996 only requires CPVDD when the charge pump is active so control
it separately to the other supplies, only enabling it when the charge pump
is active. This will result in a small power saving on systems which are
able to provide independent software control of the supply.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 27b6d92a 04-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Check that WM8996 FLL started even if we don't have the IRQ

We can directly read the FLL lock status on WM8996 so even if we don't
have an interrupt wired up we can still verify that the FLL started
successfully.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 18a4eef3 26-Aug-2011 susan gao <sgao@opensource.wolfsonmicro.com>

ASoC: Add 3D stereo support for wm8996

My first patch to ASoC ever! If I did something wrong, blame Ian.

Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 18036b58 24-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Correct element count for WM8996 sidetone HPF

I can count. Honest.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# a4161945 16-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Clear completions from late WM8996 FLL lock IRQs

In case we have a pending completion, for example due to a problem with
the input clock which got corrected after we timed out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 2fde6e80 20-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Optimise WM8996 no interrupt path

This occurs frequently if we are in edge triggered mode as we must poll the
interrupt status register until we get no more interrupts so it's worth
the effort - it means we skip writing null acknowledgements to the chip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 889c85c5 20-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Automatically manage WM8996 MICBIAS regulating mode

For non-audio uses like accessory detection we can use a lower quality,
unregulated microphone bias, saving a little power. As the hardware can
manually enable and disable the biases we can select regulating mode
automatically with supply widgets connected to the biases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 7691cd74 20-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix configuration of WM8996 input enables

There's no need for separate widgets for the enables (as the map already
shows).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 4f41adfd 20-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: WM8996 record paths need AIFCLK

Make AIFCLK supply the record paths otherwise record will not work unless
there is a simultaneous playback.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>


# 84497091 20-Jul-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Acknowledge WM8996 interrupts before acting on them

This closes the small race between a status being read in response to an
interrupt and clearing the interrupt, meaning that if the status changes
between those periods we might not get a reassertion of the interrupt.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a9ba6151 23-Jun-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Rename WM8915 to WM8996

For marketing reasons the part will be called WM8996. In order to avoid
user confusion rename the driver to reflect this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@ti.com>