Commit Graph

1944 Commits

Author SHA1 Message Date
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
Kuninori Morimoto 24747daea5 ASoC: ak4642: add DAPM support for HeadPhone Output
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:03 +00:00
Kuninori Morimoto ed2dd7da35 ASoC: ak4642: add ak4642_set_bias_level()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:03 +00:00
Leon Romanovsky 88c494b99a ASoC: Remove unnecessary backslash from alc5632 codec
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:47:00 +00:00
Leon Romanovsky d8c29e7f78 ASoC: Remove unused defines in alc5632 codec
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-11 08:46:55 +00:00
Mark Brown c42da64293 ASoC: Convert WM8995 to direct regmap usage
Large code size increase due to the addition of readability information
and the reformatting of the defaults table.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 17:17:17 +00:00
Mark Brown d9b5e9c6bc ASoC: Move WM5100 platform data based setup into I2C probe
Get things configured as early as possible, especially useful for the
GPIOs which might be useful anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 16:16:19 +00:00
Leon Romanovsky 94d5f7c025 ASoC: Add new Realtek ALC5632 CODEC driver
This driver implements basic functionality, using I²C for the control
channel.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 12:00:35 +00:00
Mark Brown f403414725 ASoC: Fix duplicate const warnings in da7210.c
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-10 00:13:44 +00:00
Mark Brown 9db16e4c1b ASoC: Convert WM5100 gpiolib support to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 17:29:47 +00:00
Mark Brown 588ac5e0b6 ASoC: Move most WM5100 resource allocation to I2C probe
More standard Linuxish.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:26 +00:00
Mark Brown d926b5a3d9 ASoC: Mark WM5100 MISC CONTROL as readable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:24 +00:00
Mark Brown 60bf5b0728 ASoC: Need to convert wm5100 cache sync to direct regmap usage too
ASoC knows nothing about the cache now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 16:33:23 +00:00
Axel Lin b402735883 ASoC: wm9081: 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-11-09 11:45:31 +00:00
Mark Brown 7d6f6b0f39 ASoC: Convert wm8971 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-09 10:27:45 +00:00
Mark Brown 0469e7b98c ASoC: Disable debounce on some WM8962 interrupts
Allow them to work when the device is unclocked.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:54 +00:00
Mark Brown 620c36ae66 Merge branch 'for-3.2' into for-3.3 2011-11-08 15:39:44 +00:00
Axel Lin adf463626a ASoC: wm9081: Don't write WM9081_BIAS_ENA bit to WM9081_VMID_CONTROL register
WM9081_BIAS_ENA is the bit[1] of WM9081_BIAS_CONTROL_1 register (05h).
Current code incorrectly write it to WM9081_VMID_CONTROL(04h) register.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:36 +00:00
Axel Lin f1e10354fc ASoC: wm9081: Fix reading wrong register for setting VMID 2*240k
VMID Divider Enable and Select is controlled by BIT[2:1] of WM9081_VMID_CONTROL
register (04h).
Current code reads wrong register (WM9081_BIAS_CONTROL_1) for setting
VMID 2*240k.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 15:39:32 +00:00
Mark Brown 7cfa467b74 ASoC: Convert WM9081 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:14:02 +00:00
Mark Brown bd132ec585 ASoC: Convert wm5100 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:50 +00:00
Mark Brown 7b16f56012 ASoC: Convert WM8962 to direct regmap usage
This initial conversion just moves the register init, regulator acquisition
and device verification out to the I2C probe(). Movement of other parts of
the driver like the GPIO and beep generation code will follow.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:41 +00:00
Mark Brown b2d1e23373 ASoC: Convert WM8996 gpiolib to regmap
Actually pretty straightforward.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:25 +00:00
Mark Brown ee5f387226 ASoC: Move most WM8996 resource acquisition to I2C probe
Now that the WM8996 driver is using the regmap API for register I/O we no
longer need the ASoC card to be active in order to interact with the chip.
In order to be more idiomatic for Linux move most of the existing probe()
function out into the I2C probe() function prior to registration with ASoC.

