]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agoASoC: core: Introduce SOC_DOUBLE_VALUE macro
Peter Ujfalusi [Tue, 4 Oct 2011 11:39:38 +0000 (14:39 +0300)]
ASoC: core: Introduce SOC_DOUBLE_VALUE macro

With the new macro we can remove duplicated code
for the SOC_DOUBLE type of controls.
We can also remap the SOC_SINGLE_VALUE macro to
SOC_DOUBLE_VALUE

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unneeded hw_write initialisation in wm8523
Axel Lin [Tue, 4 Oct 2011 03:45:41 +0000 (11:45 +0800)]
ASoC: Remove unneeded hw_write initialisation in wm8523

It is not required after commit 8d50e447
"ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unneeded hw_write initialisation in ak4671
Axel Lin [Tue, 4 Oct 2011 03:44:42 +0000 (11:44 +0800)]
ASoC: Remove unneeded hw_write initialisation in ak4671

It is not required now.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8711: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 03:15:30 +0000 (11:15 +0800)]
ASoC: wm8711: 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>
13 years agoASoC: wm8988: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 03:18:59 +0000 (11:18 +0800)]
ASoC: wm8988: 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>
13 years agoASoC: wm8750: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 03:17:24 +0000 (11:17 +0800)]
ASoC: wm8750: 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>
13 years agoASoC: Avoid writing to WM8971_RESET in wm8971_resume
Axel Lin [Mon, 3 Oct 2011 23:44:22 +0000 (07:44 +0800)]
ASoC: Avoid writing to WM8971_RESET in wm8971_resume

Writing to WM8971_RESET resets all registers to the default state.
Thus we should avoid writing to WM8971_RESET on resume.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Tue, 4 Oct 2011 14:44:43 +0000 (15:44 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: wm8994: Fix setting rate_reg for wm8994-aif2
Axel Lin [Tue, 4 Oct 2011 14:07:18 +0000 (22:07 +0800)]
ASoC: wm8994: Fix setting rate_reg for wm8994-aif2

For wm8994-aif2, the rate_reg should be WM8994_AIF2_RATE.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: wm8995: Slightly optimize configure_clock
Axel Lin [Tue, 4 Oct 2011 12:08:04 +0000 (20:08 +0800)]
ASoC: wm8995: Slightly optimize configure_clock

snd_soc_update_bits() will only write new register value
if the old value is different from the new value.
In additional, snd_soc_update_bits() returns 0 for no change.
No need to read WM8995_CLOCKING_1 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>
13 years agoASoC: wm8994: Slightly optimize configure_clock
Axel Lin [Tue, 4 Oct 2011 12:07:03 +0000 (20:07 +0800)]
ASoC: wm8994: Slightly optimize configure_clock

snd_soc_update_bits() will only write new register value
if the old value is different from the new value.
In additional, snd_soc_update_bits() returns 0 for no change.
No need to read WM8994_CLOCKING_1 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>
13 years agoASoC: omap-pcm: Fix the no period wakeup implementation
Peter Ujfalusi [Tue, 4 Oct 2011 08:09:52 +0000 (11:09 +0300)]
ASoC: omap-pcm: Fix the no period wakeup implementation

After omap_request_dma the BLOCK_IRQ is enabled as default
configuration for the channel.
If we are requested for no period wakeup, we need to disable
the BLOCK_IRQ in order to not receive any interrupts.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8988: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 01:59:26 +0000 (09:59 +0800)]
ASoC: wm8988: 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>
13 years agoASoC: wm8971: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 01:58:28 +0000 (09:58 +0800)]
ASoC: wm8971: 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>
13 years agoASoC: wm8711: Use snd_soc_update_bits for read-modify-write
Axel Lin [Tue, 4 Oct 2011 01:55:45 +0000 (09:55 +0800)]
ASoC: wm8711: 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>
13 years agoASoC: max98095 codec: Catch driver bugs for biquad channel name
Ryan Mallon [Mon, 3 Oct 2011 22:55:41 +0000 (09:55 +1100)]
ASoC: max98095 codec: Catch driver bugs for biquad channel name

