History log of /linux-master/sound/soc/codecs/ssm2602.c
Revision Date Author Comments
# f63550e2 08-May-2023 Paweł Anikiel <pan@semihalf.com>

ASoC: ssm2602: Add workaround for playback distortions

Apply a workaround for what appears to be a hardware quirk.

The problem seems to happen when enabling "whole chip power" (bit D7
register R6) for the very first time after the chip receives power. If
either "output" (D4) or "DAC" (D3) aren't powered on at that time,
playback becomes very distorted later on.

This happens on the Google Chameleon v3, as well as on a ZYBO Z7-10:
https://ez.analog.com/audio/f/q-a/543726/solved-ssm2603-right-output-offset-issue/480229
I suspect this happens only when using an external MCLK signal (which
is the case for both of these boards).

Here are some experiments run on a Google Chameleon v3. These were run
in userspace using a wrapper around the i2cset utility:
ssmset() {
i2cset -y 0 0x1a $(($1*2)) $2
}

For each of the following sequences, we apply power to the ssm2603
chip, set the configuration registers R0-R5 and R7-R8, run the selected
sequence, and check for distortions on playback.

ssmset 0x09 0x01 # core
ssmset 0x06 0x07 # chip, out, dac
OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x87 # out, dac
ssmset 0x06 0x07 # chip
OK

(disable MCLK)
ssmset 0x09 0x01 # core
ssmset 0x06 0x1f # chip
ssmset 0x06 0x07 # out, dac
(enable MCLK)
OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x1f # chip
ssmset 0x06 0x07 # out, dac
NOT OK

ssmset 0x06 0x1f # chip
ssmset 0x09 0x01 # core
ssmset 0x06 0x07 # out, dac
NOT OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x0f # chip, out
ssmset 0x06 0x07 # dac
NOT OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x17 # chip, dac
ssmset 0x06 0x07 # out
NOT OK

For each of the following sequences, we apply power to the ssm2603
chip, run the selected sequence, issue a reset with R15, configure
R0-R5 and R7-R8, run one of the NOT OK sequences from above, and check
for distortions.

ssmset 0x09 0x01 # core
ssmset 0x06 0x07 # chip, out, dac
OK

(disable MCLK)
ssmset 0x09 0x01 # core
ssmset 0x06 0x07 # chip, out, dac
(enable MCLK after reset)
NOT OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x17 # chip, dac
NOT OK

ssmset 0x09 0x01 # core
ssmset 0x06 0x0f # chip, out
NOT OK

ssmset 0x06 0x07 # chip, out, dac
NOT OK

Signed-off-by: Paweł Anikiel <pan@semihalf.com
Link: https://lore.kernel.org/r/20230508113037.137627-8-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org


# 8076c586 14-Apr-2023 Paweł Anikiel <pan@semihalf.com>

ASoC: ssm2602: Add support for CLKDIV2

The SSM260x chips have an internal MCLK /2 divider (bit D7 in register
R8). Add logic that allows for more MCLK values using this divider.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
Link: https://lore.kernel.org/r/20230414140203.707729-7-pan@semihalf.com
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: ssm*: Remove now redundant non_legacy_dai_naming flag

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

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


# 0160e883 02-Jun-2022 Mark Brown <broonie@kernel.org>

ASoC: ssm2602: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ssm2602 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602130531.3552275-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4735c8ca 14-Jan-2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: ssm2602: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

- xxx_rates;
+ xxx_rate;

- xxx_samplebits;
+ xxx_sample_bits;

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


# bd63ed76 08-Jul-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream()

snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

int snd_soc_dai_digital_mute(xxx, int direction)
{
...
else if (dai->driver->ops->mute_stream)
(1) return dai->driver->ops->mute_stream(xxx, direction);
else if (direction == SNDRV_PCM_STREAM_PLAYBACK &&
dai->driver->ops->digital_mute)
(2) return dai->driver->ops->digital_mute(xxx);
...
}

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/871rllxxhp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 47306401 06-Feb-2019 Marco Felsch <m.felsch@pengutronix.de>