The IRQ and GPIO init will be moved separately as these are slightly more
involved.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:13:12 +00:00
Mark Brown 7917274682 ASoC: Convert WM8996 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 14:08:34 +00:00
Axel Lin e94de1e864 ASoC: Avoid a redundant read in cs42l51_pdn_event
snd_soc_update_bits already does read-modify-write,
no need to read the register before calling snd_soc_update_bits.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 11:02:31 +00:00
Kuninori Morimoto 202113912b ASoC: ak4642: ak4642 was tested
ak4642 was tested by ms7724se board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08 10:52:24 +00:00
Mark Brown 41966710ab Merge branch 'for-3.2' into for-3.3 2011-11-08 10:47:46 +00:00
Mark Brown 1dd6c0770d Merge branch 'for-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-3.2 2011-11-08 10:37:41 +00:00
Mark Brown 4633fa48fb Merge branch 'for-3.2' into for-3.3
Conflicts:
	sound/soc/codecs/wm8940.c
2011-11-08 01:17:30 +00:00
Linus Torvalds 32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Mark Brown 19940b3d55 ASoC: Ensure we get an impedence reported for WM8958 jack detect
Occasionally we may see an accessory reported before we have a stable
impedance for the accessory. If this happens then reread the status in
order to ensure that the handler can take the appropriate action for the
status change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:24:59 +00:00
Mark Brown 5a3ad6bd6a ASoC: Don't use wm8994->control_data when requesting IRQs
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:24:58 +00:00
Mark Brown 8eeea521d9 ASoC: Don't use wm8994->control_data in wm8994_readable_register()
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-04 23:24:58 +00:00
Mark Brown 03431972ac ASoC: Disable thermal shutdown when not using speakers in wm_hubs
The thermal shutdown support in wm_hubs devices is tied to the speaker
drivers (which are the only high power subsystems within the device).
Ensure minimal current usage when the thermal shutdown support is not
required by disabling the circuit when the speaker drivers are powered
down.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 23:08:08 +00:00
Mark Brown 94b88e647c ASoC: Manage thermal shutdown for WM8962
Disable the thermal shutdown circuits for headphone and speaker when the
relevant outputs are not enabled in order to save current in idle modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 22:47:55 +00:00
Mark Brown a04e0c8680 ASoC: Only enable thermal shutdown when required on WM9081
The WM9081 thermal shutdown is only effective when the speaker output is
enabled so disable it when that is not in use for a small current saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-04 22:47:32 +00:00
Takashi Iwai 6bcbf64ace Merge branch 'fix/asoc' into for-linus 2011-11-03 18:20:53 +01:00
Mark Brown 98dd932b6a ASoC: Fix sort of jz4740 in Makefile
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-02 13:31:13 +00:00
Mark Brown 8aafc43556 ASoC: Sort LM4857 with the CODECs in the Makefile
Having a separate list for amps is a little confusing now the official
driver model for them is the same as for other CODECs so let's sort them
into the CODEC list, but only do this for those that are actual CODEC
drivers so it's easier to remember which ones need updating.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-02 13:31:11 +00:00
Mark Brown 00ae3b8691 ASoC: Disable MICBIAS and SYSCLK when stopping WM8962 accessory detection
They aren't needed any more. If machines need them for other purposes then
further changes will be required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:55 +00:00
Mark Brown a5ef988408 ASoC: WM8962 accessory detection requires MICBIAS
Force MICBIAS on as well as SYSCLK as the WM8962 accessory detection can't
function without both. No point in making machine drivers manually enable
it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:33 +00:00
Mark Brown db0e55438c ASoC: Enable SYSCLK last when enabling WM8962 mic detection
Ensure everything is set up before we start detecting.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:26 +00:00
Mark Brown 2a761cde31 ASoC: Start WM8962 FLL if SYSCLK is enabled
Since we have code to automatically manage the start and stop of the FLL
based on the SYSCLK widget if SYSCLK is already enabled and the FLL is
configured then we need to start it up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:21 +00:00
Mark Brown 0b7dd6ad92 ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:52:05 +00:00
Mark Brown 2af8de8c39 ASoC: Ensure the WM8962 oscillator and PLLs start up disabled
Since there is no current software control for these they would otherwise
be left enabled, consuming power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:51:49 +00:00
Mark Brown 4f4488abc9 ASoC: Ensure WM8962 PLL registers are reset
The WM8962 has a separate software reset for the PLL registers. Ensure that
these are reset also on startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:44:55 +00:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Mark Brown 64964e8264 ASoC: Fix return value of wm5100_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: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:31 +00:00
Mark Brown 3ff51c859f ASoC: Convert wm8400 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:22 +00:00
Mark Brown 8a709d92c7 ASoC: Convert wm8900 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:14 +00:00
Mark Brown dcd658c56b ASoC: Convert wm8904 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:08 +00:00
Mark Brown 187774cbe3 ASoC: Convert wm8960 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:04 +00:00
Mark Brown 20abf08879 ASoC: Convert wm8961 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:07:58 +00:00
Mark Brown 48dd231b0b ASoC: Convert wm8974 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:53 +00:00
Mark Brown 605b151ae3 ASoC: Convert wm8983 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:40 +00:00
Mark Brown 812f8a3524 ASoC: Convert wm8985 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:35 +00:00
Mark Brown be48f20d8f ASoC: Convert wm8988 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:30 +00:00
Mark Brown e1fc3f21c2 ASoC: Convert wm8990 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:25 +00:00
Mark Brown b6406a8027 ASoC: Convert wm8991 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:18 +00:00
Mark Brown 9ce316236b ASoC: Convert wm8995 MICBIASes to supply widgets
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:10 +00:00
Hong Xu 5a7c5f26df ASoC: WM8904: Set `invert' bit for Capture Switch
Set `invert' bit for Capture Switch. Otherwise analogue is muted when
Capture Switch is ON.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:50:03 +00:00
Axel Lin d558cfc300 ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
Current implementation in wm8711_set_dai_fmt always clear BIT[3:2]
(the Input Audio Data Bit Length Select) of WM8711_IFACE(07h) register.
Input Audio Data Bit Length Select bits are set by wm8711_hw_params,
we should leave BIT[3:2] untouched in wm8711_set_dai_fmt.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:38:28 +00:00
Axel Lin 04c57163c8 ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
The Input Audio Data Bit Length Select is controlled by BIT[3:2] of
WM8711_IFACE(07h) register.
Current code incorrectly masks BIT[1:0] which is for Audio Data Format Select.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:38:18 +00:00
Axel Lin 68e4798143 ASoC: tlv320aic3x: Clear BIT_CLK_MASTER and WORD_CLK_MASTER bits for for slave mode
According to the datasheet:

Page0 / Register8: Audio Serial Data interface Control Register A
BIT 7: Bit Clock Directional Control
        0: Bit clock is an input (slave mode)
        1: Bit clock is an output (master mode)

BIT 6: Word Clock Directional Control
        0: Word clock is an input (slave mode)
        1: Word clock is an output (master mode)

Current code sets BIT_CLK_MASTER and WORD_CLK_MASTER bits for master mode,
but does not clear these bits for slave mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 12:00:15 +02:00
Axel Lin b01a3d69f8 ASoC: tlv320aic23: Clear TLV320AIC23_MS_MASTER bit for slave mode
According to the datasheet:

Digital Audio Interface Format (07h) register:
BIT6:	Master/slave mode
	0: Slave
	1: Master

Current code sets TLV320AIC23_MS_MASTER bit for master mode,
but does not clear it for slave mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 12:00:14 +02:00
Axel Lin b272cc769a ASoC: wm8940: Fix mask for setting BCLKDIV
According to the datasheet:
BCLK is controlled by BIT[4:2] of WM8940_CLOCK(06h) register.

Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 11:59:26 +02:00
Axel Lin 9c173d15f9 ASoC: tlv320aic3x: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 11:58:28 +02:00
Takashi Iwai bb14eb0da7 Merge branch 'topic/asoc' into for-linus 2011-10-27 10:43:40 +02:00
Axel Lin 5927f94700 ASoC: wm8940: Properly set codec->dapm.bias_level
Reported-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2011-10-27 09:17:08 +02:00
Takashi Iwai 9430148d80 Merge branch 'topic/remove-irqf_disable' into for-linus 2011-10-26 23:51:48 +02:00
Axel Lin bdb527e9ae ASoC: wm8940: Fix a typo for the mask of setting WM8940_BCLKDIV
The registers are 16 bits, thus remove an extra F for the mask.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-24 14:09:50 +02:00
Axel Lin 49fa4d9b5a ASoC: wm8940: Fix setting PLL Output clock division ratio
According to the datasheet:
The PLL Output clock division ratio is controlled by BIT[5:4] of
WM8940_GPIO register(08h).
Current code read/write the WM8940_ADDCNTRL(07h) register which is wrong.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-24 14:09:42 +02:00
Axel Lin 753ddf5215 ASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_remove
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-24 14:09:33 +02:00
Axel Lin 1d533de998 ASoC: wm8400: Fix setting Fout clock divider for FLL Control 4
What we want here is to clear the WM8400_FLL_OUTDIV_MASK bits then
OR with factors.outdiv.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-24 14:09:26 +02:00
Axel Lin 0d8d293898 ASoC: max98095: Convert codec->hw_write to snd_soc_write
codec->hw_write is broken now, convert codec->hw_write to snd_soc_write.