Move the biquad channel names to a separate array and iterate over it in
max98095_get_bq_channel rather than duplicating the hardcoded channel
names. Add an error message if an invalid channel is passed and check
the error in the callers.

Also added a BUILD_BUG_ON to ensure that the bq_mode_name and controls
arrays are the same size.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: max98088 codec: Catch driver bugs for eq channel name
Ryan Mallon [Mon, 3 Oct 2011 22:55:40 +0000 (09:55 +1100)]
ASoC: max98088 codec: Catch driver bugs for eq channel name

Move the EQ channel names to a separate array and iterate over it in
max98088_get_channel rather than duplicating the hardcoded channel
names. Add an error message if an invalid channel is passed and check
the error in the callers.

Also added a BUILD_BUG_ON to ensure that the eq_mode_name and controls
arrays are the same size.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add WM1811 support
Mark Brown [Tue, 24 May 2011 09:35:53 +0000 (17:35 +0800)]
ASoC: Add WM1811 support

The WM1811 is mostly register compatible with the WM8994 and WM8958,
providing a high performance audio hub CODEC in a small form factor
suitable for ultra compact system designs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agomfd: Add WM1811 support
Mark Brown [Tue, 24 May 2011 09:35:40 +0000 (17:35 +0800)]
mfd: Add WM1811 support

The WM1811 is mostly register compatible with the WM8994 and WM8958,
providing a high performance audio hub CODEC in a small form factor
suitable for ultra compact system designs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoASoC: Fix typo in 24.576MHz rate in WM5100
Mark Brown [Mon, 3 Oct 2011 20:07:06 +0000 (21:07 +0100)]
ASoC: Fix typo in 24.576MHz rate in WM5100

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Instantiate DAPM widgets before we do the DAI link init
Mark Brown [Wed, 28 Sep 2011 19:12:01 +0000 (20:12 +0100)]
ASoC: Instantiate DAPM widgets before we do the DAI link init

The DAI init function may want to do something that needs the widgets to
be instantiated.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: samsung: s3c-i2s-v2.c needs module.h
Axel Lin [Sun, 2 Oct 2011 13:34:26 +0000 (21:34 +0800)]
ASoC: samsung: s3c-i2s-v2.c needs module.h

Include <linux/module.h> to fix below build error:

  CC      sound/soc/samsung/s3c-i2s-v2.o
