summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm2200.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-10ASoC: wm2200: Correct types of mixer texts and valuesCharles Keepax1-2/+2
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-09-01ASoC: constify snd_soc_codec_driver structuresJulia Lawall1-1/+1
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-08-08ASoC: codec duplicated callback function goes to component on wm2200Kuninori Morimoto1-6/+8
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>
2015-08-30Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', ↵Mark Brown1-1/+1
'asoc/topic/ux500' and 'asoc/topic/width' into asoc-next
2015-08-30Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', ↵Mark Brown1-1/+1
'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
2015-08-30Merge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and ↵Mark Brown1-1/+1
'asoc/topic/qcom' into asoc-next
2015-07-24ASoC: Use params_width() at appropriate placesAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17Merge tag 'regmap-seq-delay-api' of ↵Mark Brown1-1/+1
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-17ASoC: Constify dev_pm_ops variablesAxel Lin1-1/+1
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-17regmap: Use reg_sequence for multi_reg_write / register_patchNariman Poushin1-1/+1
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-16Merge branches 'topic/owner' and 'topic/reg-default' of ↵Mark Brown1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9877
2015-07-15ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
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-07ASoC: Constify reg_default tablesAxel Lin1-1/+1
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-06-19ASoC: wm_adsp: Move DSP Rate controls into the codecRichard Fitzgerald1-1/+1
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-03-17ASoC: wm2200: Drop unnecessary dapm bias_level initializationLars-Peter Clausen1-1/+0
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-09ASoC: wm2200: match wait_for_completion_timeout return typeNicholas Mc Guire1-3/+5
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>
2014-12-13sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki1-1/+1
After commit b2b49ccbdd54 (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-04-14ASoC: wm2200: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen1-2/+2
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-03-13Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown1-7/+0
2014-03-11ASoC: codec: Simplify ASoC probe code.Xiubo Li1-7/+0
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-02-23ASoC: wm2200: Use SOC_ENUM_SINGLE_DECL()Takashi Iwai1-10/+8
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>
2013-03-29ASoC: wm_adsp: Split ADSP1 and ADSP2 firmware controlsMark Brown1-1/+1
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-02-11Merge remote-tracking branch 'asoc/topic/wm2200' into asoc-nextMark Brown1-0/+58
2013-02-05ASoC: wm2200: Provide platform data for MICBIAS configurationChris Rattray1-0/+31
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04ASoC: wm2200: correct IN2L and IN3L digital muteChris Rattray1-2/+2
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-04ASoC: wm2200: Add Rx ANC input select controlChris Rattray1-0/+11
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24ASoC: wm2200: Set system clock control register is adsp structsChris Rattray1-0/+3
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-20ASoC: wm2200: Implement EQ and LHPF coefficient configurationMark Brown1-0/+6
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18ASoC: wm2200: Add controls for firmware enumerationMark Brown1-0/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16ASoC: wm2200: correct mixer values and textChris Rattray1-3/+0
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-16ASoC: wm2200: Initialise the ADSPsMark Brown1-0/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-04ASoC: wm2200: Remove DSP B and left justified AIF modesMark Brown1-6/+0
These are not supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-12-21ASoC: wm2200: Fix setting dai format in wm2200_set_fmtAxel Lin1-1/+1
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-09ASoC: codecs: remove __dev* attributesBill Pemberton1-4/+4
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-11-28ASoC: wm2200: Remove empty labelsSachin Kamat1-6/+3
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-10-28ASoC: wm2200: Convert over to wm_adsp for ADSP1 supportMark Brown1-400/+32
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-22ASoC: fix wm2200.c printk format warningsRandy Dunlap1-6/+6
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-15ASoC: wm2200: Add names for rangesMark Brown1-12/+6
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Provide initial coefficient loadingMark Brown1-0/+194
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-05ASoC: wm2200: Initial DSP supportMark Brown1-2/+238
Support download and execution of firmwares to the DSPs on the WM2200. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Fully plumb the DSPs into the routing mapMark Brown1-6/+49
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Map DSPs into regmapMark Brown1-1/+84
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-05ASoC: wm2200: Implement AEC loopback supportMark Brown1-1/+24
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Convert to devm APIsMark Brown1-25/+14
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Fix non-inverted OUT2 mute controlMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-10-05ASoC: wm2200: Use rev A register patches on rev BMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-09-08ASoC: dapm: Add flags to regulator suppliesMark Brown1-2/+2
This will be used to enable additional control of the regulators. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2012-08-06ASoC: wm2200: Use module_i2c_driverSachin Kamat1-11/+1
module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-29ASoC: wm2200: Add missing BCLK rateMark Brown1-0/+1
Without this very high BCLKs will be configured incorrectly. Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-02-16ASoC: Get correct revision id for wm2200Axel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>