History log of /linux-master/sound/soc/codecs/arizona.h
Revision Date Author Comments
# 236b7285 07-Mar-2021 Hans de Goede <hdegoede@redhat.com>

ASoC: arizona-jack: Use snd_soc_jack to report jack events

Use the snd_soc_jack code to report jack events, instead of using extcon
for reporting the cable-type + an input_dev for reporting the button
presses.

The snd_soc_jack code will report the cable-type through both input_dev
events and through ALSA controls and the button-presses through input_dev
events.

Note that this means that when the codec drivers are moved over to use
the new arizona-jack.c library code instead of having a separate MFD
extcon cell with the extcon-arizona.c driver, we will no longer report
extcon events to userspace for cable-type changes. This should not be
a problem since "standard" Linux distro userspace does not (and has
never) used the extcon class interface for this. Android does have
support for the extcon class interface, but that was introduced in
the same release as support for input_dev cable-type events, so this
should not be a problem for Android either.

Note this also reduces ARIZONA_MAX_MICD_RANGE from 8 to 6, this is
ok to do since this info is always provided through pdata (or defaults)
and cannot be overridden from devicetree. All in-kernel users of the
pdata (and the fallback defaults) define 6 or less buttons/ranges.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210307151807.35201-11-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ffcc84b9 07-Mar-2021 Hans de Goede <hdegoede@redhat.com>

ASoC: arizona-jack: convert into a helper library for codec drivers

Convert the arizona extcon driver into a helper library for direct use
from the arizona codec-drivers, rather then being bound to a separate
MFD cell.

Note the probe (and remove) sequence is split into 2 parts:

1. The arizona_jack_codec_dev_probe() function inits a bunch of
jack-detect specific variables in struct arizona_priv and tries to get
a number of resources where getting them may fail with -EPROBE_DEFER.

2. Then once the machine driver has create a snd_sock_jack through
snd_soc_card_jack_new() it calls snd_soc_component_set_jack() on
the codec component, which will call the new arizona_jack_set_jack(),
which sets up jack-detection and requests the IRQs.

This split is necessary, because the IRQ handlers need access to the
arizona->dapm pointer and the snd_sock_jack which are not available
when the codec-driver's probe function runs.

Note this requires that machine-drivers for codecs which are converted
to use the new helper functions from arizona-jack.c are modified to
create a snd_soc_jack through snd_soc_card_jack_new() and register
this jack with the codec through snd_soc_component_set_jack().

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210307151807.35201-10-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 688c8461 07-Mar-2021 Hans de Goede <hdegoede@redhat.com>

ASoC: arizona-jack: Use arizona->dev for runtime-pm

Drivers for MFD child-devices such as the arizona codec drivers
and the arizona-extcon driver can choose to either make
runtime_pm_get/_put calls on their own child-device, which will
then be propagated to their parent; or they can make them directly
on their MFD parent-device.

The arizona-extcon code was using runtime_pm_get/_put calls on
its own child-device where as the codec drivers are using
runtime_pm_get/_put calls on their parent.

The arizona-extcon MFD cell/child-device has been removed and this
commit is part of refactoring the arizona-extcon code into a library
to be used directly from the codec drivers.

Specifically this commit moves the code over to make
runtime_pm_get/_put calls on the parent device (on arizona->dev)
bringing the code inline with how the codec drivers do this.

Note this also removes the pm_runtime_enable/_disable calls
as pm_runtime support has already been enabled on the parent-device
by the arizona MFD driver.

This is part of a patch series converting the arizona extcon driver into
a helper library for letting the arizona codec-drivers directly report
jack state through the standard sound/soc/soc-jack.c functions.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210307151807.35201-9-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# bcda8cc4 07-Mar-2021 Hans de Goede <hdegoede@redhat.com>

ASoC: arizona-jack: Move jack-detect variables to struct arizona_priv

Move all the jack-detect variables from struct arizona_extcon_info to
struct arizona_priv.