sound/soc/samsung/s3c-i2s-v2.c:573: warning: data definition has no type or storage class
sound/soc/samsung/s3c-i2s-v2.c:573: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
sound/soc/samsung/s3c-i2s-v2.c:573: warning: parameter names (without types) in function declaration
sound/soc/samsung/s3c-i2s-v2.c:638: warning: data definition has no type or storage class
sound/soc/samsung/s3c-i2s-v2.c:638: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
sound/soc/samsung/s3c-i2s-v2.c:638: warning: parameter names (without types) in function declaration
sound/soc/samsung/s3c-i2s-v2.c:677: warning: data definition has no type or storage class
sound/soc/samsung/s3c-i2s-v2.c:677: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
sound/soc/samsung/s3c-i2s-v2.c:677: warning: parameter names (without types) in function declaration
sound/soc/samsung/s3c-i2s-v2.c: In function 's3c_i2sv2_register_dai':
sound/soc/samsung/s3c-i2s-v2.c:736: warning: initialization discards qualifiers from pointer target type
sound/soc/samsung/s3c-i2s-v2.c: At top level:
sound/soc/samsung/s3c-i2s-v2.c:754: warning: data definition has no type or storage class
sound/soc/samsung/s3c-i2s-v2.c:754: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
sound/soc/samsung/s3c-i2s-v2.c:754: warning: parameter names (without types) in function declaration
sound/soc/samsung/s3c-i2s-v2.c:756: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/s3c-i2s-v2.c:756: warning: data definition has no type or storage class
sound/soc/samsung/s3c-i2s-v2.c:756: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
sound/soc/samsung/s3c-i2s-v2.c:756: warning: function declaration isn't a prototype
make[3]: *** [sound/soc/samsung/s3c-i2s-v2.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: samsung: WM8994 depends on MFD_WM8994
Arnd Bergmann [Mon, 3 Oct 2011 14:35:46 +0000 (16:35 +0200)]
ASoC: samsung: WM8994 depends on MFD_WM8994

Any driver that selects SND_SOC_WM8994 should also make sure that
MFD_WM8994 is set, since the codec relies on the mfd code:

  sound/built-in.o: In function `wm8994_read':
  last.c:(.text+0x20160): undefined reference to `wm8994_reg_read'
  sound/built-in.o: In function `wm8994_write':
  last.c:(.text+0x20e68): undefined reference to `wm8994_reg_write'

This solves the problem by selecting the MFD driver directly
and adding extra 'depends on' statements to make sure that we
respect the dependencies of that driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix setting update bits for WM8741_DACRMSB_ATTENUATION
Axel Lin [Mon, 3 Oct 2011 03:09:01 +0000 (11:09 +0800)]
ASoC: Fix setting update bits for WM8741_DACRMSB_ATTENUATION

After checking the code and datasheet, I think what we want in the second
snd_soc_update_bits call is to update WM8741_DACRMSB_ATTENUATION register
instead of WM8741_DACRLSB_ATTENUATION.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: txx9: Add __exit_p at necessary place
Axel Lin [Mon, 3 Oct 2011 01:38:32 +0000 (09:38 +0800)]
ASoC: txx9: Add __exit_p at necessary place

We have __exit annotation for txx9aclc_generic_remove(),
thus add __devexit_p to wrap it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise ep93xx_ac97_dai
Axel Lin [Mon, 3 Oct 2011 03:33:05 +0000 (11:33 +0800)]
ASoC: Staticise ep93xx_ac97_dai

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise simtec_audio_resume()
Axel Lin [Mon, 3 Oct 2011 08:11:52 +0000 (16:11 +0800)]
ASoC: Staticise simtec_audio_resume()

It is exported via resume callback of struct dev_pm_ops rather than referenced
directly and so should be staticised.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove needless codec->dapm.bias_level assignment to SND_SOC_BIAS_OFF
Axel Lin [Mon, 3 Oct 2011 12:17:16 +0000 (20:17 +0800)]
ASoC: Remove needless codec->dapm.bias_level assignment to SND_SOC_BIAS_OFF

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sh: use correct __iomem annotations
Arnd Bergmann [Sun, 2 Oct 2011 20:28:02 +0000 (22:28 +0200)]
ASoC: sh: use correct __iomem annotations

This removes a few unnecessary type casts and avoids
sparse warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: imx: eukrea_tlv320 needs i2c
Arnd Bergmann [Sun, 2 Oct 2011 20:28:01 +0000 (22:28 +0200)]
ASoC: imx: eukrea_tlv320 needs i2c

Add a missing dependency that is required for random configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Sun, 2 Oct 2011 19:20:35 +0000 (20:20 +0100)]
Merge branch 'for-3.1' into for-3.2

Conflicts:
sound/soc/omap/mcpdm.c
sound/soc/omap/mcpdm.h

13 years agoASoC: omap_mcpdm_remove cannot be __devexit
Arnd Bergmann [Sun, 2 Oct 2011 14:45:31 +0000 (16:45 +0200)]
ASoC: omap_mcpdm_remove cannot be __devexit