ASoC: ssm2602: switch to SPDX identifier

Drop old license header and switch to SPDX-License-Identifier.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 37768e39 06-Feb-2019 Philipp Zabel <p.zabel@pengutronix.de>

ASoC: ssm2602: Fix ADC powerup sequencing

According to the ssm2603 data sheet (control register sequencing), the
digital core should be activated only after all necessary bits in the
power register are enabled, and a delay determined by the decoupling
capacitor on the VMID pin has passed. If the digital core is activated
too early, or even before the ADC is powered up, audible artifacts
appear at the beginning of the recorded signal.

The digital core is also needed for playback, so when recording starts
it may already be enabled. This means we cannot get the power sequence
correct when we want to be able to start recording after playback.

As a workaround put the MIC mute switch into the DAPM routes. This
way we can keep the recording disabled until the MIC Bias has settled
and thus get rid of audible artifacts.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
m.felsch@pengutronix.de: adapt commit message
m.felsch@pengutronix.de: drop of configuration as mentioned by Mark:
https://patchwork.kernel.org/patch/10407449/
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a01df75c 19-Mar-2018 James Kelly <jamespeterkelly@gmail.com>

ASoC: ssm2602: Replace reg_default_raw with reg_default

SSM2602 driver is broken on recent kernels (at least
since 4.9). User space applications such as amixer or
alsamixer get EIO when attempting to access codec
controls via the relevant IOCTLs.

Root cause of these failures is the regcache_hw_init
function in drivers/base/regmap/regcache.c, which
prevents regmap cache initalization from the
reg_defaults_raw element of the regmap_config structure
when registers are write only. It also disables the
regmap cache entirely when all registers are write only
or volatile as is the case for the SSM2602 driver.

Using the reg_defaults element of the regmap_config
structure rather than the reg_defaults_raw element to
initalize the regmap cache avoids the logic in the
regcache_hw_init function entirely. It also makes this
driver consistent with other ASoC codec drivers, as
this driver was the ONLY codec driver that used the
reg_defaults_raw element to initalize the cache.

Tested on Digilent Zybo Z7 development board which has
a SSM2603 codec chip connected to a Xilinx Zynq SoC.

Signed-off-by: James Kelly <jamespeterkelly@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org


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

ASoC: ssm2602: replace codec to component

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

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

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


# a180ba45 03-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ASoC: codecs: add const to snd_soc_codec_driver structures

Declare snd_soc_codec_driver structures as const as they are only passed
as an argument to the function snd_soc_register_codec. This argument is
of type const, so declare the structures with this property as const.
In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
a copy operation along with getting passed to snd_soc_register_codec.
So, it can be made const too.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_soc_codec_driver s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_soc_register_codec(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_soc_codec_driver s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: codec duplicated callback function goes to component on ssm2602

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

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


# f9d54802 02-Aug-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE

DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
- TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
...
-};
+);
// </smpl>

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


# fa68cfd4 04-May-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: 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>
Signed-off-by: Mark Brown <broonie@kernel.org>


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

ASoC: Move bias level update to the core

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

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


# 3b2a0013 29-Sep-2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample rates

This adds the necessary values to the constraint list and
register values to the coefficient table in order to
configure the device for 11.025kHz and 22.5kHz sample rates.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>


# fe2a08b3 29-Sep-2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

ASoC: ssm2602: do not hardcode type to SSM2602

The correct type (SSM2602/SSM2603/SSM2604) is passed down
from the ssm2602_spi_probe()/ssm2602_spi_probe() functions,
so use that instead of hardcoding it to SSM2602 in
ssm2602_probe().

Fixes: c924dc68f737 ("ASoC: ssm2602: Split SPI and I2C code into different modules")
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org


# 85362efb 04-Sep-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Cleanup manual bias level transitions

Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. While we are at it also remove the
regcache_cache_only() calls from suspend/resume as there shouldn't be any IO
between suspend and resume.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

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


# 00a37032 30-Jul-2014 Mark Brown <broonie@linaro.org>