This is part of a patch series converting the arizona extcon driver into
a helper library for letting the arizona codec-drivers directly report jack
state through the standard sound/soc/soc-jack.c functions.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210307151807.35201-8-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: arizona: fix function argument

Cppcheck warning:

sound/soc/codecs/arizona.c:2042:53: style:inconclusive: Function
'arizona_init_dai' argument 2 names different: declaration 'dai'
definition 'id'. [funcArgNamesDifferent]
int arizona_init_dai(struct arizona_priv *priv, int id)
^
sound/soc/codecs/arizona.h:320:53: note: Function 'arizona_init_dai'
argument 2 names different: declaration 'dai' definition 'id'.
int arizona_init_dai(struct arizona_priv *priv, int dai);
^
sound/soc/codecs/arizona.c:2042:53: note: Function 'arizona_init_dai'
argument 2 names different: declaration 'dai' definition 'id'.
int arizona_init_dai(struct arizona_priv *priv, int id)
^

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-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 2 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 version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

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

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


# 0fe1daa6 12-Feb-2018 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: arizona: replace codec to component

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

Because there are many drivers which are using arizona,
we need to update these all related drivers in same time.
Otherwise compile error/warning happen

Note:

cs47l24
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

wm5102
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

wm5110
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

wm8997
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

wm8998
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>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 85e7dd3f 04-Sep-2017 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: arizona: Add support for setting the output volume limits

The output volume limits allow signals to be limited to specific levels
appropriate for the hardware attached. As this is a property of the
hardware itself these will be configured through device tree.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0a229b15 04-Sep-2017 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: arizona: Add handling for audio related device tree entries

Currently all the audio related device tree entries are handled by the
MFD code, for most parts of the Arizona driver we group the device
tree handling with the component that uses it and should do so here as
well.

Add handling in the ASoC code for the audio device tree entries, a
later patch removes the MFD side handling but there is no harm in it
being duplicated temporarily.

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


# 9e3f9f36 04-Sep-2017 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: arizona: Add new common Arizona init function

Currently the driver has quite a few small initialisation functions, in
preparation for some refactoring add a new function arizona_init_common.
This will be used bus probe level initialisation that is common across
Arizona devices. For now just move the notifier chain initialisation in
there.

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


# af813a6f 06-Jan-2017 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm_adsp: Add mechanism to preload firmware on a core

As requirements to bring up audio paths are continuous getting tighter
and the DSP download to most ADSP devices happens over an external bus
it can become an important factor in the path bring up time. As such
sometimes it is a reasonable trade off to download the firmware ahead of
when it will be required and take a small hit on power consumption for
keeping the core powered up.

This "preloading" adds an additional control for each DSP core "DSPx
Preload Switch" that when set to true will power up the DSP core and
download the firmware currently selected in the "DSPx Firmware" control.
Whilst the core is preloaded the current firmware can not be changed and
the CODEC will be kept powered up and SYSCLK held on. Although future
improvements may allow the SYSCLK to be powered down as well because
the hardware only requires SYSCLK whilst the download is actually taking
place, but this is not covered in this series.

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


# 73950715 29-Nov-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Remove redundant extern declarations

Functions are given external linkage by default making the extern's
unnecessary, as such remove them.

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


# d3d5c905 10-Nov-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Move notifier functions to header and make inline

These functions are very thin wrappers around core functions, so they
make sense as inline functions. Also making them inline avoids build
issues in the case where the machine driver is built in but the CODEC
is built as a module.

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


# 31833ead 26-Oct-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Move request of speaker IRQs into bus probe

It is more idiomatic to request all resources in the bus level probe,
this patch moves the request of the speaker thermal event IRQs from the
ASoC level probe into the bus level probe.

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


# 7a4413d0 21-Oct-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add gating for clock when used for direct MCLK

Whilst ultimately we would like to move all the clocking over to the
clock framework, as an intermediate step to get people going for now
gating the source clocks for SYSCLK/ASYNCCLK when they are configured
to come directly from an MCLK pin.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5ca7e170 20-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm_adsp: Make DSP preloader a supply widget