omap_mcpdm_remove is used from asoc_mcpdm_probe, which is an
initcall, and must not be discarded when HOTPLUG is disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused srate variable in tegra_spdif_hw_params
Axel Lin [Sun, 2 Oct 2011 13:07:02 +0000 (21:07 +0800)]
ASoC: Remove unused srate variable in tegra_spdif_hw_params

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused rate variable in magician_playback_hw_params
Axel Lin [Sun, 2 Oct 2011 13:05:56 +0000 (21:05 +0800)]
ASoC: Remove unused rate variable in magician_playback_hw_params

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise sh4_ssi_dai
Axel Lin [Sun, 2 Oct 2011 09:43:16 +0000 (17:43 +0800)]
ASoC: Staticise sh4_ssi_dai

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise samsung_spdif_dai
Axel Lin [Sun, 2 Oct 2011 09:42:30 +0000 (17:42 +0800)]
ASoC: Staticise samsung_spdif_dai

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tegra: Staticise tegra_i2s_dai and tegra_spdif_dai
Axel Lin [Sun, 2 Oct 2011 09:41:40 +0000 (17:41 +0800)]
ASoC: tegra: Staticise tegra_i2s_dai and tegra_spdif_dai

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: samsung: Add __devexit_p at necessary places
Axel Lin [Sun, 2 Oct 2011 03:20:13 +0000 (11:20 +0800)]
ASoC: samsung: Add __devexit_p at necessary places

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the confi
options."

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Jaswinder Singh <jassi.brar@samsung.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Seungwhan Youn <sw.youn@samsung.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: kirkwood-i2s: Add __devexit_p at necessary place
Axel Lin [Sun, 2 Oct 2011 01:18:17 +0000 (09:18 +0800)]
ASoC: kirkwood-i2s: Add __devexit_p at necessary place

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."

We have __devexit annotation for kirkwood_i2s_dev_remove(), thus add __devexit_p
at necessary place.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8782: Add __devexit_p at necessary place
Axel Lin [Sun, 2 Oct 2011 00:55:02 +0000 (08:55 +0800)]
ASoC: wm8782: Add __devexit_p at necessary place

According to the comments in include/linux/init.h:

"Pointers to __devexit functions must use __devexit_p(function_name), the
wrapper will insert either the function_name or NULL, depending on the config
options."

