Commit Graph

2331 Commits

Author SHA1 Message Date
Mark Brown f649f1a8aa ASoC: Convert wm8804 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown e055cd67fd ASoC: Use standard cache sync for wm8804
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown c2562a8e3b ASoC: Remove wm8974 private data
It's only ever referenced when being allocated and freed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown a2bd691c64 ASoC: Convert wm8974 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 7a389651bd ASoC: Make wm8974 I2C usage unconditional
The driver only supports I2C at present.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 028b0a0a92 ASoC: Convert wm8971 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown c4850644ce ASoC: Convert wm8971 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 542cc361de ASoC: Make WM8971 I2C usage unconditional
The driver only supports I2C so no need to worry about SPI only systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown d3398ff059 ASoC: Convert WM8753 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown bfea3abb80 ASoC: Move WM8993 resource acquisition and device reset to bus probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown d0ad0af043 ASoC: Convert wm8993 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 391d9e4e5c ASoC: Move WM9090 device identification and reset to I2C probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown ec2c0fec11 ASoC: Convert WM9090 to use regmap directly
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 008f8d4f99 ASoC: Push wm8978 reset down into the I2C probe
Ensures that we get control of the CODEC earlier and don't try to probe
the card at all if register I/O isn't working.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ee60d0155d ASoC: Convert wm8978 to direct regmap API usage
Helps push the register cache code down out of ASoC and improves resume
times by using the more efficient regmap cache sync code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown f98692ea6d ASoC: Use standard cache sync for WM8978
Saves a bit of code and supports further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 623105dc97 ASoC: Convert wm8978 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 803b37885d ASoC: Convert wm8978 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ad6cdec507 ASoC: Remove unused control type from wm8978 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown 0d6df67583 ASoC: Make WM8978 I2C usage unconditional
The driver only supports I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown fed2200711 ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK
With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:34 +00:00
Mark Brown 495174a8ff ASoC: Don't go through cache when applying WM5100 rev A updates
These are all to either uncached registers or fixes to register defaults,
in the former case the cache won't do anything and in the latter case
we're fixing things so the cache sync will do the right thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Mark Brown e53e417331 ASoC: Mark WM5100 register map cache only when going into BIAS_OFF
Writing to the registers won't work if we do actually manage to hit a fully
powered off state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Wolfram Sang 0c93a167a6 ASoC: tlv320aic32x4: always enable analouge block
Register LDOCTLEN must always be initialized to clear the analog power
control bit, otherwise the analog block will stay deactivated.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Wolfram Sang 01b37e94c0 ASoC: tlv320aic32x4: always enable dividers
Dividers (such as MDAC) are always needed, independent of the codec
being I2S master or slave. Needed on a custom board where the codec has
to be slave.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Zeng Zhaoming bb362e2e4f ASoC: sgtl5000: Fix wrong register name in restore
Correct SGTL5000_CHIP_CLK_CTRL to SGTL5000_CHIP_REF_CTRL in
sgtl5000_restore_regs(), and add comment to explain the
restore order.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:32 +00:00
Linus Torvalds 9278e634b4 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: Wait for WM8993 FLL to stabilise
  ASoC: core - Free platform DAPM context at platform removal.
  ASoC: dapm - Fix check for codec context in dapm_power_widgets().
  ASoC: sgtl5000: update author email address
  ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
2012-01-18 12:53:36 -08:00
Mark Brown 986b2f2c21 ASoC: Wait for WM8993 FLL to stabilise
Ensure the FLL is locked before we return from set_fll().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-17 16:48:27 +00:00
Zeng Zhaoming f7cb8a4be1 ASoC: sgtl5000: update author email address
Update MODULE_AUTHOR email address.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:06:06 +00:00
Linus Torvalds a429638cac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
  ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
  ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
  ALSA: usb-audio: add Yamaha MOX6/MOX8 support
  ALSA: virtuoso: add S/PDIF input support for all Xonars
  ALSA: ice1724 - Support for ooAoo SQ210a
  ALSA: ice1724 - Allow card info based on model only
  ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
  ALSA: hdspm - Provide unique driver id based on card serial
  ASoC: Dynamically allocate the rtd device for a non-empty release()
  ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
  ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
  ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
  ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
  ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
  ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
  ALSA: hda/cirrus - support for iMac12,2 model
  ASoC: cx20442: add bias control over a platform provided regulator
  ALSA: usb-audio - Avoid flood of frame-active debug messages
  ALSA: snd-usb-us122l: Delete calls to preempt_disable
  mfd: Put WM8994 into cache only mode when suspending
  ...

Fix up trivial conflicts in:
 - arch/arm/mach-s3c64xx/mach-crag6410.c:
	renamed speyside_wm8962 to tobermory, added littlemill right
	next to it
 - drivers/base/regmap/{regcache.c,regmap.c}:
	duplicate diff that had already come in with other changes in
	the regmap tree