Currently the DSP loading is split into two widgets, the preloader that
is a snd_soc_dapm_dai_link widget which starts a thread to download
the firmware, and the DSP itself which is a snd_soc_dapm_out_drv and
synchronises the thread back in to the DAPM sequence. This allows the
firmware download to be overlapped with the rest of the path bring up.

The use of a snd_soc_dapm_dai_link widget requires the preloader to be part
of the audio path in DAPM, really a supply widget is a better fit for the
preloader. The preloader is something that needs to be done for the DSP to
function, not a part of the audio path itself.

This change makes the DSP preloader widget a supply widget, which as well
as probably being a better fit will also make it much simpler to power up
the preloader widget to trigger firmware download to the core independently
of the audio path coming up.

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


# 3577357a 20-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Attach SYSCLK to DSP preloaders

Currently SYSCLK is attached to every compressed DAI as this follows the
pattern of attaching clocks to the chips inputs and outputs, however, it is
really the DSP that requires the clock here. As firmware download can be a
significant part of the path startup time for these devices occasionally it
would be desirable to download the firmware in advance of the path being
brought up.

To help facilitate this early firmware loading this patch attaches the
SYSCLK to the DSP preloader widget. This also saves us adding a new route
to SYSCLK every time a new compressed DAI is created.

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


# 10867b32 13-Jun-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5102: Revert manual speaker enable

The OUT4L and OUT4R widgets are not registered PRE_PMU or POST_PMD
events, as such the manual speaker enable on wm5102 does not actually
ever run. Furthermore since the issue actually only affected rev B of
the silicon which never shipped in volume, simply remove the work around
from the code.

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


# 546ad3d0 30-May-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add data structure for voice trigger notifier

64-bit builds would generate a warning when we passed the core number as
a pointer through the notifier data:

sound/soc/codecs/cs47l24.c:1091:13: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
(void *)i);

Rather than just fix this up with more casting add a data structure that
holds information for the notifier chain. This will make it easier to
add additional information in the future as well.

Fixes: 7baa7e2490e1 ("ASoC: arizona: Add event notification on voice trigger events")
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 97126ce8 13-May-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add voice trigger output widget

In some situations the voice control firmware will by used
to only provide a trigger notification event. In this case a
compressed stream will not be opened by user-space, as such we
need to provide a virtual output to power on the DSP in this
use-case. This patch adds a virtual output 'DSP Voice Trigger'
that can be used for this, and a switch that lets it be connected
to the core when required.

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


# 7baa7e24 13-May-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add event notification on voice trigger events

Inform the notifier chain if the DSP recognises a voice trigger.

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


# 2230c49f 13-May-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add a notifier chain for CODEC events

Add a notifier chain that can be used from the machine driver to catch
events generated by the CODEC.

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


# 54dca701 15-Apr-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Free speaker thermal IRQs in CODEC remove

The thermal warning IRQs for the speaker are requested in CODEC probe
but never freed. This patch frees them in CODEC remove.

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


# d81221ff 04-Feb-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add support for SNDRV_PCM_RATE_KNOT

The Arizona CODECs support several rates that do not have simple defines
in ALSA. This patch adds support for SNDRV_PCM_RATE_KNOT so that users
can open stream at these rates. As part of this we should always set
constraints in arizona_startup, currently we only set the constraints if
we already have a clock to limit rates to that family of sample rates.
This patch updates this to set a constraint of all rates supported by
the chip if we do not already know which family of rates to limit to.
Finally we also reduce the list of rates supported in the constraints to
only include those that are supported on current parts.

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


# 31889507 21-Jan-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Add support for audio trace firmware

Mainly this adds DAI links for the audio trace, however, it is also
necessary to update the data IRQ handler to check more cores. We have
the handler check every core so it should not be necessary to update
this function if more compressed firmwares are added in the future.

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


# 1d981e0a 15-Dec-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Provide basic hookup for voice control