We have __devexit annotation for wm8782_remove(), thus add __devexit_p at
necessary place.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Sun, 2 Oct 2011 18:57:19 +0000 (19:57 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: omap: Use single hw_params callback in sdp3430 and zoom2
Jarkko Nikula [Fri, 30 Sep 2011 13:07:46 +0000 (16:07 +0300)]
ASoC: omap: Use single hw_params callback in sdp3430 and zoom2

There is no need to use two hw_params callbacks in sdp3430 and zoom2 as
thet are now identical. Use instead the same snd_soc_ops structure and
hw_params callback for both DAI links.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: omap: Convert bunch of machine drivers to use init time DAI format
Jarkko Nikula [Fri, 30 Sep 2011 13:07:45 +0000 (16:07 +0300)]
ASoC: omap: Convert bunch of machine drivers to use init time DAI format

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: omap-mcbsp: Prepare for init time DAI format setting
Jarkko Nikula [Fri, 30 Sep 2011 13:07:44 +0000 (16:07 +0300)]
ASoC: omap-mcbsp: Prepare for init time DAI format setting

Before commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the
dai_link") expectation for omap-mcbsp was that snd_soc_dai_set_fmt is to be
called first in machine hw_params callback before other CPU DAI functions.
Thus it was enough that only omap_mcbsp_dai_set_dai_fmt cleared the
mcbsp->regs structure.  [Note that this was pure convention, it's always
been OK to set things on init -- broonie]

Now this doesn't hold anymore since machine drivers can set the DAI format
only once on init time and thus mcbsp->regs may get out of sync when other
CPU DAI functions are modifying them dynamically with different values
between the calls. Therefore clear the accessed mcbsp->regs bits and
bitfields in other functions too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix setting update bits for WM8753_LADC and WM8753_RADC
Axel Lin [Sun, 2 Oct 2011 12:41:04 +0000 (20:41 +0800)]
ASoC: Fix setting update bits for WM8753_LADC and WM8753_RADC

Current code set update bits for WM8753_LDAC and WM8753_RDAC twice,
but missed setting update bits for WM8753_LADC and WM8753_RADC.

I think it is a copy-paste bug in commit 776065
"ASoC: codecs: wm8753: Fix register cache incoherency".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: use a valid device for dev_err() in Zylonite
Arnd Bergmann [Sat, 1 Oct 2011 20:03:34 +0000 (22:03 +0200)]
ASoC: use a valid device for dev_err() in Zylonite

A recent conversion has introduced references to &pdev->dev, which does
not actually exist in all the contexts it's used in.

Replace this with card->dev where necessary, in order to let
the driver build again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: tlv320aic3x: Use driver_data field of struct i2c_device_id to identify models
Axel Lin [Wed, 28 Sep 2011 13:56:48 +0000 (21:56 +0800)]
ASoC: tlv320aic3x: Use driver_data field of struct i2c_device_id to identify models

Save model information in driver_data so we can simplify the implementation.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Simplify code in out_drv_event for pending work check
Peter Ujfalusi [Thu, 29 Sep 2011 12:22:37 +0000 (15:22 +0300)]
ASoC: twl6040: Simplify code in out_drv_event for pending work check

Instead of checking, if the work is pending, it is safer to cancel
the pending work, or wait till the scheduled work finishes.
This way we can avoid modifying the variables used by the work
function.
Since we know that no work is pending, we can remove the two additional
checks in POST_PMU, and PRE_PMD for non pending works.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Shift 2 identifies the HS output in out_drv_event
Peter Ujfalusi [Thu, 29 Sep 2011 12:22:36 +0000 (15:22 +0300)]
ASoC: twl6040: Shift 2 identifies the HS output in out_drv_event

None of the driver handled by out_drv_event have it's power
bit shifted by 3.
Remove the case for shift 3, and also add comment for the cases.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: correct loop counters for HS/HF ramp code
Peter Ujfalusi [Thu, 29 Sep 2011 12:22:35 +0000 (15:22 +0300)]
ASoC: twl6040: correct loop counters for HS/HF ramp code

The Headset gain range is 0 - 0xf (4 bit resolution)
The Handsfree gain range is 0 - 0x1d (5 bit resolution,
0x1e, and 0x1f values are invalid)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: One workqueue should be enough
Peter Ujfalusi [Thu, 29 Sep 2011 12:22:34 +0000 (15:22 +0300)]
ASoC: twl6040: One workqueue should be enough

It is a bit overkill to have three (3) separate
workqueue for a single driver.
We can manage things with one workqueue nicely.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: omap-mcbsp: Fix FS polarity for LEFT_J, DSP_A and DSP_B formats
Jarkko Nikula [Fri, 30 Sep 2011 07:55:32 +0000 (10:55 +0300)]
ASoC: omap-mcbsp: Fix FS polarity for LEFT_J, DSP_A and DSP_B formats

Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
changed DAI format flag values and we cannot simply invert anymore e.g.
frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
is no anymore fixed bit position for bit-clock or frame-sync inversion.

Fix this by relying only on DAI format flag values passed to us and by not
making any assumption on individual bit positions.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sn95031: Do not use static variable for channel_index
Axel Lin [Fri, 30 Sep 2011 05:56:59 +0000 (13:56 +0800)]
ASoC: sn95031: Do not use static variable for channel_index

No reason to use static variable for channel_index.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add missed regulator_unregister_notifier and regulator_bulk_free in wm8995_remove
Axel Lin [Fri, 30 Sep 2011 03:54:44 +0000 (11:54 +0800)]
ASoC: Add missed regulator_unregister_notifier and regulator_bulk_free in wm8995_remove

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct aic3x_priv
Axel Lin [Fri, 30 Sep 2011 02:32:37 +0000 (10:32 +0800)]
ASoC: Remove unused "control_data" field of struct aic3x_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sdp4430: Fix string for FM input name
Ujfalusi, Peter [Fri, 30 Sep 2011 08:39:50 +0000 (11:39 +0300)]
ASoC: sdp4430: Fix string for FM input name

The name contains invalid valid character (/), which
causes problems when trying to create the debugfs
directory structure:
ASoC: Failed to create Aux/FM Stereo In debugfs file

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Davinci: Fix FS polarity for I2S format
Jarkko Nikula [Fri, 30 Sep 2011 07:55:33 +0000 (10:55 +0300)]
ASoC: Davinci: Fix FS polarity for I2S format

Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
changed DAI format flag values and we cannot simply invert anymore e.g.
frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
is no anymore fixed bit position for bit-clock or frame-sync inversion.

Fix this by relying only on DAI format flag values passed to us and by not
making any assumption on individual bit positions

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Vaibhav Bedia <vaibhav.bedia@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct cs4271_private
Axel Lin [Fri, 30 Sep 2011 02:31:10 +0000 (10:31 +0800)]
ASoC: Remove unused "control_data" field of struct cs4271_private

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused function check_vdac_to_outmix from rt5631
Mark Brown [Thu, 29 Sep 2011 16:32:17 +0000 (17:32 +0100)]
ASoC: Remove unused function check_vdac_to_outmix from rt5631

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise non-exported symbols in rt5631
Mark Brown [Thu, 29 Sep 2011 16:30:06 +0000 (17:30 +0100)]
ASoC: Staticise non-exported symbols in rt5631

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix a bug in WM8962 DSP_A and DSP_B settings
Susan Gao [Thu, 29 Sep 2011 10:08:18 +0000 (11:08 +0100)]
ASoC: Fix a bug in WM8962 DSP_A and DSP_B settings

Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmico.com>
Cc: stable@kernel.org
13 years agoASoC: tlv320dac33: Add guarding parentheses to macros
Axel Lin [Thu, 29 Sep 2011 04:09:57 +0000 (12:09 +0800)]
ASoC: tlv320dac33: Add guarding parentheses to macros

Put parentheses around macro argument uses. This avoids pitfalls
for the programmer, where the argument expansion does not give the
expected result, for example:

SAMPLES_TO_US(substream->runtime->rate, dac33->uthr - DAC33_MODE7_MARGIN + 1);

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Also count neighbour checks for supplies
Mark Brown [Wed, 28 Sep 2011 17:20:26 +0000 (18:20 +0100)]
ASoC: Also count neighbour checks for supplies

Missed when the stat was originally added.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Use dai_fmt in speyside_wm8962
Mark Brown [Tue, 27 Sep 2011 15:42:27 +0000 (16:42 +0100)]
ASoC: Use dai_fmt in speyside_wm8962

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Allow DAI formats to be specified in the dai_link
Mark Brown [Tue, 27 Sep 2011 15:41:01 +0000 (16:41 +0100)]
ASoC: Allow DAI formats to be specified in the dai_link

For almost all machines the DAI format is a constant, always set to the
same thing. This means that not only should we normally set it on init
rather than in hw_params() (where it has been for historical reasons) we
should also allow users to configure this by setting a variable in the
dai_link structure. The combination of these two will make many machine
drivers even more data driven.

Implement a new dai_fmt field in the dai_link doing just that. Since 0 is
a valid value for many format flags and we need to be able to tell if the
field is actually set also add one to all the values used to configure
formats.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: adau1701: Fix prototype for adau1701_set_sysclk
Axel Lin [Wed, 28 Sep 2011 05:48:35 +0000 (13:48 +0800)]
ASoC: adau1701: Fix prototype for adau1701_set_sysclk

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct ak4671_priv
Axel Lin [Wed, 28 Sep 2011 02:00:18 +0000 (10:00 +0800)]
ASoC: Remove unused "control_data" field of struct ak4671_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct max98095_priv
Axel Lin [Wed, 28 Sep 2011 02:14:05 +0000 (10:14 +0800)]
ASoC: Remove unused "control_data" field of struct max98095_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct max98088_priv
Axel Lin [Wed, 28 Sep 2011 02:12:48 +0000 (10:12 +0800)]
ASoC: Remove unused "control_data" field of struct max98088_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct cs42l51_private
Axel Lin [Wed, 28 Sep 2011 02:11:54 +0000 (10:11 +0800)]
ASoC: Remove unused "control_data" field of struct cs42l51_private

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct cs4270_private
Axel Lin [Wed, 28 Sep 2011 02:10:38 +0000 (10:10 +0800)]
ASoC: Remove unused "control_data" field of struct cs4270_private

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct alc5623_priv
Axel Lin [Wed, 28 Sep 2011 02:01:26 +0000 (10:01 +0800)]
ASoC: Remove unused "control_data" field of struct alc5623_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: adau1701: Initialize codec->control_data before using it
Axel Lin [Wed, 28 Sep 2011 07:21:28 +0000 (15:21 +0800)]
ASoC: adau1701: Initialize codec->control_data before using it

Currently codec->control_data is not initialized before calling
process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).

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>
13 years agoASoC: Fix setting adau1373_dai->master for SND_SOC_DAIFMT_CBS_CFS
Axel Lin [Wed, 28 Sep 2011 07:14:56 +0000 (15:14 +0800)]
ASoC: Fix setting adau1373_dai->master for SND_SOC_DAIFMT_CBS_CFS

