History log of /linux-master/sound/soc/codecs/arizona.c
Revision Date Author Comments
# f99e93065 28-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: arizona: Update arizona_aif_cfg_changed to use RX_BCLK_RATE

Currently the function arizona_aif_cfg_changed uses the TX_BCLK_RATE,
however this register is not used on wm8998. This was not noticed as
previously snd_soc_component_read did not print an error message.
However, now the log gets filled with error messages, further more the
test for if the LRCLK changed will return spurious results.

Update the code to use the RX_BCLK_RATE register, the LRCLK parameters
are written to both registers and the RX_BCLK_RATE register is used
across all Arizona devices.

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


# 3371c6f9 19-Nov-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ASoC: codecs: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through, and also add fallthrough pseudo-keywords
in places where the code is intended to fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: codecs: 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/87mu534me5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5e518edd 14-May-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: codecs: use snd_soc_xxx_active()

We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87wo5e58j4.wl-kuninori.morimoto.gx@renesas.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>


# 7dd0f7ca 20-Feb-2018 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: arizona: Fixup some minor formatting issues

Repair any formatting/style issues that can be fixed without major
code refactoring.

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


# 4428ffa1 14-Aug-2017 Sapthagiri Baratam <sapthagiri.baratam@cirrus.com>

arizona: anc: Correct setting of FCx_MIC_MODE_SEL

The mask rather than the shift is accidentally passed to the
SOC_ENUM_SINGLE macro which results in the wrong bits being set for this
control, change to using the shift to correct this.

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


# 35f4403e 29-Nov-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Use component pin control functions

We need to modify the state of some of our own pins and are currently
not taking account that the pin name may have a name_prefix applied
to it.

Replace the snd_soc_dapm_x_pin functions with the equivalent
snd_soc_component_x_pin functions so that any name_prefix will be
handled automatically.

Signed-off-by: Richard Fitzgerald <rf@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>


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

ASoC: arizona: Add gating for source clocks of the FLLs

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
enable the source clocks for FLLs as they are powered up.

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>


# 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>


# 8c7788f3 27-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add output power up/down delays for speaker path

The later Arizona parts do run write sequences to power up and down the
speaker path as such a delay needs to be inserted into the DAPM sequence
to allow this to run. This patch adds appropriate delays into the
existing coalesced delay scheme.

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


# d605bd02 27-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add debug prints for output power up/down times

When debugging it is useful to check the total power up/down delay that
is executed as part of the coalesced output delay. This patch adds some
debug prints for this.

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


# 0f72a8a3 02-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Avoid changing SYNC_ENA whilst the FLL_ENA is set

For best performance changing the synchroniser state whilst the FLL is
running should be avoided. As this has been done fairly regularly in
practice rather than hard preventing this, simply improve the FLL enable
sequence and give a warning if the user changes the synchroniser state.

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


# 62bb7104 02-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Allow specification of base for arizona_is_enabled_fll

In preparation for future improvements allow a base to be passed to
arizona_is_enabled_fll, this will allow it to be used to check the state
of the synchroniser path as well.

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


# e87d9ae8 02-Sep-2016 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Correct handling of FLL theta in synchroniser mode

Theta/lambda is used to give the fractional portion of the FLL
frequency multiplication. When the synchroniser is active the
reference path lambda value is hard coded in the hardware to
65536. This patch corrects the handling of theta such that it
is scaled to match this denominator, when the synchroniser is
active.

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


# 63d19e06 25-Aug-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Wait for resume before enabling FLL

When enabling an FLL use pm_runtime_get_sync() instead of
pm_runtime_get() to ensure that all the register settings
have been written out and the codec is powered-up before
we write the enable bit.

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


# c9991052 30-Aug-2016 Nariman Poushin <nariman@opensource.wolfsonmicro.com>

ASoC: arizona: Don't change the FLLn_GAIN before entering FREERUN

When reclocking an active FLL, to ensure a clean transition, do
not change the gain setting until we have entered free run.

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


# 8f273aac 13-Jun-2016 Arnd Bergmann <arnd@arndb.de>