2012-01-12 08:00:30 -08:00
Takashi Iwai d6b2450797 Merge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc into topic/asoc 2012-01-11 15:30:53 +01:00
Liam Girdwood e48b46ba16 ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
The DL1 PDM interface adds a little gain depending on the output device.
Add a method to retrieve the gain value for machine driver usage.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-01-11 12:43:24 +00:00
Linus Torvalds 269d430131 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (40 commits)
  regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config
  regulator: max8925: fix enabled/disabled judgement mistake
  regulator: add regulator_bulk_force_disable function
  regulator: pass regulator_register of_node in fixed voltage driver
  regulator: add regulator_force_disable() definition for !CONFIG_REGULATOR
  regulator: Enable supply regulator if child rail is enabled.
  regulator: mc13892: Convert to devm_kzalloc()
  regulator: mc13783: Convert to devm_kzalloc()
  regulator: Fix checking return value of create_regulator
  regulator: Fix the error handling if create_regulator fails
  regulator: Export regulator_is_supported_voltage()
  regulator: mc13892: add device tree probe support
  regulator: mc13892: remove the unnecessary prefix from regulator name
  regulator: Convert wm831x regulator drivers to devm_kzalloc()
  regulator: da9052: Staticize non-exported symbols
  regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case for da9052-regulator
  regulator: Update da9052-regulator for DT changes
  regulator: DA9052/53 Regulator support
  regulator: pass device_node to of_get_regulator_init_data()
  regulator: If a single voltage is set with device tree then set apply_uV
  ...
2012-01-10 10:20:34 -08:00
Janusz Krzysztofik f75a8ff67d ASoC: cx20442: add bias control over a platform provided regulator
Now that a regulator device for controlling the codec chip reset state
over a platform agnostic regulator API is available on the only board
using this driver so far, extend the driver with a bias control function
which will request virtual power to the codec chip from that virtual
regulator, and will supersede the present implementation existing at the
sound card level.

Thanks to the regulator sharing mechanism, both the old (the sound card)
and the new (the codec) implementations should coexist smoothly until
the sound card file is updated. For this to work as expected, update the
sound card .set_bias_level callback to not touch codec->dapm.bias_level.

While extending the cx20442 structure, drop unused control_type member.