Register a platform driver for the CODEC and add DAIs that will be used
to connect a compressed record path for the voice control functionality.

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


# 141bc6a6 03-Dec-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Correct types of mixer texts and values

The core expects "const char * const" and "unsigned int" for enum
controls, various places in Arizona use "const char *" and "int".
This patch corrects the type of these arrays.

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


# d190106d 19-Nov-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Add DAPM/routing hookup for the ANC block

The wm5110 device contains a hardware ANC block, this patch connects up
controls and routing for this.

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


# 6ebbce0a 28-Sep-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: wm8998: Initial WM8998 codec driver

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 50e6168f 28-Sep-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: add defines for single-input gain control

Adds convenience defines for declaring a gain control that
has an input mux. These blocks are functionally equivalent to
the existing mixer blocks but can only have a single input
active at once.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 002b083b 16-Sep-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add utility function to check if an input is analog

We will occasionally require to take different action based on if an
input is analog or digital so add a helper function to return if an
input is analog.

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


# 0e765971 24-Aug-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Poll for FLL clock OK rather than use interrupts

The extcon driver takes the DAPM mutex from within the interrupt thread
in several places, which makes it possible to get into a situation where
the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM
sequence is running which is attempting to configure the FLL. In this
case the FLL completion can't be completed as as the IRQ handler is
ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and
report that the process timed out.

It is not really practical to make the extcon driver not take the DAPM
mutex from within the interrupt thread, at least not without extensive
modification. So this patch fixes the issue by switching the wait for
the FLL lock to polling. A few fast polls are done first as the FLL
should lock quickly for a good quality reference clock, (indeed it hits
on the first poll on my system) and it will poll every 20mS after that
until it times out.

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


# 5f8e671a 25-Jun-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Implement stability check for LHPF coefficients

Specifying unstable coefficients for the low/high pass filters can have
a severe impact on the audio. This patchs adds a stability check on the
coefficients written to the low/high pass filter block to prevent this.

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


# c05d9a8c 25-Jun-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Implement stability check for EQ coefficients

Specifying unstable coefficients for the EQ can have a severe impact on
the audio. This patchs adds a stability check on the coefficients
written to the EQ, for this it is necessary to merge the mode control
and the coefficients as some coefficients may only be unstable with a
certain mode setting so it is ideal if these are always updated in sync.

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


# 336d0442 18-Jun-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: wm_adsp: Move DSP Rate controls into the codec

The rate controls are codec-specific, it's not possible to
generically say what the range or the meaning of each control
is (or even if they exist at all) - that depends on the
particular codec.

This is currently being handled for Arizona codecs by putting
an Arizona-specific table of controls inside the wm_adsp driver.
This creates a dependency between wm_adsp and arizona.c, and is an
awkward solution if the ADSP is used in another family of codecs

Fix this by moving the Arizona-specific rate controls into the
Arizona codec drivers.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 346d9683 02-Jun-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Export functions to control subsystem DVFS

The WM5102 and WM8997 codecs have an internal dynamic clock booster.
When this booster is active, the DCVDD voltage must be increased.
If all the currently active audio paths can run with the root SYSCLK
we can disable the booster, allowing us to turn down DCVDD voltage
to save power.

Previously this was being done by having the booster enable bit set
as a side-effect of the LDO1 regulator driver, which is unexpected
behaviour of a regulator and not compatible with using an external
regulator. [Originally this was documented as a feature of the internal
LDO -- broonie]

This patch exports functions to handle the booster enable and
DCVDD voltage, with each relevant subsystem flagging whether it can
currently run without the booster. Note that these subsystems are
stateless and none of them are nestable, so there's no need for
reference counting, we only need a simple boolean for each subsystem
of whether their current condition could require the booster or will
allow us to turn the codec down to lower operating power.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 21a37e39 30-Apr-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Use auto disable muxes for routing

The mixer core on the Arizona devices is powered up whenever any routing
is non-zero. This patch saves a little power and avoids a few difficult
corner cases (around the mixer core being powered whilst there is no
clock available), by using the autodisable mux functionality to only
write out the settings for the muxes when they are powered up.

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