ASoC: remove one extraneous 'const'

A recent commit made a few arrays 'const', but also added the
same attribute to a function return type, where it makes no
sense, and we get a warning when building with W=1:

sound/soc/codecs/arizona.c:1725:27: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
static const char * const arizona_dai_clk_str(int clk_id)

This removes it again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-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>


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

ASoC: arizona: Add a couple of missing consts

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
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>


# 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>


# 2ab8e744 26-Apr-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: No need to update_bits when writing AEC clock control

The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of
a '1', a write of '0' is ignored. So there's no need to use update_bits.
We can do a simple write to set bits.

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


# 8e42db1e 21-Apr-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Prefer lower FRATIO in pseudo-fractional mode

When setting up an FLL in pseudo-fractional mode it is preferred
to use a lower FRATIO if possible to give a higher reference clock
frequency. This patch swaps the two loops in arizona_calc_fratio()
so that lower FRATIOs are tried first. The decrementing loop is also
changed to start from init_ratio because the original settings might
already give a fractional value for N.K

Signed-off-by: Richard Fitzgerald <rf@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>


# 43b27d72 08-Apr-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Do not create OUT4R widget for CS47L24/WM1831

The CS47L24 and WM1831 codecs only use the OUT4L widget so we can
skip creation of the OUT4R widget.

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


# 2595b7fe 23-Feb-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Make logging of FLL calculations clearer

The debug logging of FLL calculations was confusing. Values were
printed in hex without indicating this by a leading 0x, and
despite these normally being required in decimal. Also where the
register value isn't the actual value (it s a power-of-two or
0 means 1, 1 means 2, ...) it was unclear whether the actual or
register value was shown.

This patch changes the log print so that all mathematical values
are shown in decimal, all register values are shown in hex with a
0x prefix, and where the register value isn't the actual integer
value the decimal integer value is shown in () after the hex
register value.

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


# 01582a84 10-Feb-2016 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: fref must be limited in pseudo-fractional mode

When the FLL is in pseudo-fractional mode there is an additional
limit on fref based on the fratio, to prevent aliasing around the
Nyquist frequency. If fref exceeds this limit the refclk divider
must be increased and the calculation tried again until a suitable
combination of fref and fratio is found or we have to fall back to
integer mode.

This patch also adds some debug log prints around this code.

Signed-off-by: Richard Fitzgerald <rf@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>


# 26eb5a9a 29-Dec-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Exit startup early if no runtime

commit 9b8ef9f6b3fc ("ASoC: dapm: Add startup & shutdown for dai_links")

Added support for calling startup on CODEC to CODEC links, however this
is called with a NULL runtime pointer. There isn't really a sensible way
to pass a valid runtime pointer to a CODEC to CODEC link at the moment,
so we need to make the startup function safe for NULL runtimes.

This patch returns from the Arizona startup function early if there is no
runtime, this is perfectly safe as all the startup function does is set
the PCM constraints for user-space which arn't relevant to a CODEC to
CODEC link anyway.

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


# e73694d8 23-Dec-2015 Nikesh Oswal <Nikesh.Oswal@cirrus.com>

ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz

For a sample rate of 12kHz the bclk was taken from the 44.1kHz table as
we test for a multiple of 8kHz. This patch fixes this issue by testing
for multiples of 4kHz instead.

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


# 3451eb48 16-Dec-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: In arizona_calc_fratio make new codecs the default case

This patch rearranges the switch statement in arizona_calc_fratio so
that older codecs are the special cases, with the default case
applying to newer codecs (WM8998 and later). This is preferable
because it avoids having to patch new cases in every time a new
codec is added.

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


# 1f0e1eae 03-Dec-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Fix type of clock rate pointer in arizona_set_sysclk

Both the sysclk and asyncclk members of arizona_priv are signed by we
refer to them through an unsigned pointer. This patch fixes this small
harmless error.

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>


# 800f297e 30-Nov-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add 32uS delay after putting FLL into freerun