Created against linxu-3.2-rc6, tested on top of patch 1/4 "ARM: OMAP1:
ams-delta: set up a regulator over the modem reset GPIO pin".

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-01-09 11:20:16 +00:00
Axel Lin 7a748e4318 ASoC: sta32x: Optimize the array work to find rate_min and rate_max
For a given ir and fs, there is at most one possible match for the case
mclk_ratios[ir][j].ratio * fs == freq.
Thus we can break from the inner loop once a match is found.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-03 21:18:32 +00:00
Axel Lin 748b217827 ASoC: Fix return value of wm8580_set_sysclk()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:40 +00:00
Axel Lin 385bd9379b ASoC: Fix return value of wm8903_gpio_direction_in() and wm8903_gpio_direction_out()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:39 +00:00
Axel Lin fe75fe0e04 ASoC: Fix return value of wm8962_gpio_direction_out()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:34 +00:00
Axel Lin 16aff769d7 ASoC: Fix return value of ak4641_pcm_set_dai_fmt()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:33 +00:00
Axel Lin 6945e9f9df ASoC: Convert tpa6130a2 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin a54877d745 ASoC: Convert tlv320dac33 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin 7fd8a67446 ASoC: Convert cs4270 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin 360b70ca5e ASoC: Convert alc5623 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin e2257db325 ASoC: Convert tlv320aic3x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin a8163023d2 ASoC: Convert tlv320aic26 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin 099830608a ASoC: Convert tlv320aic23 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin d999c021b6 ASoC: Convert sta32x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin 8eeffe9891 ASoC: Convert ssm2602 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin a92b0a0803 ASoC: Convert rt5631 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin bf791bdb38 ASoC: Convert max9850 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin b1b548824b ASoC: Convert max98095 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin 49ba767324 ASoC: Convert max98088 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin 021b918efb ASoC: Convert cs42l51 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Ashish Chavan 24b6f263d9 ASoC: da7210: Add support for line input and mic
DA7210 has three line inputs (AUX1 Left, AUX1 Right and AUX2) and
a stereo MIC. This patch adds gain controls for MIC, AUX1, AUX2 as
well as INPGA.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:27:29 +00:00
Mark Brown 1b39bf3468 ASoC: Enable ASoC register map dump for some regmap CODECs
It's still useful to be able to poke around in the register map at
runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 01:59:39 +00:00
Mark Brown a421a0e41c ASoC: Remove unused label from wm8994 probe()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-29 11:54:43 +00:00
Axel Lin 658ecf7784 ASoC: Convert tlv320aic32x4 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:41 +00:00
Axel Lin 558460c65a ASoC: Convert jz4740 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:41 +00:00
Axel Lin 38b81c1d25 ASoC: Convert adau1701 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 6e4f17cb2b ASoC: Convert ad1836 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 80c2f9da4e ASoC: Convert adau1373 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 30c88f2ca8 ASoC: Convert ad193x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Fabio Estevam 512fa7c40b ASoC: Convert sgtl5000 to use devm_kzalloc()
Convert sgtl5000 codec driver to use devm_kzalloc().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:20:20 +00:00
Fabio Estevam cf1ee98d80 ASoC: sgtl5000: Fix voltage units in dev_err message
vdda, vddio and vddd are voltages expressed in milivolts (mV), so use the
proper annotation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:20:20 +00:00
Axel Lin 6ab7e71a9c ASoC: Convert 88pm860x-codec to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin 6ce91ad4d8 ASoC: Convert uda1380 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin eb3bb97ce7 ASoC: Convert lm4857 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin 306bf6b19e ASoC: Convert da7210 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Mark Brown 2c9d9b6fa7 Merge branch 'for-3.2' into for-3.3 2011-12-23 18:08:02 +00:00
Joachim Eastwood 990fc3d0b2 ASoC: wm8776: add missing break in sample size switch
Broken in commit d1dc698a54

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 18:03:21 +00:00
Axel Lin 3f7cec0493 ASoC: Convert cs42l51 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 12:04:33 +00:00
Axel Lin f4f8e4c32c ASoC: Convert 88pm860x-codec to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 12:04:33 +00:00
Axel Lin 5b48a5a6df ASoC: Convert ak4671 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 2ff49eea9b ASoC: Convert ak4642 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 4273fcfd71 ASoC: Convert ak4641 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 7246492dcf ASoC: Convert ak4535 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 3922d5180f ASoC: Convert ak4104 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:57 +00:00
Axel Lin 6048ef768e ASoC: Rename rt562[1|2]_vol_snd_controls to alc562[1|2]_vol_snd_controls
The module desciption says this is ASoC alc5621/2/3 driver.
Make the naming consistent with the reset of the code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:58:08 +00:00
Axel Lin 58fa8e456c ASoC: Convert uda1380 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:32:24 +00:00
Axel Lin 5ee65ec628 ASoC: Convert max9850 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:32:24 +00:00
Mark Brown 202a51a8d9 ASoC: Use standard cache sync code in wm8961
We write the reset register with the default value so it should not be
mistakenly written.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:44 +00:00
Mark Brown 2ec2a9061d ASoC: Convert wm8961 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:43 +00:00
Mark Brown 69be6660f3 ASoC: Remove I2C ifdefs from wm8961 driver
The driver only supports I2C so no need to conditionalise its use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:42 +00:00
Mark Brown b9791c0109 ASoC: Convert WM8960 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:41 +00:00
Mark Brown ec641c4590 ASoC: Fix partial cherry pick in wm8993
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-15 11:54:00 +08:00
Mark Brown 45ba82d817 ASoC: Tune the accessory detection rates for WM8996
Use longer intervals when the microphone is not inserted to increase
robustness against leisurely insertion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 19:35:14 +08:00
Mark Brown d0616bbed1 ASoC: Use standard register cache sync in wm8993
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 17:07:51 +08:00
Mark Brown f6a9336879 ASoC: Convert wm8993 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 17:07:47 +08:00
Mark Brown ffbf2a363e ASoC: Use standard snd_soc_cache_sync() for WM9090
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 17:07:39 +08:00
Mark Brown 42f3b0109e ASoC: Remove cache default for volatile wm9081 reset register
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 17:06:29 +08:00
Mark Brown 6f8d272a44 ASoC: Fix wm8995 regmap usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-14 13:48:12 +08:00
Leon Romanovsky 9215aa4d96 ASoC: Rename ALC5632 MICBIAS to common name convention.
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 14:27:19 +08:00
Mark Brown cae59c7b21 ASoC: Remove WM8994 register cache
Now that the mfd is using the register map cache there's no need for the
CODEC driver to do any register cache management or any funny dances to
interact with the other drivers using the device so just remove the cache
initialisation and volatility information.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 00:20:11 +08:00
Mark Brown d9a7666ff3 ASoC: Remove ASoC-specific WM8994 I/O code
Just go directly to the regmap API, saving code and making integration
that bit more direct.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 00:20:06 +08:00
Mark Brown 68556ca1e0 Merge branch 'mfd/wm8994' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into for-3.3 2011-12-13 00:19:20 +08:00
Mark Brown 4de45284d3 mfd: Define some additional wm8994 registers
Add a bunch of definitions for wm8994 registers that are not currently
used by software.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:06 +08:00
Mark Brown 0a105ddb35 Merge branch 'for-3.2' into for-3.3 2011-12-12 12:59:06 +08:00
Jonathan Neuschäfer 62e4a13e60 ASoC: WM8958: correctly show firmware magic on mismatch
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:44:02 +08:00
Mark Brown f04b8d6ece Merge branch 'for-3.2' into for-3.3 2011-12-11 03:01:33 +08:00
Mark Brown 37d5993c5c ASoC: Fix WM8996 24.576MHz clock operation
Record the clock after the divider as that is what all SYSCLK users see.
Without this the other clock configuration in the device comes out at
half rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-12-11 03:01:09 +08:00
Mark Brown 3025ae45d6 ASoC: Convert wm8770 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:36:59 +08:00
Axel Lin 7fcadfd176 ASoC: Fix comments for disabling amplifier and PGA
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:28 +08:00
Mark Brown 46ce904f7d ASoC: Convert WM8900 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:18 +08:00
Mark Brown 5a37452421 ASoC: Convert WM8804 to table based control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:17 +08:00
Mark Brown bc9c040d36 ASoC: Make WM8770 SPI usage unconditional
The device only supports SPI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:16 +08:00
Mark Brown bf97ca9a0d ASoC: Convert WM8776 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:15 +08:00
Axel Lin 16b24881a0 ASoC: wm8960: 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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 11:37:31 +08:00
Mark Brown 4105ab846c ASoC: Rely on core enabling the wm8994 with runtime PM
No need to do this in the driver now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 09:22:48 +08:00
Stephen Warren f18b4e2ee9 ASoC: WM8903: Add of_match_table
This allows the device to be matched against the device tree using the
compatible flag directly, as is standard, rather than falling back to
matching .id_table against the non-vendor portion of the first compatible
property value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-07 21:51:04 +08:00
Mark Brown 21abbb024f Merge branch 'for-3.2' into for-3.3 2011-12-06 11:01:38 +00:00
Axel Lin f8f626f537 ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
Currently SND_SOC_JZ4740_CODEC depends on SOC_JZ4740 but SOC_JZ4740 is not
defined in any Kconfig. Thus the codec driver will not be built when select
"Build all ASoC CODEC drivers".
(Unless it is selected by SND_JZ4740_SOC_QI_LB60).
Remove the dependency with SOC_JZ4740, then this code driver can be built when
select "Build all ASoC CODEC drivers".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 11:01:20 +00:00
Axel Lin 68bfcafaae ASoC: Include linux/io.h for jz4740 codec
Include linux/io.h to fix below build errors:

  CC      sound/soc/codecs/jz4740.o
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_read':
sound/soc/codecs/jz4740.c:82: error: implicit declaration of function 'readl'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_write':
sound/soc/codecs/jz4740.c:92: error: implicit declaration of function 'writel'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_probe':
sound/soc/codecs/jz4740.c:373: error: implicit declaration of function 'ioremap'
sound/soc/codecs/jz4740.c:373: warning: assignment makes pointer from integer without a cast
sound/soc/codecs/jz4740.c:393: error: implicit declaration of function 'iounmap'
make[3]: *** [sound/soc/codecs/jz4740.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 11:01:10 +00:00
Mark Brown 6664ee115b ASoC: Don't fail if we can't read the IRQ type in WM8903
If we fail to read the IRQ type from the interrupt controller don't
fail, just assume a value and solider on - we may fail later when we try
to request the IRQ but it's possible we'll succeed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 10:30:24 +00:00
Stephen Warren 5d680b3a84 ASoC: WM8903: Add device tree binding
Document the device tree binding for the WM8903 codec, and modify the
driver to extract platform data from the device tree, if present.

Based on work by John Bonesio, but significantly reworked since then.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 10:29:22 +00:00
Stephen Warren 9d35f3e100 ASoC: WM8903: Get default irq_active_low from IRQ controller
If the WM8903 is hooked up to an interrupt, set the irq_active_low flag
in the default platform data based on the IRQ's IRQ_TYPE. Map IRQ_TYPE_NONE
(a lack of explicit configuration/restriction) to irq_active_low = false;
the previous default.

This code is mainly added to support device tree interrupt bindings,
although will work perfectly well in a non device tree system too.

Any interrupt controller that supports only a single IRQ_TYPE could
set each IRQ's type based on that restriction. This applies equally
with and without device tree. To cater for interrupt controllers
that don't do this, for which irqd_get_trigger_type() will return
IRQ_TYPE_NONE, the platform data irq_active_low field may be used
in systems that don't use device tree.

With device tree, every IRQ must have some IRQ_TYPE set.

Controllers that support DT and multiple IRQ_TYPEs must define the
interrupts property (as used in interrupt source nodes) such that it
defines the IRQ_TYPE to use. When the core DT setup code initializes
wm8903->irq, the interrupts property will be parsed, and as a side-
effect, set the IRQ's IRQ_TYPE for the WM8903 probe() function to read.

Controllers that support DT and a single IRQ_TYPE could arrange to
set the IRQ_TYPE somehow during their initialization, or hard-code
it during the processing of the child interrupts property.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 10:29:22 +00:00
Stephen Warren db81778409 ASoC: WM8903: Remove conditionals checking pdata != NULL
The pdata pointer is now always valid. Remove any conditions that check
its validity.

This patch is mostly just removing an indentation level. One variable had
to be moved due to the removal of a scope, and one comment was split into
two. Viewing the patch with git show/diff -b will show that it's actually
very small.

Note that WM8903_MIC_BIAS_CONTROL_0 is now written unconditionally,
whereas it used to be written only if pdata was supplied. Since
defpdata.micdet_cfg = 0, this unconditional write simply echos the HW
defaults in the case where pdata is not supplied.

Based on work by John Bonesio, but significantly reworked since then.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 10:29:22 +00:00
Stephen Warren a0f203d384 ASoC: WM8903: Fix platform data gpio_cfg confusion
wm8903_platform_data.gpio_cfg[] was intended to be interpreted as follows:
0:       Don't touch this GPIO's configuration register
1..7fff: Write that value to the GPIO's configuration register
8000:    Write zero to the GPIO's configuration register
other:   Undefined (invalid)

The rationale is that platform data is usually global data, and a value of
zero means that the field wasn't explicitly set to anything (e.g. because
the field was new to the pdata type, and existing users weren't update to
initialize it) and hence the value zero should be ignored. 0x8000 is an
explicit way to get 0 in the register.