In the case of SND_SOC_DAIFMT_CBS_CFS, adau1373_dai->master should be false.

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>
13 years agoASoC: Remove unused "control_data" field of struct wm8904_priv
Axel Lin [Tue, 27 Sep 2011 12:40:22 +0000 (20:40 +0800)]
ASoC: Remove unused "control_data" field of struct wm8904_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct wm9090_priv
Axel Lin [Tue, 27 Sep 2011 12:45:17 +0000 (20:45 +0800)]
ASoC: Remove unused "control_data" field of struct wm9090_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct wm9081_priv
Axel Lin [Tue, 27 Sep 2011 12:44:13 +0000 (20:44 +0800)]
ASoC: Remove unused "control_data" field of struct wm9081_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct wm8978_priv
Axel Lin [Tue, 27 Sep 2011 12:43:24 +0000 (20:43 +0800)]
ASoC: Remove unused "control_data" field of struct wm8978_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct wm8960_priv
Axel Lin [Tue, 27 Sep 2011 12:42:34 +0000 (20:42 +0800)]
ASoC: Remove unused "control_data" field of struct wm8960_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused "control_data" field of struct wm8940_priv
Axel Lin [Tue, 27 Sep 2011 12:41:36 +0000 (20:41 +0800)]
ASoC: Remove unused "control_data" field of struct wm8940_priv