The hardware has 2 banks of registers sharing a section in I2C register space.
The 1st bank is the primary one and is cached.
The 2nd bank is for loading coefficients only and they do not need cache.
These coefficients registers are therefore direct writes.
Thus we set cache_bypass flag to deal with this before calling snd_soc_write.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22 11:09:54 +01:00
Axel Lin 33cb92cff9 ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
Ensure all mask bits are clear before setting new value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22 10:35:20 +01:00
Axel Lin 3205e6629b ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-22 10:34:59 +01:00
Ashish Chavan 52082d8f56 ASoC: da7210: Add support for line out and DAC
DA7210 has three line outputs. OUT1 Left, OUT1 Right and OUT2 (mono).
This patch adds support for gain controls for these three line outs.
It also adds support for overall DAC gain control.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22 10:34:50 +01:00
Ashish Chavan 6950c60dc1 ASoC: da7210: Add support for DAPM
This patch adds support for DAPM covering all inputs and outputs
as well as ADC and DAC.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22 10:34:22 +01:00
Axel Lin 064a4bcee4 ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
use it instead of hardcoded (0x1 << 4) - 1 for the mask.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-21 09:56:06 +01:00
Axel Lin 5b13de7aa7 ASoC: Set sgtl5000->ldo in ldo_regulator_register
Otherwise calling ldo_regulator_remove() does not unregister regulator
and free memories.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-21 09:55:43 +01:00
Axel Lin ff39dbe935 ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-20 15:03:23 +01:00
Axel Lin 35024f4922 ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-20 15:03:05 +01:00
Axel Lin 6765ff778e ASoC: rt5631: Remove unused codec field from struct rt5631_priv
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20 15:02:34 +01:00
Axel Lin f96c255df7 ASoC: ak4671: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20 15:02:26 +01:00
Axel Lin cf0feafbc3 ASoC: Fix reg_word_size for ak4104
According to the register map in datasheet, the registers are 8 bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20 15:02:09 +01:00
Axel Lin 9f9619a078 ASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k
According to the datasheet:
BIT 2:1
        VMID_SEL[1:0] VMID Divider Enable and Select
        00 = VMID disabled
        01 = 2x40k Omh divider
        10 = 2x240k Omh divider
        11 = 2x5k Omh divider

To set VMID 2*240k, we should OR reg with 0x04 instead of 0x40.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20 14:48:22 +01:00