# e1ae5fba 20-Jan-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Coalesce output power up delays

Save a bit of scheduling by coalescing all the output power up delays
into a single delay.

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


# 054e1b48 20-Jan-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add delay for output disable

Give the output disable sequence a chance to fully complete, otherwise
there is a danger we may remove the clock before it is finished
resulting in a pop noise. The delay for each output must be cumulative
and these are coalesced into a single delay.

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


# b60f363b 10-Jun-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Power both channels for differential mono output

On the wm5110 CODEC both the left and right channel must be powered
when an output is being used as a mono output, although no audio is
routed to the right output channel. This patch adds additional DAPM
routes to link the right channel to the left in the case where an output
is marked as mono. Audio must always be brought in on the left channel
for mono operation.

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


# 355e3a08 14-Apr-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: arizona: Replace usage deprecated MUX/ENUM macros

SND_SOC_DAPM_VALUE_MUX and SOC_DAPM_VALUE_ENUM are deprecated and merely an
alias for SND_SOC_DAPM_MUX and SOC_DAPM_ENUM. Replace the deprecated macros so
we can eventually remove their definition.

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


# 12db5edd 08-Jan-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm_adsp: Start DSP booting earlier in the DAPM process

Move the start of booting the DSP to earlier in the DAPM process, and
move the final starting of the DSP to later in the DAPM process. This
allows us to overlap some of the processing with other components of the
system being brought up.

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


# 56d37d85 19-Dec-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Add support for ASRC RATE 1

Add support for configuring the sample rate on the SYSCLK side of the
ASRC.

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


# fbedc8cb 19-Dec-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Add FSH for ISRCs

Currently, the driver only supports configuration of the lower sample
rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
patch adds support for configuring the higher sample rate (FSH).

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


# 254dc326 19-Nov-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Expose input high pass filter controls

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# e64001e8 20-Nov-2013 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: wm5110: Add extra AIF2 channels

Signed-off-by: D.J. Barrow <dbarrow@wolfsonmicro.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# e7edb273 12-Aug-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add widget<->mux route into mux route macro

The routes linking the widget and the input mux were being added
manually, rather than by the ARIZONA_MUX_ROUTES macro. This patchs adds
the routes to the macro.

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


# c7f38435 06-Aug-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5110: Correct input OSR bits for wm5110

The input OSR bits are specified differently for wm5110 than for current
revs of wm5102. This patch corrects support for this on wm5110.

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


# b63144e6 04-Jul-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add signal activity output for DRC

When doing signal activity detection, the only output from the DRC will
often be a GPIO pin. This patch adds a signal activity output that is
activated when a GPIO is configured to output the DRC signal activity
detection.

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


# bd1dd885 17-May-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Provide simple DAI ops for autoconfiguring interfaces

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


# f607e31c 22-Feb-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Fix interaction between headphone outputs and identification

Running HPDET while the headphone outputs are enabled can disrupt the
operation of HPDET. In order to avoid this HPDET needs to disable the
headphone outputs and ASoC needs to not enable them while HPDET is
running.

Do the ASoC side of this by storing the enable state in the core driver
structure and only writing to the device if a flag indicating that the
accessory detection side is in a state where it can have the headphone
output stage enabled.

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


# dc91428a 18-Feb-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Basic support for ISRC rate selection

Since ASoC does not yet really have the framework features needed to
support propagating sample rates through the device well yet implement
basic support for the ISRCs equivalent to that we currently have for the
ASRCs. The user can opt for 8kHz or 16kHz as the rate for the DSP blocks
in addition to the main audio rate, these being the primary use cases.

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


# 56447e13 10-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Factor out speaker widgets from CODEC drivers

Some system designs have been identified which repurpose portions of the
speaker driver circuits for other functions which will require that they
not be managed using DAPM. Prepare for this by factoring out the creation
of the speaker widgets into the core driver, the widgets will be replaced
by dummy ones when the additional functions are enabled.

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