When switching between two clock sources using the FLL freerun to smooth
the transition we should wait 32uS after putting the FLL into freerun
before we proceed. In practice we appear to be getting enough delay from
the surrounding code, but better to make it explicit.

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>


# 341604ad 03-Nov-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: fix range of OPCLK_REF

The code was able to generate illegal OPCLK_REF values because the
reference frequency tables listed all values of SYSCLK instead of
valid values for OPCLK_REF clock. The maximum OPCLK_REF clock is
49.152MHz or 45.1584MHz.

Signed-off-by: Richard Fitzgerald <rf@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>


# 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>


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

ASoC: arizona: Add default cases for event switches

Since the addition of the WILL_PMU / WILL_PMD several of the switches in
arizona.c no longer cover all cases or have a default case. Whilst this
isn't causing any problems in the interests of robustness add default
cases.

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


# 1cf5a330 19-Aug-2015 Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com>

ASoC: arizona: Fix gain settings of FLL in free-run mode

The wrong register was used to set the gain of ref loop, when changing
the FLL output on an active FLL. This patch corrects the offset of the
gain register.

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


# 8019ff6c 16-Jul-2015 Nariman Poushin <nariman@opensource.wolfsonmicro.com>

regmap: Use reg_sequence for multi_reg_write / register_patch

Separate the functionality using sequences of register writes from the
functions that take register defaults. This change renames the arguments
in order to support the extension of reg_sequence to take an optional
delay to be applied after any given register in a sequence is written.
This avoids adding an int to all register defaults, which could
substantially increase memory usage for regmaps with large default tables.

This also updates all the clients of multi_reg_write/register_patch.

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5ed68f0a 09-Jul-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Use the more idiomatic params_width

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@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>


# 2c118b4c 02-Jun-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Add DVFS handling for sample rate control

The WM8997 and WM5102 codecs need to boost DVFS for higher sample rates.

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>


# 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>


# 1ac52145 01-Jun-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: arizona: 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
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>


# 17f4ad60 08-Mar-2015 Nicholas Mc Guire <hofrat@osadl.org>

ASoC: arizona: 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.

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>


# 112bdfaa 16-Feb-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

extcon: arizona: Deobfuscate arizona_extcon_do_magic

arizona_extcon_do_magic does not lend a lot of clarity to the purpose
of the function, and as all the registers used are described in the
datasheet there is no need to obfuscate the code. This patch renames the
function to arizona_extcon_hp_clamp, as it controls clamping on the
headphone output.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>


# 49010336 25-Feb-2015 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

mfd: arizona: Move useful defines into a dt-binding include

Move parts of linux/mfd/arizona/pdata.h and gpio.h into a new file in
the dt-binding directory for use by device tree bindings. This also
makes gpio.h redundant so remove it in the process.

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


# 575ef7f6 17-Jan-2015 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Add support for WM8280/WM8281

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
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>


# 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>


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

ASoC: arizona: 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>


# e9c7f34a 12-Nov-2014 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Add DSP_B and LEFT_J mode support

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>


# ef326f4b 12-Nov-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add support for 768kHz DMIC operation

The new IPs supports a new lower frequency 768kHz DMIC operation
add support for this into the OSR control.

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


# d74bcaae 09-Nov-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: wm5102: Move ultrasonic response settings lock to the driver level

The wm5102 driver currently uses the snd_soc_codec mutex to protect its
ultrasonic response settings from concurrent access. This patch moves this
lock to the driver level. This will allow us to eventually remove the
snd_soc_codec mutex.

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>


# c24084db 01-Sep-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

mfd: arizona: Add ASYNC_SAMPLE_RATE_2 registers

Some arizona devices have a second asynchronous sample rate, add the
registers necessary to support this.

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


# d114e5f7 12-Aug-2014 Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com>

ASoC: arizona: Fix TDM slot length handling in arizona_hw_params

TDM slot length was set same as word length, regardless of the value
received in set_tdm_slot. This patch sets the TDM slot length correctly
as received in set_tdm_slot DAI callback

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


# c0fe2c5b 15-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

mfd: arizona: Rename thermal shutdown interrupt