ASoC: ssm2602: Convert to params_width()

The CODEC doesn't care how data is laid out in memory.

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


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

ASoC: codec: Simplify ASoC probe code.

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

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


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

ASoC: ssm2602: Omit superfluous elements in input select array

The array contains too many elements although it should have only
two.

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>


# c924dc68 17-Feb-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Split SPI and I2C code into different modules

There are a few known (minor) problems with having the support code for both I2C
and SPI in the same module:
* We need to be extra careful to make sure to not build the driver into the
kernel if one of the subsystems is build as a module (Currently only I2C
can be build as a module).
* The module init path error handling is rather ugly. E.g. what should be
done if either the SPI or the I2C driver fails to register? Most drivers
that implement SPI and I2C in the same module currently fallback to
undefined behavior in that case. Splitting the the driver into two
modules, one for each bus allows the registration of the other bus driver
to continue without problems if one of them fails.

This patch splits the ssm2602 driver into 3 modules. One core module that
implements the device logic, but is independent of the bus method used. And one
module for SPI and I2C each that registers the drivers and sets up the regmap
struct for the bus.

While we are at it also cleanup the include section of the ssm2602 driver and
remove unneeded includes.

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


# f75ac2d9 05-Feb-2014 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Constify rate constraints

The rate constraints in this driver are shared between all device instances. It
should not be (and is not) modified at runtime, so make them const.

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


# 7ae2b55b 07-Jan-2014 Andreas Pretzsch <apr@cn-eng.de>

ASoC: ssm2602: add 16kHz sampling rate support

SSM260x also supports 16kHz with external master clocks of 12.000MHz,
12.288MHz and 18.432MHz.
Add matching coefficients, update constraints and announced rates.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# a010ff62 02-Dec-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Use core for applying symmetry constraints

Let the core take care of applying sample rate and sample bits constraints
instead of open-coding this in the driver.

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


# e42644c6 20-Nov-2013 Fabio Estevam <festevam@gmail.com>

ASoC: ssm2602: Use IS_ENABLED() macro

Using the IS_ENABLED() macro can make the code shorter and simpler.

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


# 9d863b88 31-Aug-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Fix cache sync

The ssm2602 uses regmap for caching not soc-cache, so we need to use
regcache_sync() instead of snd_soc_cache_sync().

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


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

ASoC: codecs: remove __dev* attributes

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

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

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


# bec3d9a9 25-Apr-2012 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Convert to direct regmap API usage

Mostly a one to one converion. On one occasion the patch replaces a
snd_soc_read-snd_soc_write sequence with regmap_update_bits though as it helps
to keep the conversion simple.

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


# d86a11d6 25-Apr-2012 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Remove driver specific version

We have never really updated that version number and probably never will, so
just remove it.

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


# 8b3f39da 25-Apr-2012 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Add sysclk based rate constraints

Not all advertised rates are available for all sysclk frequencies. Add
additional sysclk based rate constraints.

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


# e6968a17 04-Apr-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: codecs: Remove rtd->codec usage from CODEC drivers

In order to support CODEC<->CODEC links remove the assumption that there
is only a single CODEC on a DAI link by removing the use of the CODEC
pointer in the rtd from the CODEC drivers. They are already being passed
their DAI whenever they are passed an rtd and can get the CODEC from
there.

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


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

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

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

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

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

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

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

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

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

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

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


# 8eeffe98 28-Dec-2011 Axel Lin <axel.lin@gmail.com>

ASoC: Convert ssm2602 to devm_kzalloc()

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


# 84b315ee 02-Dec-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: Drop unused state parameter from CODEC suspend callback

The existence of this parameter is purely historical. None of the CODEC drivers
uses it and we always pass in the same value anyway, so it should be safe to
remove it.

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


# 997c2ea9 26-Nov-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Remove unneeded platform_device.h inclusions from CODECs

They've not been needed for a long time if they were ever required.

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


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

ASoC: Constify snd_soc_dai_ops structs

Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

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


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