The control_data field is used to initialize the codec's control_data field,
but since this is also done by the snd-soc-cache core, the redundant
assignment can be removed and the field can be dropped.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add device ID for WM9093 to WM9090 driver
Mark Brown [Tue, 27 Sep 2011 18:19:41 +0000 (19:19 +0100)]
ASoC: Add device ID for WM9093 to WM9090 driver

The WM9093 is an enhanced version of the WM9093.  Add the device ID to
the driver, further patches will add support for the additional features
in the WM9093.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add DRC control for WM8996
Karl Tsou [Tue, 27 Sep 2011 17:47:18 +0000 (01:47 +0800)]
ASoC: Add DRC control for WM8996

Signed-off-by: Karl Tsou <karl@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ssm2602: Support setting the oscillator and the clock output state
Lars-Peter Clausen [Tue, 27 Sep 2011 09:08:48 +0000 (11:08 +0200)]
ASoC: ssm2602: Support setting the oscillator and the clock output state

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

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ssm2602: Set initial bias level to standby
Lars-Peter Clausen [Tue, 27 Sep 2011 09:08:47 +0000 (11:08 +0200)]
ASoC: ssm2602: Set initial bias level to standby

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise sst_platform_dai
Axel Lin [Tue, 27 Sep 2011 02:38:50 +0000 (10:38 +0800)]
ASoC: Staticise sst_platform_dai

It is not used outside this driver so no need to make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused fields in struct mfld_mc_private
Axel Lin [Tue, 27 Sep 2011 02:38:07 +0000 (10:38 +0800)]
ASoC: Remove unused fields in struct mfld_mc_private