The code worked this way until commit 7cfe561 "ASoC: wm8903: Expose GPIOs
through gpiolib", where the behaviour was changed due to my lack of
awareness of the above rationale.

This patch reverts to the intended behaviour, and updates all in-tree users
to use the correct scheme. This also makes WM8903 consistent with other
devices that use a similar scheme.

WM8903_GPIO_NO_CONFIG is also renamed to WM8903_GPIO_CONFIG_ZERO so that
its name accurately reflects its purpose.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-06 10:29:22 +00:00
Axel Lin f031efe940 ASoC: Fix reg_cache_size for stac9766
reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-05 13:30:39 +00:00
Axel Lin 68020db8ac ASoC: uda1380: Convert to gpio_request_one()
Using gpio_request_one can make the error handling simpler.

Also remove a redundant "Failed to issue reset" error message.
We already show the error message in uda1380_reset() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-05 13:24:49 +00:00
Mark Brown b71951d63d Merge branch 'for-3.2' into for-3.3 2011-12-04 23:47:39 +00:00
Axel Lin ef1497707c ASoC: uda1380: Return proper error in uda1380_modinit failure path
Return proper error for uda1380_modinit if i2c_add_driver() fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-04 23:47:15 +00:00
Mark Brown 59792aa91f ASoC: Sort WM9090 in with the CODEC drivers
The driver itself has been a regular CODEC driver for a while now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:22 +00:00
Mark Brown 4911ccdb9d ASoC: Convert WM2000 into a standard CODEC driver
We've been able to handle external amps for a while now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:21 +00:00
Mark Brown 8aa1fe81c5 ASoC: Convert wm2000 to use regmap API
The driver wasn't even using the ASoC common code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:20 +00:00
Mark Brown 012d12db0c ASoC: Remove unused struct wm2000_setup_data
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:19 +00:00
Mark Brown e41d5a3b7a ASoC: Convert WM8728 to table based control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:18 +00:00
Mark Brown 2f5374d8cf ASoC: Convert WM8711 to table based control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:17 +00:00
Mark Brown 0f185e3f8b ASoC: Convert WM8750 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:16 +00:00
Mark Brown 0e62780f5f ASoC: Convert WM8741 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:14 +00:00
Mark Brown f235c649c1 ASoC: Convert WM8580 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:13 +00:00
Mark Brown b6709f3bbd ASoC: Convert WM8510 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:12 +00:00
Mark Brown b4505ab141 ASoC: Convert WM8400 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:11 +00:00
Mark Brown e6c94e9f6d ASoC: Convert WM8350 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:10 +00:00
Mark Brown 455b91bfe8 ASoC: Convert WM9090 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:09 +00:00
Mark Brown 2edaed82b7 ASoC: Convert WM8750 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:08 +00:00
Mark Brown 5aefb306e3 ASoC: Convert WM8741 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:07 +00:00
Mark Brown b903c0ed2e ASoC: Convert WM8400 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:06 +00:00
Mark Brown 0d1fe0d452 ASoC: Convert WM8350 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:05 +00:00
Mark Brown b03e96e4d6 ASoC: Convert WM2000 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:04 +00:00
Mark Brown 6cd4eb9592 ASoC: Remove unused AUDIO_NAME define from WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:03 +00:00
Mark Brown 3a0d077f3d ASoC: Remove I2C ifdefs from WM8960
The driver only supports I2C as the control interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:02 +00:00
Mark Brown 091edccf7f ASoC: Remove unused -codec from Wolfson device driver names
Devices that aren't MFDs don't need to distinguish this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 21:35:01 +00:00
Stephen Warren c0eb27cf84 ASoC: WM8903: Create default platform data structure
When no platform data is supplied, point pdata at a default platform
structure. This enables two future changes:

a) Defines the default platform data values in a single place.
b) There is always a valid pdata pointer, so some conditional code can
   be simplified by a later patch.

Based on work by John Bonesio, but significantly reworked since then.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-03 11:19:08 +00:00
Mark Brown 7d46a528c6 ASoC: Move initial WM8903 identification and reset to I2C probe
Get control of the device earlier and avoid trying to do an ASoC probe
on a card that won't work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 11:00:10 +00:00
Mark Brown ee244ce4ea ASoC: Convert WM8903 to direct regmap API usage
Converting to an rbtree cache as regcache doesn't have a flat cache.
Since the top of the register map is fairly sparse this should be an
overall win.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 11:00:07 +00:00
Mark Brown 82ae55dbcc ASoC: Don't resync WM8903 register cache on reset
We only do this on initial power on so it's at best a waste of time as
the core will have already defaulted to the same values.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 10:59:45 +00:00
Mark Brown 45e967553f ASoC: Use a normal cache sync for WM8903
The driver used to use a complicated method to sync the register cache
after having brought the bias level up to standby in resume due to the
use of the write sequencer to manage the initial power up. Now that we
don't use the write sequencer there is no need for this and we can just
use snd_soc_cache_sync() directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 10:59:45 +00:00
Mark Brown 88a1b12b9c ASoC: WM8903 only supports I2C so don't ifdef it
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 10:59:44 +00:00
Mark Brown f4a10837c9 ASoC: Use table based control init for WM8903
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 10:59:43 +00:00
Mark Brown 2950cd2208 ASoC: Convert WM8903 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2011-12-03 10:59:32 +00:00
Mark Brown 33e57f221a Merge branch 'for-3.2' into for-3.3 2011-12-02 17:44:55 +00:00
Mark Brown 87b86ade8b ASoC: Mark WM8994 ADC muxes as virtual
Since they don't actually have power bits but do have events associated
with them it's important that we bootstrap their state properly which
making them virtual does.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 17:44:37 +00:00
Mark Brown 91e20854e5 ASoC: Convert WM8994 MICBIASes to supply widgets
There are some in tree systems using the driver but none use the MICBIAS
widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 17:37:49 +00:00
Mark Brown 3631e8d43e ASoC: Add missing err label
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 10:55:12 +00:00
Stephen Warren 6f526f0a86 ASoC: WM8903: Disallow all invalid gpio_cfg pdata values
The GPIO registers are 15 bits wide. Hence values, higher than 0x7fff are
not legal GPIO register values. Modify the pdata.gpio_cfg handling code
to reject all illegal values, not just WM8903_GPIO_NO_CONFIG (0x8000). This
will allow the later use of 0xffffffff as an invalid value in future device
tree bindings, meaning "don't touch this GPIO's configuration".

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 10:35:25 +00:00
Lars-Peter Clausen 84b315ee89 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>
2011-12-02 10:32:03 +00:00
Mark Brown 36c6b54cb0 ASoC: Make WM8962 beep a signal generator
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-12-02 10:27:01 +00:00
Mark Brown dea8e23741 ASoC: Make WM5100 tone generator widgets signal generators
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-12-02 10:26:22 +00:00
Mark Brown 7270cebef2 ASoC: Convert WM8994 to devm_kzalloc()
Still have a manual free in there for some realloc()ed memory as there's
no devm version of that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:22:03 +00:00
Mark Brown cd1707a99a ASoC: Add platform data for WM8958/WM1811 microphone detection rates
Allow systems to override the default microphone detection rates using
platform data in case the settings are not suitable (eg, due to an
unusually noisy jack).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:22:01 +00:00
Mark Brown 52ac7ab247 ASoC: Ensure we reconfigure WM8958 microphone detection on rate changes
We don't need to rerun DAPM if the clock source is the same but we do
need to adjust the microphone detection rate in case we are moving from
an audio to a non-audio rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:58 +00:00
Mark Brown af6b6fe41c ASoC: Implement support for WM1811A jack detection
The WM1811A features an advanced low power accessory detection subsystem
which allows the device to be maintained in a very low power state while
the system is idle without sacrificing any accessory detection features.