# 3f341f74 08-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Provide defines for the clock rates

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


# ddbce97c 15-Feb-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Only allow input volume updates when inputs are enabled

Since we are automatically managing the mutes we may as well also manage
the volume update bits, disabling volume updates while none of the inputs
are active. Since we are doing this we may as well allow the volumes to
ramp together so only enable volume updates once at the end of power up.

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


# f3f1163d 20-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add convience define for clearing SYNCCLK

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


# ee929a97 20-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add support for directly setting the FLL REFCLK

This patch allows the REFCLK to be set directly allowing much greater
flexibility in how the FLLs are configured.

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


# de1e6eed 20-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Improve suppression of noop FLL updates

Previously updates that only changes FLL source would be missed, this
patch corrects this. We also ensures that both REFCLK and SYNCCLK
frequency changes are considered, in preparation for future updates.

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


# 9e359c64 20-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Tidy up SYNCCLK selection and cache values

This patch caches the current SYNCCLK settings in the arizona_fll struct
and uses these to simplify the code which determines which source should
be used for the REFCLK and SYNCCLK inputs.

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


# 19b34bdc 20-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Move selection of FLL REFCLK into init

In preparation for additional features on the FLL this patch moves the
code selecting the REFCLK source based on the 32kHz clock into the FLL
initialisation function.

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


# c98137bf 15-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Don't request FLL lock IRQ

We only log the result and since the interrupt triggers on loss of lock
during shutdown this may lead to spurious interrupts during shutdown
delaying the process.

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


# bc9ab6d3 04-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Allow runtime reconfiguration of the output mode

Some systems use external analogue switches to connect more analogue
devices to the CODEC than are supported by the device. In some systems
this requires changing the switched output from single ended to
differential mode dynamically at runtime. Add a new function
arizona_set_output_mode() to support this.

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


# 91660bd6 05-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: wm5102: Implement routing and power management for ISRCs

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


# a8c02db0 18-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Correct FLL source definitions

The FLL source constants were numbered as a simple enumeration but were
being used in the code as direct values to be written to the registers.
Renumber the constants to reflect the usage.

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


# 845571cc 18-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Add noise gate hold time enumeration

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


# e853a00f 08-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Add volume ramp controls

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


# 1cbe4bca 20-Nov-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Suppress noop FLL updates

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


# 17bd09e5 13-Nov-2012 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add support for multiplexer with no associated mixer

The Asynchronous Sample Rate Converters on the wm5102/wm5110 have no
mixer attached to their input, but they do allow the input to be
selected from a number of sources via a multiplexer. Currently the
platform assumes the presence of 4 multiplexers and a mixer for each
block.

This patch adds support multiplexed single input blocks into the Arizona
platform.

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


# 0b09df66 10-Oct-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Define standard hookup for ADSP2

Many Arizona class devices contain ADSP2 cores with a standard method for
hooking them into the audio map. Define standard helpers for this.

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


# c922cc4c 26-Sep-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Add more DSP options for mixer input muxes

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


# cbd840da 08-Aug-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Implement OPCLK support

Arizona devices support two output system clocks. Provide support for
configuring these via set_sysclk(). Once the clock API is more useful
we should migrate over to that.

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


# 2b4d39fc 10-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Support variable FLL VCO multipliers

Some Arizona chips have a higher frequency for the FLL VCO, support this
in the common code.

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


# c9c56fd0 09-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Add IN4 to the mixer tables

Some devices have four input structures rather than three.

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


# 5b2eec3f 04-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Implement AIF clock configuration

Allow the user to select which of the system clocks each AIF is referenced
to and constran the DAI to the set of frequencies which can be generated
from that clock.

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


# 07ed873e 18-Jun-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Add shared code for Wolfson Arizona class devices

The Wolfson Arizona series of audio hub CODECs can share a large amount
of their driver code as the result of a common register map. This patch
adds some of this core support, providing a basis for the initial WM5102
audio driver.

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