ASoC: ssm2602: Use snd_soc_update_bits for read-modify-write

Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

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


# 02890535 27-Sep-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Support setting the oscillator and the clock output state

Currently the oscillator is always enabled and the clock output is always
disabled. This patch adds support for controlling the oscillator and clock
output state through snd_soc_dai_set_sysclk. Which makes it possible to
disable or enable them dynamically according to the requirements of the board
on which the CODEC is used.

This patch also slightly modifies the behavior as to when the oscillator is
going to be disabled in low-power states. Previously it would only be disabled
in BIAS_OFF, now it is also going to be disabled in BIAS_STANDBY, since no
components which depend on it should be active in this state.

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


# a9d1974e 27-Sep-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Set initial bias level to standby

Set the initial bias level to standby during CODEC probe instead of leaving the
CODEC powered off.

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


# 9058020c 27-Sep-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Re-enable oscillator after suspend

Currently the the internal oscillator is powered down when entering BIAS_OFF
state, but not re-enabled when going back to BIAS_STANDBY. As a result the
CODEC will stop working after suspend if the internal oscillator is used to
generate the sysclock signal. This patch fixes it by clearing the appropriate
bit in the power down register when the CODEC is re-enabled.

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


# 26806a42 20-Sep-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: ssm2602: Do not dereference codec->control_data

The driver assumes that control_data points to the drivers i2c_client struct,
but this is no longer the case since the ASoC core has switched to regmap.

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


# 3afb1b3e 10-May-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Fix NULL vs. 0 warning in SSM2602

sparse complains if 0 is used as a NULL pointer constant.

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


# f3eee00d 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Provide dB ranges for the volume controls

Also fix the maximum value for the capture volume control.

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


# 2a43801a 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Model power supply for the digital core as a DAPM widget

Model the power supply for the digital core as a DAPM_SUPPLY widget. This allows
to cleanup the code a bit.

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


# 7dcf2760 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Add entry for the ssm2603 to the device id table

The SSM2603 is mostly register compatible with the SSM2602 and can be supported
by the current driver without any changes.

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


# b1f7b2b5 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Add SSM2604 support

The SSM2604 is basically a lightweight variant of the SSM2602 with a compatible
register layout. Thus we can easily support both devices by the same driver,
by providing a slightly set of controls, widgets and routes.

Compared to the SSM2602 the SSM2604 has no microphone input and no headphone
output.

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


# f6c1f2d5 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Do not power the codec up in probe

It is not required to have the codec powered at this stage and DAPM will power
the ADC and DAC down again after probe has run anyway.
Thus we avoid some unnecessary writes by this change.

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


# 7164bdb6 08-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Fix default register cache

Some of the values in the default register cache did not represent the codecs
state after reset. This patch fixes it.

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


# ffd13c39 05-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Remove duplicate control

There are currently two controls which allow selecting the capture source, one
as a normal control, the other as part of a DAPM_MUX widget.
Remove the normal control.

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


# 0b4cd2e0 05-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Cleanup coeff handling

Drop unused field from the coeff struct, precalculate the srate register at
compile-time and cleanup up the naming.

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


# 8fc63fe9 05-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Fix reg_cache_size

reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

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


# 36c90ab3 05-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Fix 'Mic Boost2' control

The 'Mic Boost2' control's shift was off by one and thus was not working.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org


# 04b89455 05-May-2011 Lars-Peter Clausen <lars@metafoo.de>

ASoC: SSM2602: Properly annotate i2c probe and remove functions

Annotate the i2c probe and remove functions with __devinit and __devexit.

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


# b39e2855 07-Apr-2011 Mike Frysinger <vapier@gentoo.org>

ASoC: SSM2602: add SPI support

The ssm2602 codec has a SPI interface as well as I2C, so add the simple
bit of glue to make it usable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 93547e89 27-Mar-2011 Cliff Cai <cliff.cai@analog.com>

ASoC: SSM2602: convert to soc-cache

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2a161018 26-Mar-2011 Mike Frysinger <vapier@gentoo.org>