Implement software support for this, automatically managing the power
configuration of the device depending on the detected accessory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:55 +00:00
Mark Brown 157a75e664 ASoC: Rename WM8994 detecting flag to mic_detecting
More specific and avoids confusion with a following change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:53 +00:00
Mark Brown 4585790d1c ASoC: Allow more WM8958/WM1811 button levels with default handler
The WM8958 and WM1811 support detecting a range of buttons. Allow the
user to provide platform data enabling more of these levels without
having to write a custom detection handler.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:51 +00:00
Mark Brown 604533de0f ASoC: Tune down active mode detection rate for WM8958 mic detection
Saves a little power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:48 +00:00
Mark Brown 2a8a856d42 ASoC: Don't use control_data to get struct wm8994
This will support refactoring to make use of the regmap API more directly
in the core.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01 14:21:41 +00:00
Mark Brown a1691343a3 ASoC: Provide debug log of accessory status on WM8958
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-30 20:50:28 +00:00
Mark Brown b00adf76a6 ASoC: Enhance default WM8958 microphone detection
Actively manage the detection rate for microphones with WM8958, providing
improved power consumption and maximising the benefit from the hardware
debounce.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 20:22:00 +00:00
Mark Brown 500fa30ed5 ASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audio
When we don't have any active audio we can put the microphone biases into
bypass mode to save power at the expense of performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 19:59:18 +00:00
Mark Brown 4cdf5e49ce ASoC: Ensure SYSCLK is enabled for WM8958 accessory detection
Ensure SYSCLK is enabled while running accessory detection on WM8958.
It is always required so there is no sense in requiring machine drivers
to individually do this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 17:23:29 +00:00
Lars-Peter Clausen 38fd54ee38 ASoC: SigmaDSP: Add regmap support
Add support for loading the SigmaDSP firmware using regmap. This allows us
to transparently use SPI or I2C as the transport protocol on devices which
support them.

For now we keep the old I2C support since we have one user of this which is not
straight forward to convert to regmap, due to variable length registers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 12:01:23 +00:00
Lars-Peter Clausen a4c1d7e667 ASoC: SigmaDSP: Move private structs and functions to C file
Move the structs and functions only used by SigmaDSP firmware loader itself
from the header to the C file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 12:01:20 +00:00
Lars-Peter Clausen 48afc5272e ASoC: SigmaDSP: Provide diagnostic error messages
Provide some error messages when loading the firmware fails, so it is possible
to diagnose the reason for the failure.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 12:01:14 +00:00
Lars-Peter Clausen 40216ce7aa ASoC: Move SigmaDSP firmware loader to ASoC
It has been pointed out previously, that the firmware subsystem is not the right
place for the SigmaDSP firmware loader. Furthermore the SigmaDSP is currently
only used in audio products and we are aiming for better integration into the
ASoC framework in the future, with support for ALSA controls for firmware
parameters and support dynamic power management as well. So the natural choice
for the SigmaDSP firmware loader is the ASoC subsystem.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 12:01:10 +00:00
Axel Lin 7b282cbbf3 ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt
What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits,
but current code clears BIT[2:0].

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29 11:50:50 +00:00
Mark Brown fd8f2e496f Merge branch 'for-3.2' into for-3.3 2011-11-28 23:18:39 +00:00
Mark Brown fc8e6e8668 ASoC: Supply dcs_codes for newer WM1811 revisions
Based on initial data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 23:18:38 +00:00
Mark Brown 49b72776f3 Merge branch 'for-3.2' into for-3.3 2011-11-28 22:13:14 +00:00
Brian Austin cc0b401ad8 ASoC: Convert CS42L73 to devm_kzalloc()
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:12:25 +00:00
Mark Brown fc07ecd851 ASoC: Error out if we can't generate a LRCLK at all for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:10:05 +00:00
Lars-Peter Clausen 34cbe16833 ASoC: ad193x: Convert to direct regmap API usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:52 +00:00
Lars-Peter Clausen b82ca578fd ASoC: ad193x: Use snd_soc_update_bits where appropriate
We can reduce the code size here a bit by using snd_soc_update_bits instead of
open-coding the read-modify-write cycle. The conversion done in this patch is
not completely straightforward and some minor code restructuring has been
incorporated to further reduce the code size.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:52 +00:00
Lars-Peter Clausen 0718fd2777 ASoC: ad193x: Add sysclk DAPM supply
Add a DAPM supply widget for the internal sysclk, so it can be disabled
automatically when not needed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:51 +00:00
Lars-Peter Clausen b21990b47d ASoC: ad193x: Remove non-functional DAPM route controls
DAPM route controls only take effect on paths where the sink is a mixer or a
mux, furthermore the control must be a control assigned to the mixer or mux.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:47 +00:00
Lars-Peter Clausen c4e7a4a276 ASoC: ad193x: Make enum items const char * const
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:46 +00:00
Lars-Peter Clausen 591c034a32 ASoC: ad193x: Provide dB ranges for the volume controls
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:41 +00:00
Lars-Peter Clausen b90d4183f7 ASoC: ad193x: Use table based DAPM and controls setup
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 18:57:37 +00:00
Mark Brown 5032dc3429 ASoC: Convert WM8903 MICBIAS to a supply widget
Also rename it to MICBIAS to reflect the pin name and help any out of tree
users notice the change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
2011-11-28 17:02:07 +00:00
Mark Brown 5bbcc3c0d0 ASoC: Convert CODEC drivers to module_platform_driver
Factors out a bit of boilerplate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 11:33:29 +00:00
Mark Brown be086aa8ca ASoC: Convert WM8962 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 22:02:44 +00:00
Mark Brown a290986b2a ASoC: Convert wm8996 to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:04:08 +00:00
Mark Brown 897f7847e6 ASoC: Convert wm9081 driver to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:04:02 +00:00
Mark Brown 5fe803f56a ASoC: Convert wm1250-ev1 driver to use devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:03:59 +00:00
Mark Brown 997c2ea916 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>
2011-11-27 12:24:48 +00:00
Mark Brown 679acec1f2 ASoC: Remove driver versioning from ak4642
It's never been updated so it can't be that useful and it makes the
driver needlessly chatty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 12:23:46 +00:00
Mark Brown a81b82c09e ASoC: Use devm_kzalloc() in wm5100
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25 13:03:25 +00:00
Mark Brown 878042d19c ASoC: Staticise non-exported symbols in sta32x
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
2011-11-25 13:03:24 +00:00
Rajendra Nayak 2c043bcbf2 regulator: pass additional of_node to regulator_register()
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 18:47:04 +00:00
Mark Brown 16c88583dc ASoC: Remove unused variable in wm8776 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 15:33:55 +00:00
Mark Brown 193b2f3f53 Merge branch 'for-3.2' into for-3.3 2011-11-23 13:12:38 +00:00
Lars-Peter Clausen 890754a878 ASoC: Cleanup duplicated const
Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally
introduced a few duplicated consts. This patch cleans it up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 13:11:50 +00:00
Axel Lin b284362b6b ASoC: cs42l51: Fix off-by-one for reg_cache_size
Just checking the code in cs42l51_fill_cache():
The cache pointer points to codec->reg_cache + 1.
I think it is because CS42L51_FIRSTREG is 0x01,
so codec->reg_cache[0] is not used here.