Newer versions of the IP introduce short circuit protection which will
also shutdown the speaker. Rename the interrupt and associated register
bits associated with thermal events to better fit the function and avoid
conflict with future interrupt additions.

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


# bedd4b19 22-Jul-2014 Richard Fitzgerald <rf@opensource.wolfsonmicro.com>

ASoC: arizona: Disable AIF TX/RX before configuring it

Changes to the AIF configuration registers only take
effect when the AIF is disabled. If the configuration
is being changed from the previous setup, temporarily
disable the AIF.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# c8badda8 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Update handling for input change on an active FLL

Currently, the driver places no restrictions on changes that can be
applied to an active FLL. However, it is only possible to change the
input for an active FLL, to change the output the FLL should be stopped
and then recofigured. This patch disallows changes in output frequency
and adds some additional handling to ensure the output remains
consistent across an input transition.

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


# 5e39a50b 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: FLL freerun only required whilst disabling

The FLL freerun is only required whilst we disable the FLL not the
entire time the FLL is disabled. This patch moves the FLL freerun
disable from the enable sequence to the disable sequence.

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


# c393aca9 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Correct return value of arizona_is_enabled_fll

arizona_is_enabled_fll currently returns a bool, but can throw an error.
The error will be basically ignored and we will treat the FLL as already
on. This patch changes the return to be an int and adds error code to
propagate the error up to the callback.

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


# 613124ce 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Coding standards, remove unneeded brackets

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


# 35a730a0 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Correct relationship between VCO corner and Fref

When configuring the FLL we must ensure that the reference clock passed
to the FLL is under a certain limit. This limit was specified
incorrectly in the current code, this patch corrects this. Although the
error will only be encountered in some edge cases.

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


# 29fee829 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Correct checking of FLL ratio limitations

The check to ensure the Fref frequency is within the bounds for the
current ratio, was placed in the wrong loop. The initial configuration
will always be valid and the loop lowering the ratio will only reinforce
this validity. The check should be on the loop increasing the ratio.
This could on occasion cause an invalid ratio/Fref combination to be
selected.

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


# 4714bc01 09-Jul-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Do not test ratio zero as it is not a valid setting

Zero is not a valid FRATIO for the FLL, as such we shouldn't test it
whilst refining the FRATIO. This patch does just that.

Reported-by: Ryo Tsutsui <ryo.tsutsui@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.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>


# cc9e9243 06-Jun-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: wm5102: Add controls to allow shaping of ultrasonic response

Add controls to allow custom shaping of the ultrasonic response. This
custom shaping can be turned on/off at runtime, although, it should be
noted that settings will not affect a currently open audio stream,
they will be applied when the next audio stream is started.

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


# ed70f3a2 04-Jun-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Implement TDM support for Arizona devices

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


# d0800342 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Support new fratio encoding on the wm5110 rev D

The reference clock path on newer IP FLLs requires a different
configuration, and should avoid integer mode operation. This patch adds
support for both the new encoding and updates the calculation.

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


# 5a3935c7 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Calculate FLL gain last

No part of the FLL calculation depends on the value determined for the
gain but the gain does depend on other values. In preparation for future
updates this patch moves the gain to be the last thing calculated.

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


# f641aec6 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Calculate OUTDIV first

OUTDIV will remain unchanged whilst the rest of the FLL configuration is
calculated so do this first.

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


# 8ccefcd2 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Don't pass Fout into arizona_calc_fll

As we now calculate the FLL configuration at a later stage in the
process the fout member of the FLL structure will contain the desired
Fout frequency so no need to pass this in seperately.

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


# 23f785a8 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Move calculation of FLL configuration

Currently the FLL configuration is calculated before it is known which
FLL path the configuration will be applied to. Newer versions of the IP
have differences in the configuration required for each FLL path, which
makes it complicated to calculate the FLL configuration in advance.

This patch simply checks the validity of a requested input and output
frequency before we know which FLL path they will be applied to and
saves the actual calculation of the configuration until we know where
the settings will be applied.

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


