Commit Graph

59 Commits

Author SHA1 Message Date
Thomas Gleixner
d2912cb15b 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>
2019-06-19 17:09:55 +02:00
Richard Fitzgerald
0a047f0752
ASoC: wm_adsp: Declare firmware controls from codec driver
To allow for more flexibility in naming of DSP-type cores
move the creation of the firmware controls to the codec
drivers instead of having a hardcoded list in wm_adsp.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-08 17:31:48 +01:00
Colin Ian King
57b70db28b
ASoC: wm2200,wm5100: fix spelling mistake: "Coefficeints" -> "Coefficients"
Trivial fix to spelling mistakes in SND_SOC_BYTES literal strings

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-18 10:14:39 +01:00
Kuninori Morimoto
908b530863
ASoC: wm2200: replace codec to component
Now we can replace Codec to Component. Let's do it.

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

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12 09:39:29 +00:00
Kuninori Morimoto
0e2d95aadd
ASoC: wm2200: don't use snd_soc_dai::symmetric_rates
wm2200 is the only user of snd_soc_dai::symmetric_rates.
Now, wm2200 is using single DAI on Component.
Thus, wm2200_priv : snd_soc_dai : snd_soc_component are 1 : 1 : 1.
We can replace snd_soc_dai::symmetric_rates on wm2200_priv.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-22 15:57:40 +00:00
Kuninori Morimoto
ac769ab172
ASoC: wm2200: use snd_soc_codec_get_drvdata()
snd_soc_codec_get_drvdata() is common function to get
private data. Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-22 15:57:39 +00:00
Charles Keepax
4090d63b49 ASoC: wm2200: Correct types of mixer texts and values
The core expects "const char * const" and "unsigned int" for enum
controls, the mixer control definitions in wm2200 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>
2016-11-10 16:19:42 +00:00
Julia Lawall
f802d6c020 ASoC: constify snd_soc_codec_driver structures
Check for snd_soc_codec_driver structures that are only passed to
snd_soc_register_codec or memcpy (2nd arg), for which the corresponding
parameters are declared const.  Declare as const snd_soc_codec_driver
structures that have these properties.

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

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

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

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

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

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01 20:55:31 +01:00
Kuninori Morimoto
b68f37aa2e ASoC: codec duplicated callback function goes to component on wm2200
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>
2016-08-08 11:57:57 +01:00
Mark Brown
c009d370dd Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', 'asoc/topic/ux500' and 'asoc/topic/width' into asoc-next 2015-08-30 15:58:18 +01:00
Mark Brown
532161e6cc Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next 2015-08-30 15:55:54 +01:00
Mark Brown
d781c23e9b Merge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic/qcom' into asoc-next 2015-08-30 15:55:41 +01:00
Axel Lin
0a3dcb509a ASoC: Use params_width() at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:31:31 +01:00
Mark Brown
41a5fefeff regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-reg-default

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.

Conflicts:
	sound/soc/codecs/da7210.c
	sound/soc/codecs/rt5651.c
	sound/soc/codecs/wm8993.c