Then we read CS42L51_NUMREGS bytes to cache.
So we need reg_cache_size to be CS42L51_NUMREGS + 1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:34:21 +00:00
Lars-Peter Clausen 85e7652d89 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>
2011-11-23 10:40:46 +00:00
Mark Brown 1db3c98e18 ASoC: Convert wm8776 to table based control and DAPM init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:00:34 +00:00
Mark Brown 404417e6b4 ASoC: Staticise and constify cs42l73_reg_defaults
It's not exported and doesn't need to change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 09:52:56 +00:00
Mark Brown 34c3a64a45 Merge branch 'for-3.2' into for-3.3 2011-11-22 23:07:23 +00:00
Daniel Mack d66b8537b3 ASoC: cs4720: use snd_soc_cache_sync()
Replace the manual register restore mechanism in cs4270.c and call the
generic snd_soc_cache_sync() handler instead.

This factors code out in favour of core facilities and also fixes a
bus confusion that is most probably caused by intermixing i2c-regmap
functions and i2c_smbus_* accessors.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 23:06:07 +00:00
Mark Brown e3470da9e6 Merge branch 'for-3.2' into for-3.3 2011-11-22 13:09:03 +00:00
Axel Lin 5c4b2aa3fd ASoC: max9877: Update register if either val or val2 is changed
In the case of ((max9877_regs[reg] >> shift) & mask) != val
but ((max9877_regs[reg2] >> shift) & mask) == val2,
current code does not update the registers.

Fix the logic to update registers if either val or val2 is changed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:06:21 +00:00
Axel Lin 72531c9434 ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET
According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.
        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-22 13:06:14 +00:00
Axel Lin dbb1f51637 ASoC: cs42l73: Make inv and format to be unsigned int
Fix below smatch warning:

