Commit graph

848 commits

Author SHA1 Message Date
Mark Brown b2c1e07b81 ASoC: Remove DSP mode support for WM8776
This is not supported by current hardware revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-08-16 11:46:57 +01:00
Mark Brown b6b056911a ASoC: Only tweak WM8994 chip configuration on devices up to rev D
Any subsequent revisions will have these configuration changes applied
by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-13 14:55:13 +01:00
Mark Brown 0c17b39394 ASoC: Optimise DSP performance for WM8994
Change the chip defaults to optimise performance of some of the DSP
functionality.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-13 14:55:01 +01:00
Sonic Zhang 2e2211a387 ASoC: add AD1980 obsolete information
This codec has been obsoleted by ADI, so add appropriate warnings to the
source tree to dissuade people from using in new designs based on driver
support.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-10 15:43:45 +01:00
Mark Brown 4f0ed9a51b ASoC: Fix inverted mute controls for WM8580
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-08-10 09:56:07 +01:00
Peter Ujfalusi bda7d2a862 ASoC: TWL4030: Capture route runtime DAPM ordering fix
Fix the ordering problem in DAPM domain, when the user
changes between digital and analog sources during active
capture (or loopback) scenario.
Before this patch, when the user changed from analog source
to digital there were a short time, when the codec enabled
analog mic bias (2.2 volts) instead of the correct digital
mic bias (1.8 volts) to the digital microphones.
This behaviour caused by the former implementation of
selecting the correct type of bias. This was done at the
POST_REG event of the DAPM_MUX_E("TXx Capture Route")
widget.
By moving the bias type selection as DAPM_SUPPLY and
connecting it to the corresponding digimic widget the
problematic situation can be avoided.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-04 00:42:39 +01:00
Axel Lin 116bcd9cf2 ASoC: wm9081: fix resource reclaim in wm9081_register error path
This patch fixes the error path in wm9081_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:41 +01:00
Axel Lin d484366bee ASoC: wm8978: fix a memory leak if a wm8978_register fail
There is a memory leak found if wm8978_register() fail.
This patch moves the buffer allocate and release
at the same level to prevent the memory leak.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:27 +01:00
Axel Lin 4eaac50552 ASoC: wm8974: fix a memory leak if another WM8974 is registered
wm8974 is allocated in wm8974_i2c_probe() but is not freed if wm8974_register()
return -EINVAL (if another WM8974 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:46:07 +01:00
Axel Lin 6b5d071e8b ASoC: wm8961: fix resource reclaim in wm8961_register error path
This patch fixes the error path in wm8961_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:52 +01:00
Axel Lin 8089a49d99 ASoC: wm8955: fix resource reclaim in wm8955_register error path
This patch fixes the error path in wm8955_register to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:37 +01:00
Axel Lin db1e18de98 ASoC: wm8940: fix a memory leak if wm8940_register return error
This patch adds checking for wm8940_register return value,
and does kfree(wm8940) if wm8940_register() fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:20 +01:00
Axel Lin 62f5ad6733 ASoC: wm8904: fix resource reclaim in wm8904_register error path
This patch includes below fixes:
1. wm8904 need to be kfreed in wm8904_register() error path before return.
2. fix the error path for snd_soc_register_codec() fail and
   snd_soc_register_dai() fail to properly free resources.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:45:00 +01:00
Axel Lin 2c2749de11 ASoC: wm8711: fix a memory leak if another WM8711 is registered
wm8711 is allocated in either wm8711_spi_probe() or wm8711_i2c_probe() but is
not freed if wm8711_register() return -EINVAL(if another ad1836 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:44:29 +01:00
Axel Lin ef99e9b5a1 ASoC: wm8523: fix resource reclaim in wm8523_register error path
This patch includes below fixes:
1. If another WM8523 is registered, need to kfree wm8523 before return -EINVAL.
2. If snd_soc_register_codec failed, goto error path to properly free resources.
3. Instead of using mixed in-line and goto style cleanup, use goto style error
   handling if snd_soc_register_dai failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:44:10 +01:00
Axel Lin 085efd28b6 ASoC: da7210: fix a memory leak if failed to initialise da7210 audio codec
da7210 should be kfreed if da7210_init() return error.
This patch also fixes the error handing in the case of snd_soc_register_dai()
fail by adding snd_soc_unregister_codec() in error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:43:52 +01:00
Axel Lin 7bcaad919b ASoC: ak4642: fix a memory leak if failed to initialise AK4642
ak4642 should be kfreed if ak4642_init() return error.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:40:41 +01:00
Axel Lin fd3c8ac9cb ASoC: ad1836: fix a memory leak if another ad1836 is registered
ad1836 is allocated in ad1836_spi_probe() but is not freed if ad1836_register()
return -EINVAL (if another ad1836 is registered).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:40:26 +01:00
Ian Lartey 992bee401c ASoC: Initial WM8741 CODEC driver
The WM8741 is a very high performance stereo DAC designed for audio
applications such as professional recording systems, A/V receivers and
high specification CD, DVD and home theatre systems. The device supports
PCM data input word lengths from 16 to 32-bits and sampling rates up to
192kHz.  The WM8741 also supports DSD bit-stream data format, in both
direct DSD and PCM-converted DSD modes.

TODO: Expand wm8741_set_dai_sysclk and rate_constraint members to
allow for all supported sample rate / Master Clock frequency combinations.
Fully enable control of supplies.

Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-03 07:38:15 +01:00
Peter Ujfalusi a577b318fc ASoC: tlv320dac33: Add support for automatic FIFO configuration
Platform parameter to enable automatic FIFO configuration when
the codec is in Mode1 or Mode7 FIFO mode.
When this mode is selected, the controls for changing
nSample (in Mode1), and UTHR (in Mode7) are not added.
The driver configures the FIFO configuration based on
the stream's period size in a way, that every burst will
read period size of data from the host.
In Mode7 we need to use a formula, which gives close enough
aproximation for the burst length from the host point
of view.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-29 10:21:11 +01:00
Peter Ujfalusi f430a27f05 ASoC: tlv320dac33: Revisit the FIFO Mode1 handling
Replace the hardwired latency definition with platform data
parameter, and simplify the nSample parameter calculation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-29 10:21:04 +01:00
Peter Ujfalusi b93cc9f19b ASoC: TWL4030: Capture route DAPM event fix
There is no need to handle POST_PMU, POST_PMD event with
the Capture Route widget.
It is enough to handle POST_REG event, since that will come
when the user changes the routing, and we will switch the needed
bits in the registers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-27 11:43:40 +01:00
Kuninori Morimoto a7e7cd5bd7 ASoC: da7210: Add HeadPhone Playback Volume control
HeadPhone Playback Volume control register of DA7210 has
reserved area. This patch considered it as mute.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-23 10:17:47 +01:00
Takashi Iwai 49e7042799 Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-07-21 15:01:07 +02:00
Peter Ujfalusi 01ea6ba2bc ASoC: TWL4030: Add configurable delay after digimic enable
When digital microphones are connected to twl, delay is
needed after enabling the digimic interface of the codec.
Add new parameter for the setup data, which can be used
to pass the apropriate delay in ms after the digimic
interface has been enabled.

Without certain delay (in certain HW configuration) the
beggining of the recorded sample contains a glitch, which
is generated by the digital microphones.

Delaying the micbias1, 2 (which is the bias for the digimic0
or 1) does not help, since the glitch is coming after
switching the digimic interface.

Reversing the micbias and digimic enable order does not
work either (in that case the wait need to be added after
the micbias enabled).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-21 11:57:58 +01:00
Mark Brown d1ce6b200c ASoC: Unconditionally enable WM8994 AIF1ADC TDM mode
AIF1ADC TDM mode has no effect other than causing the ADCDAT line to
be tristated rather than driven low on clock cycles where there is no
data to be transmitted. If the clock cycle is idle then there should
be no devices using the data so tristating should have no adverse
effects.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 10:27:05 +01:00
Mark Brown 3b89b22358 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-20 09:52:25 +01:00
Chanwoo Choi 41f9a314af ASoC: Select wm_hubs automatically for WM8994
Otherwise all machine drivers need to do so.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-20 09:51:12 +01:00
Mark Brown a3257ba869 ASoC: Implement WM8994 AIF1ADC2 paths
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 09:48:25 +01:00
Mark Brown 395e4b7362 ASoC: Explicitly disable DC servo on WM hubs headphone powerdown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-20 09:48:07 +01:00
Mark Brown d947837410 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-17 19:45:43 +01:00
Mark Brown 3c0709396d ASoC: Remove duplicate AUX definition from WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-07-17 19:44:40 +01:00
Jorge Eduardo Candelaria 0fad4ed7b2 ASoC: TWL6040: Correct widget handling for drivers
In order to reduce pop-noise at powering up/down of the DACs and Drivers,
these components have to be handled in a specific sequence. Headset,
Handsfree, and Earphone drivers are now registered as PGA components to
ensure DACs are enabled first.

Also, add a delay to leave time for DACs to settle before
continuing power up/down sequence.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-17 19:27:18 +01:00
Mark Brown 03b0dc02cf Merge branch 'for-2.6.35' into for-2.6.36 2010-07-14 20:12:57 +01:00
Axel Lin cecb66fddf ASoC:: remove a redundant snd_soc_unregister_codec call in wm8988_register
snd_soc_unregister_codec is called twice if snd_soc_register_dai fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:31 +01:00
Axel Lin c555b028f1 ASoC: wm8727: add a missing return in wm8727_platform_probe
otherwise the error path will always be executed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:18 +01:00
Peter Ujfalusi 27eeb1feed ASoC: TWL4030: DAC power optimization
Restructure the DAPM connections in order to enable
only the needed DAC (out of four in twl4030 series).
I need to keep the 'AIF Enable' supply connected to
the L2/R2 digital path, since the digital loopback
needs AIF and APLL running.
If no valid route available, than none of the DAC will
be powered, but the AIF and APLL is going to be enabled.
Furthermore, if only one audio path have valid route,
than only the corresponding DAC will be powered.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsomicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-13 11:30:12 +01:00
Peter Ujfalusi 8b0d31532e ASoC: TWL4030: Fix for digital loopback gain range
When the gain is configured using dB value it was
not possible to use -24dB since the loopback got
muted instead of -24dB.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsomicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-13 11:30:05 +01:00
Mark Brown 66b47fdb85 ASoC: Implement WM8994 OPCLK support
The WM8994 can output a clock derived from its internal SYSCLK, called
OPCLK.  The rate can be selected as a sysclk, with a division from the
SYSCLK rate specified (multiplied by 10 since a division of 5.5 is
supported) and the clock can be disabled by specifying a divisor of
zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 08:50:12 +09:00
Mark Brown e88ff1e6db ASoC: Include WM8994 GPIO and interrupt registers in codec_reg
Very handy for debug.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 01:37:06 +09:00
Mark Brown db059c0f6e ASoC: Automatically manage ALC coefficients for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-06 08:46:10 +09:00
Mark Brown afd6d36a0d ASoC: Automatically manage DAC deemphasis rate for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:41:18 +09:00
Mark Brown 4faaa8d968 ASoC: Remove current WM8960 deemphasis control
It will be replaced with automatic deemphasis rate configuration but since
we have an enumeration table in this driver this is done in a separate
commit to make the renumbering of the enumeration items clear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:37:17 +09:00
Maurus Cuelenaere 0d9c15e45b ASoC: codec: Add WM8987 device id to WM8750 driver
The WM8987 codec is register compatible with the WM8750, so just add it to the
SPI and I²C device table.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-04 18:02:07 +09:00
Kuninori Morimoto a300de3cff ASoC: ak4642: Add Digital Playback Volume control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-01 17:08:47 +01:00
Vladimir Zapolskiy 338de9d9da ASoC: uda134x: correct bias level setup for codecs family
For UDA1341 codec power control is managed in STATUS1 register, and
for all other codecs in DATA011 register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Vladimir Zapolskiy ed632ad3b8 ASoC: uda134x: add DATA011 register found in codecs family
In UDA1340, UDA1344 and UDA1345 codecs there is one more functional
register in part of DATA0 tranfser. For UDA1341 this register
coincides with EA register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Mark Brown af51b5c0f0 Merge remote branch 'takashi/topic/asoc' into for-2.6.36 2010-06-30 14:46:53 +01:00
Vladimir Zapolskiy e4295b40ee ASoC: uda134x: fix bias level setup on initialization
On initialization ADC/DAC are enabled only for UDA1341, that's why
bias_level shall be set to off explicitly, otherwise dapm is
misinformed about bias_level on startup.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:02 +01:00
Vladimir Zapolskiy cc3202f5da ASoC: uda134x: replace a macro with a value in platform struct.
This change wipes out a hardcoded macro, which enables codec bias
level control. Now is_powered_on_standby value shall be used instead.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:01 +01:00