2015-07-17 19:32:04 +01:00
Axel Lin
42d1b8ce29 ASoC: Constify dev_pm_ops variables
The dev_pm_ops variables are not modified after initialization in these
drivers, so make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:14:48 +01:00
Nariman Poushin
8019ff6cfc 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>
2015-07-16 22:02:55 +01:00
Mark Brown
7d9fb377a7 Merge branches 'topic/owner' and 'topic/reg-default' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9877 2015-07-16 21:35:01 +01:00
Krzysztof Kozlowski
1c07a4de5b ASoC: drivers: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 12:50:43 +01:00
Axel Lin
c418a84a8c ASoC: Constify reg_default tables
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-07 14:39:02 +01:00
Richard Fitzgerald
336d0442b9 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>
2015-06-19 11:17:23 +01:00
Lars-Peter Clausen
f263fa3e0f ASoC: wm2200: Drop unnecessary dapm bias_level initialization
The default value for the bias_level is SND_SOC_BIAS_OFF when probe is being
called, there is no need to initialize it explicitly.

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>
2015-03-17 12:09:41 +00:00
Nicholas Mc Guire
78bb997ace ASoC: wm2200: 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>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-09 18:18:34 +00:00
Rafael J. Wysocki
641d334b29 sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under sound/.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
2014-12-13 00:42:18 +01:00
Lars-Peter Clausen
7eb364ab19 ASoC: wm2200: Replace usage deprecated MUX/ENUM macros
SND_SOC_DAPM_VALUE_MUX and SOC_DAPM_VALUE_ENUM are deprecated and merely an
alias for SND_SOC_DAPM_MUX and SOC_DAPM_ENUM. Replace the deprecated macros so
we can eventually remove their definition.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14 20:40:05 +01:00
Mark Brown
2620954d64 Merge remote-tracking branch 'asoc/topic/io' into asoc-next 2014-03-13 14:19:21 +00:00
Xiubo Li
5d6be5aa6b 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>
2014-03-11 09:59:05 +00:00
Takashi Iwai
9614be73d8 ASoC: wm2200: Use SOC_ENUM_SINGLE_DECL()
Just replace with the helper macro.  No functional change at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-23 11:33:09 +09:00
Mark Brown
b6ed61cfa2 ASoC: wm_adsp: Split ADSP1 and ADSP2 firmware controls
Now that we have regular register mapped controls we should be splitting
the control sets for ADSP1 and ADSP2 as the register maps are not
identical. Do that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29 18:00:24 +00:00
Mark Brown
3bb26706d9 Merge remote-tracking branch 'asoc/topic/wm2200' into asoc-next 2013-02-11 11:06:49 +00:00
Chris Rattray
1a78624323 ASoC: wm2200: Provide platform data for MICBIAS configuration
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-05 15:53:07 +00:00
Chris Rattray
0d2b642252 ASoC: wm2200: correct IN2L and IN3L digital mute
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-02-04 18:44:27 +00:00
Chris Rattray
4c97e8fedf ASoC: wm2200: Add Rx ANC input select control
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 10:51:46 +00:00
Chris Rattray
0098389564 ASoC: wm2200: Set system clock control register is adsp structs
Allows ADSP control code to set the dsp clock rate to match the
sys clock rate.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:03:23 +08:00
Mark Brown
908a5741ab ASoC: wm2200: Implement EQ and LHPF coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:10:25 +09:00
Mark Brown
82e993fac4 ASoC: wm2200: Add controls for firmware enumeration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:06:26 +09:00
Chris Rattray
a80cc73428 ASoC: wm2200: correct mixer values and text
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-16 20:47:26 +09:00
Mark Brown
5851cb3daf ASoC: wm2200: Initialise the ADSPs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:25:24 +09:00
Mark Brown
0cc411b934 ASoC: wm2200: 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
2013-01-04 11:31:57 +00:00
Axel Lin
2a5f431592 ASoC: wm2200: Fix setting dai format in wm2200_set_fmt
According to the defines in wm2200.h:
/*
 * R1284 (0x504) - Audio IF 1_5
 */

We should not left shift 1 bit for fmt_val when setting dai format.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-21 09:32:20 +00:00
Bill Pemberton
7a79e94e97 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>
2012-12-10 00:31:51 +09:00
Sachin Kamat
f55ec27f48 ASoC: wm2200: Remove empty labels
Removed unnecessary labels probably left out of some previous cleanup.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28 19:19:23 +00:00
Mark Brown
f017eb299c ASoC: wm2200: Convert over to wm_adsp for ADSP1 support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-28 17:58:27 +00:00
Randy Dunlap
8858086f35 ASoC: fix wm2200.c printk format warnings
Fix wm2200.c printk format warnings (seen on x86_64):

sound/soc/codecs/wm2200.c:1027:4: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
sound/soc/codecs/wm2200.c:1139:5: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'
sound/soc/codecs/wm2200.c:1181:2: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
sound/soc/codecs/wm2200.c:1201:5: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'
sound/soc/codecs/wm2200.c:1264:4: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
sound/soc/codecs/wm2200.c:1328:5: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-22 14:40:02 +01:00
Mark Brown
9874482985 ASoC: wm2200: Add names for ranges
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15 13:00:06 +09:00
Mark Brown
6e87badd3f ASoC: wm2200: Provide initial coefficient loading
Allow a coefficient set provided using the Wolfson callibration tools to
be provided along with the firmware files. Currently only coefficient
files which configure absolute register addresses are supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:56 +01:00
Mark Brown
e10f871190 ASoC: wm2200: Initial DSP support
Support download and execution of firmwares to the DSPs on the WM2200.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:55 +01:00
Mark Brown
09d5d5880e ASoC: wm2200: Fully plumb the DSPs into the routing map
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:53 +01:00
Mark Brown
eae2328d41 ASoC: wm2200: Map DSPs into regmap
Use the regmap ranges support to add the WM2200 DSP core memory pages
into the "register map" beyond the end of the real register map. We
don't extend beyond 16 bits since the regmap API will iterate over
every register doing diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:52 +01:00
Mark Brown
999e068e40 ASoC: wm2200: Implement AEC loopback support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:51 +01:00
Mark Brown
98ad089ffb ASoC: wm2200: Convert to devm APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05 20:17:49 +01:00