sound/soc/codecs/cs42l73.c +1030 cs42l73_set_dai_fmt(53) error: inv is never equal to 1024 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1032 cs42l73_set_dai_fmt(55) error: inv is never equal to 768 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1036 cs42l73_set_dai_fmt(59) error: inv is never equal to 1024 (wrong type 0 - 255).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:02:17 +00:00
Axel Lin 717b8fae38 ASoC: cs42l73: Unify the way to define bits of register
Current code defines some bits with left shift to the proper bit defined in
datasheet, but some don't.
Unify the definition with proper left shift and adjust the code accordingly.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 13:02:09 +00:00
Mark Brown 12a7a709a0 ASoC: Remove conditional I2C usage from tlv320aic3x driver
The driver only supports I2C so doesn't need to do things conditionally.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
2011-11-22 11:59:50 +00:00
Mark Brown f733547aa3 ASoC: Remove WM5100 DSP memory windows from register default data
They're all volatile so shouldn't have defaults and as we've got pages
into the DSP memory the registers themselves aren't that useful - a
further patch adding support for the DSPs will provide direct diagnostic
access to the DSP memories.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 18:11:43 +00:00
Mark Brown 56a926dd72 ASoC: Convert WM8753 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 18:07:18 +00:00
Axel Lin afe713089a ASoC: Remove redundant regcache_sync call in cs42l73_resume
It's done in cs42l73_set_bias_level when the dapm.bias_level is switching
from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:53 +00:00
Axel Lin 8421f620da ASoC: cs42l73: Show correct revision id
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:52 +00:00
Axel Lin ea07561581 ASoC: cs42l73: Return proper error code if device id mismatch
Return -ENODEV instead of 0 if device id mismatch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:52 +00:00
Mark Brown 6413d542b0 Merge branch 'for-3.2' into for-3.3 2011-11-21 17:01:12 +00:00
Mark Brown cb555318ca ASoC: Use table based init for wm8731_snd_controls
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:00:17 +00:00
Mark Brown ed3e80c4c9 ASoC: Ensure WM8731 register cache is synced when resuming from disabled
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-21 16:58:46 +00:00
Mark Brown 70a28f841d Merge branch 'for-3.2' into for-3.3 2011-11-21 11:28:19 +00:00
Mark Brown 1d9a91db92 Merge branch 'DB_RANGE-size-fixes' of git://git.alsa-project.org/alsa-kprivate into for-3.2 2011-11-21 11:28:11 +00:00
Axel Lin ef0cd47093 ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-20 20:58:21 +00:00
Clemens Ladisch 028aa634e1 ASoC: wm_hubs: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:52 +01:00
Clemens Ladisch a1320fee27 ASoC: wm9090: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:51 +01:00
Clemens Ladisch dac678f5c2 ASoC: wm8993: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:51 +01:00
Clemens Ladisch 43e9dc7bce ASoC: wm8962: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:50 +01:00
Clemens Ladisch 740fb9d512 ASoC: sgtl5000: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:50 +01:00
Clemens Ladisch a19ea0b8ec ASoC: rt5631: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
the last entry from being omitted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:25 +01:00
Clemens Ladisch 0aed4a95ce ASoC: adau1373: fix DB_RANGE size
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-20 15:46:24 +01:00
Leon Romanovsky 2f534edc15 ASoC: alc5632: Remove volatile registers from regmap defaults
There is no need to provide defaults for the volatile
registers and doing so might cause confusion.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:49:39 +00:00
Mark Brown 4fbf4ad40f Merge branch 'for-3.2' into for-3.3 2011-11-17 16:48:57 +00:00
Timo Juhani Lindfors 2391a0e067 ASoC: wm8753: Skip noop reconfiguration of DAI mode
This patch makes it possible to set DAI mode to its currently applied
value even if codec is active. This is necessary to allow

aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom &
alsactl store -f backup.state
alsactl restore -f backup.state

to work without returning errors. This patch is based on a patch sent
by Klaus Kurzmann <mok@fluxnetz.de>.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-17 16:48:25 +00:00
Leon Romanovsky 277c01bb45 ASoC: alc5632: Update of i2c_probe function to use regmap API only
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:18 +00:00
Leon Romanovsky 9b4156cbe9 ASoC: alc5632: Added support of two undocumented registers
There are two undocumented registers in use in alc5632_i2c_probe
function. It must be added to support future rewrite of this
function to use regmap API completely.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:17 +00:00
Leon Romanovsky 43fa8e5337 ASoC: alc5632: Remove unrelevant registers and name the relevant
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:48:17 +00:00
Brian Austin 6d10c91493 ASoC: Add support for CS42L73 codec
This patch adds support for the Cirrus Logic CS42L73 low power stereo
codec.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Georgi Vlaev <joe@nucleusys.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-17 16:46:40 +00:00
Mark Brown 086834e2d2 ASoC: Say how long short WM8958 DSP2 firmwares are
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 17:33:58 +00:00
Andrey Danin 1a083257eb ASoC: alc5632: rename volume/switch contols for master and speaker volumes.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:43:28 +00:00
Leon Romanovsky bb39753c2b ASoC: Convert ALC5632 codec to use regmap API
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:41:56 +00:00
Leon Romanovsky c9be8427b1 ASoC: alc5632: Fix compile without CONFIG_PM
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-16 10:41:55 +00:00
Axel Lin 6662ff5c3b ASoC: Remove unused control_data and mutex fields from struct alc5632_priv
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:43:30 +00:00
Johannes Stezenbach 3fb5eac50d ASoC: sta32x: add workaround for ESD reset issue
sta32x resets and loses all configuration during ESD test.
Work around by polling the CONFA register once a second
and restore all coeffcients and registers when CONFA
changes unexpectedly.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:36:43 +00:00
Johannes Stezenbach e012ba2491 ASoC: sta32x: add platform data definition
Add a structure for platform specific configuration and use it,
thereby removing a few FIXMEs which marked hard-coded values.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-14 21:34:14 +00:00
Mark Brown 8f9aa2526b Merge branch 'for-3.2' into for-3.3 2011-11-14 21:33:17 +00:00
Johannes Stezenbach 54dc6cabe6 ASoC: sta32x: preserve coefficient RAM
The coefficient RAM must be saved in a shadow so it can
be restored when the codec is powered on using
regulator_bulk_enable().

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-11-14 21:32:12 +00:00
Kuninori Morimoto a9317e8b6b ASoC: ak4642: add ak4648 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:05 +00:00
Kuninori Morimoto e8c83dbfb7 ASoC: ak4642: add Line out support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:05 +00:00
Kuninori Morimoto 3c7035268c ASoC: ak4642: add headphone mute switch control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:04 +00:00