ASoC: SSM2602: fix codec name

The codec name should not have a "-codec" suffix since this is not part of
a MFD. This was incorrectly changed during the multi-component updated.

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


# 505fb824 21-Nov-2010 Jarkko Nikula <jhnikula@gmail.com>

ASoC: Do not include soc-dapm.h

There is no need to include soc-dapm.h since soc.h includes it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# ce6120cc 05-Nov-2010 Liam Girdwood <lrg@slimlogic.co.uk>

ASoC: Decouple DAPM from CODECs

Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
required when developing ASoC further. Such as for other ASoC components to
have DAPM widgets or when extending DAPM to handle cross-device paths.

This patch decouples DAPM related variables from struct snd_soc_codec and
moves them to new struct snd_soc_dapm_context that is used to encapsulate
DAPM context of a device. ASoC core and API of DAPM functions are modified
to use DAPM context instead of codec.

This patch does not change current functionality and a large part of changes
come because of structure and internal API changes.

Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some
minor core changes, codecs and machine driver conversions from
Jarkko Nikula <jhnikula@gmail.com>.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Timur Tabi <timur@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Jassi Brar <jassi.brar@samsung.com>
Cc: Daniel Gloeckner <dg@emlix.com>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c6d5cca0 14-Sep-2010 Jarkko Nikula <jhnikula@gmail.com>

ASoC: Remove needless codec->bias_level assignment to SND_SOC_BIAS_OFF

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

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# f0fba2ad 17-Mar-2010 Liam Girdwood <lrg@slimlogic.co.uk>

ASoC: multi-component - ASoC Multi-Component Support

This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

struct snd_soc_codec ---> struct snd_soc_codec (device data)
+-> struct snd_soc_codec_driver (driver data)

struct snd_soc_platform ---> struct snd_soc_platform (device data)
+-> struct snd_soc_platform_driver (driver data)

struct snd_soc_dai ---> struct snd_soc_dai (device data)
+-> struct snd_soc_dai_driver (driver data)

struct snd_soc_device ---> deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

* Stream operations now de-reference less structures.
* close_delayed work() now runs on a DAI basis rather than looping all DAIs
in a card.
* PM suspend()/resume() operations can now handle N CODECs and Platforms
per sound card.
* Added soc_bind_dai_link() to bind the component devices to the sound card.
* Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
DAI link components.
* sysfs entries can now be registered per component per card.
* snd_soc_new_pcms() functionailty rolled into dai_link_probe().
* snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

o Make CODEC driver a platform driver
o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
o Removed all static codec pointers (drivers now support > 1 codec dev)
o snd_soc_register_pcms() now done by core.
o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

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


# 29e189c2 07-May-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Remove unneeded suspend bias managment from CODEC drivers

The core will ensure that the device is in either STANDBY or OFF bias
before suspending, restoring the bias in the driver is unneeded. Some
drivers doing slightly more roundabout things have been left alone
for now.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b2c812e2 14-Apr-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Add indirection for CODEC private data

One of the features of the multi CODEC work is that it embeds a struct
device in the CODEC to provide diagnostics via a sysfs class rather than
via the device tree, at which point it's much better to use the struct
device private data rather than having two places to store it. Provide
an accessor function to allow this change to be made more easily, and
update all the CODEC drivers are updated.

To ensure use of the accessor the private data structure member is
renamed, meaning that if code developed with older an older core that
still uses private_data is merged it will fail to build.

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


# 5a0e3ad6 24-Mar-2010 Tejun Heo <tj@kernel.org>

include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>


# 4b527e29 08-Mar-2010 Cliff Cai <cliff.cai@analog.com>

ASoC: SSM2602: add SND control for mic boost2 and default it to off

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 0a3f5e35 12-Nov-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Remove redundant snd_soc_dapm_new_widgets() calls

The DAPM widgets are now insntantiated by the core when creating the card
so there is no need for the individual CODEC drivers to do so.

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


# fe3e78e0 03-Nov-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Factor out snd_soc_init_card()