Both *socdev and *codec of struct mfld_mc_private are not being used
in this driver, remove it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Tue, 27 Sep 2011 10:21:11 +0000 (11:21 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: ssm2602: Re-enable oscillator after suspend
Lars-Peter Clausen [Tue, 27 Sep 2011 09:08:46 +0000 (11:08 +0200)]
ASoC: ssm2602: Re-enable oscillator after suspend

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: twl6040: No need to change delay during HF ramp
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:31 +0000 (16:26 +0300)]
ASoC: twl6040: No need to change delay during HF ramp

The Handsfree gain have 2dB steps all the way, so there is no
reason to have different delays as we approaching to the
end of the scale.
The comment was also wrong, since we have 0dB at 0x3 raw, at 16 the gain
is -26dB.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: No need to change delay during HS ramp
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:30 +0000 (16:26 +0300)]
ASoC: twl6040: No need to change delay during HS ramp

The Headset gain have 2dB steps all the way, so there is no
reason to have different delays as we approaching to the
end of the scale.
The comment was also wrong, since we have 0dB at 0x0 raw at
one end of the range, and not in the middle.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Move the delayed_work for HS detection under twl6040_jack_data
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:27 +0000 (16:26 +0300)]
ASoC: twl6040: Move the delayed_work for HS detection under twl6040_jack_data

The delayed_work named 'delayed_work' is for the headset detection,
so move it to the twl6040_jack_data struct.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Move delayed_work struct inside twl6040_output for HS/HF
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:26 +0000 (16:26 +0300)]
ASoC: twl6040: Move delayed_work struct inside twl6040_output for HS/HF

The delayed works for the output can be moved within the
twl6040_output struct (from the twl6040_data) to be better
organized.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Combine the custom volsw get, and put functions
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:25 +0000 (16:26 +0300)]
ASoC: twl6040: Combine the custom volsw get, and put functions

We can manage with one set of get, and put function for the gain
controls we need to handle with custom code due to the shadowing
of the register.
For both get, and put function we can call decide based on the
mc->rreg value, if we need to call the volsw, or the vlosw_2r
variant (in 2r case rreg is not 0).
Handling of the shadow values are the same for both type of
controls.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Rename pga_event to out_drv_event
Peter Ujfalusi [Mon, 26 Sep 2011 13:26:24 +0000 (16:26 +0300)]
ASoC: twl6040: Rename pga_event to out_drv_event

This event handler is used with the OUT_DRV widgets.
The name pga_event was misleading.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sdp4430: Configure McPDM offset cancellation
Peter Ujfalusi [Mon, 26 Sep 2011 13:05:59 +0000 (16:05 +0300)]
ASoC: sdp4430: Configure McPDM offset cancellation

Based on the values from twl6040 codec (HSOTRIM L/R) we can configure
the McPDM offset cancellation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: omap-mcpdm: API to configure offset cancellation
Peter Ujfalusi [Mon, 26 Sep 2011 13:05:58 +0000 (16:05 +0300)]
ASoC: omap-mcpdm: API to configure offset cancellation

The offset cancellation values can be different from board to board, even
on the same HW platform.
Provide a way for the machine drivers to configure the McPDM offset
cancellation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Function to fetch the TRIM values
Peter Ujfalusi [Mon, 26 Sep 2011 13:05:57 +0000 (16:05 +0300)]
ASoC: twl6040: Function to fetch the TRIM values

Provide API to fetch the TRIM values (for machine drivers)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Read the TRIM values from the chip
Peter Ujfalusi [Mon, 26 Sep 2011 13:05:56 +0000 (16:05 +0300)]
ASoC: twl6040: Read the TRIM values from the chip

Update the reg_cache with values from chip regarding to TRIM.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Drop exporting ad1980_dai
Axel Lin [Sat, 24 Sep 2011 10:43:43 +0000 (18:43 +0800)]
ASoC: Drop exporting ad1980_dai

ad1980_dai is not used outside this driver,
thus drop exporting it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Drop exporting sn95031_get_mic_bias
Axel Lin [Sat, 24 Sep 2011 10:16:15 +0000 (18:16 +0800)]
ASoC: Drop exporting sn95031_get_mic_bias

sn95031_get_mic_bias() is not used outside this driver
and it is a static function now.
Thus drop exporting sn95031_get_mic_bias.

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