# 61719db8 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Move set of OUTDIV in to arizona_apply_fll

Since we know in arizona_apply_fll if we are setting the sync or ref
path there is no need to set the outdiv seperately anymore. This patch
moves this from arizona_enable_fll to arizona_apply_fll.

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


# 87383ac5 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Add defines for FLL configuration constants

Improve readability by adding defines for some of the constants
associated with FLL configuration.

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


# da28ed58 07-Mar-2014 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: An OUTDIV of 1 is not valid, avoid this

One is not a valid value for the OUTDIV start searching at 2 instead.

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


# 27ca2c30 18-Feb-2014 Takashi Iwai <tiwai@suse.de>

ASoC: arizona: Fix wrong number of items in enum ctls

arizona codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

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>


# 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>


# 3c43c695 11-Dec-2013 Mark Brown <broonie@linaro.org>

ASoC: arizona: Use async writes

Where possible write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.

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


# 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>


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

ASoC: arizona: Set FLL to free-run before disabling

The FLL must be placed into free-run mode before disabling
to allow it to entirely shut down.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.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>


# 49c60547 16-Sep-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Improve handling of setting REFCLK to 0

This patch suppresses calculation of REFCLK parameters when the REFCLK
source frequency is set to zero, additionally it will consider a source
frequency of zero as the REFCLK being disabled and switch to using the
SYNCCLK.

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


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

ASoC: wm8997: Initial CODEC driver

The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus
interfacing, for smartphones, tablets and other portable audio devices
based on the Arizona platform.

This patch adds the wm8997 CODEC driver.

[Fixed some interface churn from bitrot due to the patch not going via
the MFD tree as expected -- broonie]

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>


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

ASoC: arizona: Add default case to silence build warning

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
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>


# 1a2c7d56 24-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Add delay after powering up line level outputs

Ensure that the outputs are fully enabled before we begin passing audio
through them.

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>


# aed9913e 26-Mar-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn>

ASoC: arizona: remove duplicated include from arizona.c

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>


# f4a76e7c 12-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Suppress speaker enable if thermal shutdown is flagged

Ensure that the device state does not diverge from the state we have set
in the register map in order to make the behaviour clearer.

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


# 899817e2 12-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Log thermal events

Help with debuggability.

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>


# 76bf969e 04-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Ensure we clock two channels for I2S mode

I2S requires stereo clocking even for mono data.

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>


# 86cd684f 07-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Suppress reference calculations when setting REFCLK to 0

Allow users to keep on specifying their output frequency when disabling
the reference clock.

Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# eca2e8e2 05-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Ensure synchroniser is disabled when not needed

When live configuring a FLL configuration with no synchroniser disable the
synchroniser in case the previous configuration used one.

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


# 8f113d7d 04-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Optimise FLL loop gains

For optimal performance the FLL loop gain should be adjusted depending on
the frequency of the input clock for the loop.

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


# 576411be 04-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Increase FLL synchroniser bandwidth for high frequencies

If we are using a high freqency SYNCCLK then increasing the bandwidth of
the synchroniser improves performance.

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


# ff680a17 04-Mar-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: If we only have a clock to synchronise with make it REFCLK

If there is only one clock active the FLL should use REFCLK rather than
SYNCCLK as the clock to synchronise with since REFCLK is always required.

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


# 1c5617fc 22-Feb-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Don't enable FLL on REFCLK configuration

Enabling the FLL when REFCLK is being configured is not what the user
would expect and can cause issues if SYNCCLK has no specified frequency.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
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>


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

ASoC: arizona: Factor out FLL enable

In preparation for additional features on the FLL this patch factors out
the code for enabling an FLL into a seperate function.

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


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

ASoC: arizona: Factor out FLL disable

In preparation for additional features on the FLL this patch factors out
the code for disabling an FLL into a seperate function.

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


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

ASoC: arizona: Factor out check for enabled FLL

In preparation for additional features on the FLL this patch factors out
the code which checks if an FLL is currently enabled into a seperate
function.

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>


# 43cd8bf1 06-Feb-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Automatically manage input mutes