snd_soc_init_card() is always called as the last part of the CODEC probe
function so we can factor it out into the core card setup rather than
have each CODEC replicate the code to do the initialiastation. This will
be required to support multiple CODECs per card.

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


# 5ba73683 13-Jun-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Revert duplicated code in SSM2602 driver

The Blackfin submission was done as a patch against a different tree
and contained a duplicate hunk which will cause us to loose track of the
substream pointers when shutting down. Remove one of the duplicated
hunks.

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


# f692fce0 01-Jun-2009 Cliff Cai <cliff.cai@analog.com>

ASoC: SSM2602: assign last substream to the master when shutting down

Fixes crash when shutting down.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 2552a710 01-Jun-2009 Cliff Cai <cliff.cai@analog.com>

ASoC: SSM2602: remove unsupported sample rates

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6335d055 02-Mar-2009 Eric Miao <eric.y.miao@gmail.com>

ASoC: make ops a pointer in 'struct snd_soc_dai'

Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.

The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 6627a653 23-Jan-2009 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Push the codec runtime storage into the card structure

This is a further stage on the road to refactoring away the ASoC
platform device.

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


# 3e8e1952 08-Jan-2009 Ian Molton <ian@mnementh.co.uk>

ASoC: cleanup duplicated code.

Many codec drivers were implementing cookie-cutter copies of the function
that adds kcontrols to the codec.

This patch moves this code to a common function snd_soc_add_controls() in
soc-core.c and updates all drivers using copies of this function to use the
new common version.

[Edited to raise priority of error log message and document parameters.
-- broonie]

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c6913485 22-Dec-2008 Jarkko Nikula <jarkko.nikula@nokia.com>

ASoC: Fix DSP formats in SSM2602 audio codec

Thanks to Troy Kisky <troy.kisky@boundarydevices.com> for noticing.

- DSP_A format has 1-bit data delay which corresponds to SSM6202 submode 2
- DSP_B has 0-bit data delay which corresponds to submode 1
- Currently driver sets them opposite so swap the submode setting

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# c9b3a40f 09-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: ASoC - Fix wrong section types

The module init entries should be __init instead of __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 64089b84 08-Dec-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Register non-AC97 codec DAIs

Currently this is done at module probe time since ASoC ties in codec
device probe to the instantiation of the entire ASoC device. Subsequent
patches will refactor the codec drivers to handle probing separately.
Note that the core does not yet use this information.

AC97 is special since the codec is controlled over the AC97 link but
we want to give the machine driver a chance to set up the system before
trying to instantiate since it may need to do configuration before the
AC97 link will operate

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


# 968a6025 28-Nov-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Rename snd_soc_register_card() to snd_soc_init_card()

Currently ASoC card initialisation is completed by a function called
snd_soc_register_card(). As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.

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


# dee89c4d 18-Nov-2008 Mark Brown <broonie@opensource.wolfsonmicro.com>

ASoC: Merge snd_soc_ops into snd_soc_dai_ops

Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.

This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.

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


# 5de27b6c 20-Nov-2008 Karl Beldan <karl.beldan@gmail.com>

ASoC: ssm2602: Update supported stream formats

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


# faab5a32 20-Nov-2008 Karl Beldan <karl.beldan@gmail.com>

ASoC: ssm2602: Fix priv substreams refs

Clean up our record of the active streams in shutdown(), fixing
subsequent failures of snd_pcm_hw_constraints_complete after closure of
a stream.

NOTE:
- The ssm2602 allows pairs of non-matching PB/REC rates.
- This is a fix for less evil:
The logic is flawed (e.g. the slave might startup before the
master's rate and sample_bits are set).

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


# 3ab57fbe 07-Oct-2008 Jarkko Nikula <jarkko.nikula@nokia.com>

ALSA: ASoC: Remove unused AUDIO_NAME define from codec drivers

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b7138212 05-Sep-2008 Cliff Cai <cliff.cai@analog.com>

sound: ASoC codec: SSM2602 audio codec driver

[Some checkpatch fixups done by Mark Brown.]

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>