For optimal performance the inputs should be kept muted until after power
up. Since there are few use cases for muting inputs during capture move
the mutes to automatic control.

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


# 9092a6ea 06-Feb-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Fix debug logging level for FLLs and AIFs

Use _dbg for debug messages.

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


# 01f58153 03-Feb-2013 Ryo Tsutsui <ryo.tsutsui@wolfsonmicro.com>

ASoC: arizona: Fixed a bug in FLL fractional calculation

Previously arizona_calc_fll() was checking if the target frequency is
exactly divisible by reference frequency, but should have been product
of the ratio and the reference frequency.

Also scale down the Lamba and Theta coefficients be under 16-bits in
order to match the registers.

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


# c94aa30e 17-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Allow number of channels clocked to be restricted

Place a cap on the number of channels clocks are generated for. This is
intended for use with systems which have the WM5102 master an I2S bus with
multiple data lines.

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


# f2c26d48 21-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Support clearing clocks

Some systems may wish to support switching between telephony and CD audio
clock rates but this is restricted by enforcement of constraints on the
current DAI clock. Support setting clocks to zero and don't enforce any
constraints in that case in order to facilitate this use case.

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


# b59e0f82 16-Jan-2013 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK

Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than
is required.

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


# 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>


# e31c1946 07-Jan-2013 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

ASoC: arizona: Disable free-running mode on FLL1

The free running mode can cause problems when attempting to bring up the
FLL running from a defined clock source. This patch disables
free-running mode.

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


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

ASoC: arizona: Factor out rate selection code

In preparation for more advanced sample rate managment move the existing
code out of the main hw_params() function.

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>


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

ASoC: arizona: Remove DSP B and left justified AIF modes

These are not supported.

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


# 7110a287 20-Dec-2012 Axel Lin <axel.lin@ingics.com>

ASoC: arizona: Do proper shift for setting AIF rate

ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

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


# 01df259f 12-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Implement tristate support

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


# 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>


# c8d35a6a 06-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Log the clock we're setting the DAI to use

Useful for diagnostics.

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


# 0c778e86 06-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Store the DAI clock ID when setting

So the code to suppress duplicate changes is effective.

Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.comyu@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 09871a94 05-Dec-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Make FLL lock timeout very high

Provide robustness against low quality FLL sync clocks by increasing the
timeout for lock to an absurdly high point; we should never get anywhere
near hitting the timeout in a real system unless it is failing.

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


# 50fcfe45 28-Nov-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Record FLL setting when disabling

Otherwise we skip reenables.

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>


# 38113360 26-Nov-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Support higher clock rates

Some devices support higher clock rates, allow users to select these.

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


# 96e1f18f 15-Nov-2012 Dimitris Papastamos <dp@opensource.wolfsonmicro.com>

ASoC: arizona: Fix typo - Swap value in 48k_rates[] and 44k1_rates[]

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


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

ASoC: arizona: Add more clock rates

Some devices support additional clock rates.

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>


# 6b315958 12-Sep-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Clarify logging for FLL lock status interrupt

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


# 4758be37 05-Sep-2012 Heather Lomond <hlomond@opensource.wolfsonmicro.com>

ASoC: arizona: Fix typo in 44.1kHz rates

Signed-off-by: Heather Lomond <hlomond@opensource.wolfsonmicro.com>
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>


# a837987e 08-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Export dai_ops

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


# 410837a7 05-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Change DAPM routes for AIF clocks when we change them

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


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

ASoC: arizona: Enable ASYNCCLK domain for audio interfaces

If an audio interface is configured to use ASYNCCLK then update the
asynchronous sample rate rather than one of our primary sample rates.

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


# 5001765f 04-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Be more forgiving in BCLK selection

Allow any BCLK which can be divided down to generate LRCLK, not just the
lowest possible BCLK to clock out the samples.

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>


# 949e6bc7 04-Jul-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: arizona: Rename current rates tables to bclk_rates

They're the rates for the BCLK, not for the sample rate, so rename so that
we don't confuse ourselves.

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>