Commit Graph

1718 Commits (698570062d324e40d86294b585f2d08608caebde)

Author SHA1 Message Date
Bas Vermeulen 06c15baf90 ASoC: 88pm860x-codec - Allow independent use of both I2S playback and capture
Introduce a I2S CLK supply so playback and capture can operate independently.

Signed-off-by: Bas Vermeulen <bas.vermeulen@novero.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21 15:52:28 +01:00
johnnyhsu@realtek.com d80852223e ASoC: Add driver for rt5631
Signed-off-by: Johnny Hsu <johnnyhsu@realtek.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21 15:52:23 +01:00
Mark Brown 6d4baf084f ASoC: Add WM5100 driver
The WM5100 is a highly integrated low power audio subsystem with advanced
digital signal processing capabilities including effects, speech clarity
enhancement and active noise cancellation.  This initial driver provides
support for basic audio paths, further patches will provide more
complete functionality.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20 16:02:16 +01:00
Mark Brown f648de832d Merge branch 'for-3.1' into for-3.2 2011-09-20 12:59:35 +01:00
Lars-Peter Clausen 26806a4266 ASoC: ssm2602: Do not dereference codec->control_data
The driver assumes that control_data points to the drivers i2c_client struct,
but this is no longer the case since the ASoC core has switched to regmap.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20 12:59:07 +01:00
Mark Brown f93dc4b6c9 ASoC: Remove bitrotted wm8962_resume()
This functionality is now subsumed within the bias management, using the
standard cache management functionality, without assuming the cache type.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20 12:57:48 +01:00
Mark Brown ded71dcb77 ASoC: Refcount WM8996 bandgap from FLL too
For digital only paths we need to make sure the bandgap is enabled prior
to starting the FLL which isn't tied into DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20 12:56:53 +01:00
Mark Brown c9d023adb6 ASoC: Fix unused variable warning in WM8996
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20 12:56:36 +01:00
Peter Ujfalusi cdd5054c3e ASoC: twl6040: Correct supported number of playback channels
twl6040 supports 5 playback, and 2 capture channels

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>
2011-09-19 23:15:59 +01:00
Peter Ujfalusi d8dd032d53 ASoC: twl6040: Fix the number of channels for vibra
Only mono audio can be used for vibra (DL4 channel).

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>
2011-09-19 23:15:59 +01:00
Peter Ujfalusi 2c27ff41d8 ASoC: twl6040: Use chip defaults in the initial reg_cache
Reset the twl6040_reg array to hold the chip default values.
The only changed values were for the microphone input selection.
Select no input for the microphones in the twl6040_init_chip function.

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>
2011-09-19 23:15:58 +01:00
Peter Ujfalusi a52762eee9 ASoC: twl6040: Chip initialization cleanup
There is no need to write to the vio registers at probe time, since most
them either read only, or shared with MFD or not used.
On the other hand it is a good idea to updated the ASICREV register in
the cache at this time.

After power up we need to restore some registers. Clean up the list to
contain only the registers we are going to restore.

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>
2011-09-19 23:15:57 +01:00
Axel Lin 5d42940c25 ASoC: sn95031: Staticize sn95031_pcm_hw_params
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19 18:31:00 +01:00
Mark Brown 0b684cc14a ASoC: Initial WM8996 headphone impedance measurement support
The WM8996 can measure the impedance of accessories connected to the
headphone output. Implement initial support for this, measuring the
left channel impedance when an accessory is detected and using this
to distinguish between a line load and a headphone load.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19 18:30:59 +01:00
Mark Brown 8259df12fd ASoC: WM8996 only needs bandgap for analogue functionality
Rather than managing the bandgap in the bias level control use a supply
widget as we only actually need to enable it for analogue paths, not
fully digital ones.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19 18:30:58 +01:00
Timur Tabi 0016226d03 ASoC: support all possible sample rates in the WM8776 driver
The WM8776 supports a continuous range of sample rates rather than
discrete values and supports a wider range of sample rates on the
playback path than is currently supported.  Update the constraints on
the DAIs to reflect this.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16 17:35:18 +01:00
Axel Lin 0547d0f3da ASoC: wm8995: Remove unused i2c variable in wm8995_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-09-16 10:49:21 +01:00
Axel Lin 6fa0c25bf4 ASoC: wm8995: Return -EINVAL if device ID mismatch
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-09-16 10:49:09 +01:00
Axel Lin 275708f88d ASoC: tpa6130a2: Remove obsolete cleanup for clientdata
The i2c core will clear the clientdata pointer automatically,
we don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

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>
2011-09-16 10:13:53 +01:00
Timur Tabi d1dc698a54 ASoC: support sample sizes properly in the WM8776 codec driver
Use snd_pcm_format_width() to determine the sample size, instead of
checking specify sample formats and assuming that those are the only
valid format.

This change adds support for big-endian architectures (which use the _BE
formats) and the packed 24-bit format (SNDRV_PCM_FORMAT_S24_3xE).

[Fixed single letter variable name legibility problem -- broonie]

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16 10:06:31 +01:00
Mark Brown f998f257c9 ASoC: Fix WM8996 DC servo operation without IRQ
We need to count the timeout down.

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-16 00:54:08 +01:00
Mark Brown 32d2a0c17d ASoC: Correct channel numbers for WM8996 AIF2
The AIF1 channels are numbered from zero than one; do the same thing for
AIF2 too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14 11:00:07 +01:00
Mark Brown c83495af63 ASoC: Disable WM8996 CPVDD supply when not in use
The WM8996 only requires CPVDD when the charge pump is active so control
it separately to the other supplies, only enabling it when the charge pump
is active. This will result in a small power saving on systems which are
able to provide independent software control of the supply.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14 10:59:36 +01:00
Lars-Peter Clausen 30ab1e7886 ASoC: ad193x: Setup regmap read and write flag masks for SPI
Currently register read-back for the ad193x is broken, because it expects bit 0
of the upper byte to be set to indicate a read operation, while the regmap
default for SPI is to use bit 7.

This patch also addresses another oddity of the device. There are SPI and I2C
versions of this codec. In both cases the registers are 8-bit wide and numbered
from 0x0 to 0x10, but in the SPI case there is also a so called
'global address' which is prefixed in-front of the register address. The global
address mimics I2C behaviour and includes a static device address the and the
read/write flag. This basically extends the register address to an 16-bit value
numbered from 0x800 to 0x810. These are the register numbers which are
currently used by the driver. This works, because I2C will ignore the upper
8 bits of the register, but it is still a bit confusing, as there are no such
register numbers in the I2C case.

The approach taken by this patch is to number the registers from 0x00 to 0x10
and encode the global address for SPI mode into the read and write flag masks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09 11:13:31 -07:00
Axel Lin 0f73644f37 ASoC: ad1980: Return proper error if vendor id mismatch
Return -ENODEV instead of 0 if vendor id mismatch.

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-09-08 15:39:51 -07:00
Axel Lin c8f4b7fd68 ASoC: alc5623: Remove unused mutex
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-09-05 18:15:15 -07:00
Mark Brown 27b6d92a24 ASoC: Check that WM8996 FLL started even if we don't have the IRQ
We can directly read the FLL lock status on WM8996 so even if we don't
have an interrupt wired up we can still verify that the FLL started
successfully.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-05 18:14:04 -07:00
Axel Lin 7b4615ba81 ASoC: sn95031: Fix the logic to find free channel
In the case of no free channel available,
current implementation returns 0 instead of negative errno.

This patch fixes the logic to return -EINVAL if no free channel available.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-04 08:53:39 -07:00
Mark Brown da1c6ea6cf ASoC: Allow source specification for CODEC level sysclk
Similarly to PLLs/FLLs some modern CODECs provide selectable system clock
sources. When the clock is the clock for a DAI we do not usually need to
identify which clock is being configured so can use clk_id for the source
clock but with CODEC wide system clocks we will need to specify both the
clock being configured and the source.

Add a source argument to the CODEC driver set_sysclk() operation to
reflect this. As this operation is not as widely used as the DAI
set_sysclk() operation the change is not very invasive. We probably
ought to go and make the same alternation for DAIs at some point.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:57:35 +01:00
Mark Brown d2dd0540c1 ASoC: Add device tree binding for WM8804
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:57 +01:00
Mark Brown b6de431556 ASoC: Add device tree binding for WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:50 +01:00
Mark Brown 13c7d08f54 ASoC: Add device tree binding for WM8770
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:43 +01:00
Mark Brown 1e3ad571d5 ASoC: Remove redundant -codec from WM8776 driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
2011-08-31 09:52:24 +01:00
Mark Brown 9a810e959b ASoC: Remove unused mutex from WM9090 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:04 +01:00
susan gao 18a4eef3d5 ASoC: Add 3D stereo support for wm8996
My first patch to ASoC ever! If I did something wrong, blame Ian.

Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29 10:11:31 +01:00
Mark Brown b42af319f2 Merge branch 'for-3.1' into for-3.2 2011-08-24 20:22:43 +01:00
Mark Brown 18036b5866 ASoC: Correct element count for WM8996 sidetone HPF
I can count. Honest.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-24 17:36:12 +01:00
Mark Brown 1661699aaa ASoC: Convert WM8523 to table based control and DAPM initialization
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 23:23:17 +01:00
Mark Brown fef24d92a6 Merge branch 'for-3.1' into for-3.2 2011-08-22 14:00:08 +01:00
Mark Brown a41619455c ASoC: Clear completions from late WM8996 FLL lock IRQs
In case we have a pending completion, for example due to a problem with
the input clock which got corrected after we timed out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 13:57:35 +01:00
Mark Brown fbf04076ef ASoC: Provide more detail on WM8962 thermal shutdown status
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 13:56:47 +01:00
Mark Brown 4df0cb2fa9 ASoC: Clear any outstanding WM8962 FLL lock completions before waiting
Ensure that we don't spuriously trigger early.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:45:11 +01:00
Mark Brown e6ef58700a ASoC: Report IRQ_NONE when we don't see an interrupt from WM8962
This should never happen with level triggered IRQs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:42:01 +01:00
Mark Brown 6f88a4e578 ASoC: Initial WM8962 DSP2 support
The WM8962 features a DSP providing a number of signal processing
features including HD Bass and Virtual Surround Sound (VSS).  Enable
initial support for this, allowing users to enable and disable the
algorithms using the default coefficient sets.  Further patches will
add support for runtime configuration of the DSP coefficients.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:41:56 +01:00
Mark Brown 1ab63da721 ASoC: Add basic WM8962 capture low/high pass filter control
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:39:53 +01:00
Mark Brown 2fde6e80dd ASoC: Optimise WM8996 no interrupt path
This occurs frequently if we are in edge triggered mode as we must poll the
interrupt status register until we get no more interrupts so it's worth
the effort - it means we skip writing null acknowledgements to the chip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:37:59 +01:00
Mark Brown 889c85c550 ASoC: Automatically manage WM8996 MICBIAS regulating mode
For non-audio uses like accessory detection we can use a lower quality,
unregulated microphone bias, saving a little power. As the hardware can
manually enable and disable the biases we can select regulating mode
automatically with supply widgets connected to the biases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:37:27 +01:00
Mark Brown 7691cd74c5 ASoC: Fix configuration of WM8996 input enables
There's no need for separate widgets for the enables (as the map already
shows).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:36:52 +01:00
Mark Brown 4f41adfd8c ASoC: WM8996 record paths need AIFCLK
Make AIFCLK supply the record paths otherwise record will not work unless
there is a simultaneous playback.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22 12:36:20 +01:00
Axel Lin e3d73c1bbf ASoC: sta32x: Move resource allocation and release to the corresponding callback functions
This patch includes below small fixes:

1. Move sta32x_set_bias_level() from sta32x_i2c_remove() to sta32x_remove().
2. Remove a redundant regulator_bulk_free() call in sta32x_i2c_remove(),
   as we will call regulator_bulk_free() in sta32x_remove().
3. Remove unneeded snd_soc_codec_set_drvdata(codec, NULL) in sta32x_i2c_remove.
   The i2c core will set the clientdata to NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Johannes Stezenbach <js@sig21.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-19 01:25:56 +09:00
Mark Brown 60e3ee62af ASoC: Fix backport of WM8994 thermal warning
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2011-08-17 15:20:45 +09:00
Lars-Peter Clausen ddd7a26094 ASoC: Add ADAU1373 codec support
This patch adds support for the Analog Devices ADAU1373 audio codec.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17 00:53:54 +09:00
Mark Brown f0b182b003 ASoC: Implement WM8994 thermal warning and shutdown interrupt support
ALSA doesn't really have good mechanisms for dealing with these so we just
log them - the hardware already has automatic shutdown support.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17 00:49:03 +09:00
Mark Brown 1ddc07d0f1 ASoC: Add WM8958 noise gate support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17 00:48:47 +09:00
Mark Brown d09f3ecf1a ASoC: Disable pulls on WM8994 AIF2 when starting it
Pull control is availalbe for WM8994 AIF2, generally disabled as part of
the GPIO configuration in order to save power after system startup. As on
newer devices in the series there is no GPIO functionality on these pins
this will happen less naturally so have the driver disable the pulls as the
AIF is probed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 23:54:12 +09:00
Mark Brown 5c58b739c3 ASoC: Correct revision display for WM1250-EV1 module
The hardware documentation uses revision numbers starting at 1.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 23:54:07 +09:00
Mark Brown 80080ec539 ASoC: Add device tree binding for WM8741
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 22:58:47 +09:00
Axel Lin a595238bad ASoC: sta32x: shortcut the for loop to get ir and mcs
There is exactly one match or no match at all during the for loop iteration,
thus we can break from the for loop once a match is found.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 22:54:11 +09:00
Mark Brown a7e828896d Merge branch 'for-3.1' into for-3.2
Remove the bodge for ad193x.

Conflicts:
	sound/soc/soc-io.c
2011-08-15 22:48:19 +09:00
Scott Jiang 0cc62e9263 ASoC: ad193x: remove cache support
asoc cache layer can't support this kind of spi registers well.
remove cache support and read/write registers directly

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 22:43:49 +09:00
Scott Jiang 95c93d8525 ASoC: ad193x: fix dac word len setting
dac word len value should left shift before setting

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Acked-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-08-15 22:29:22 +09:00
Scott Jiang bf545ed72f ASoC: ad193x: fix registers definition
fix dac word len mask and adc tdm fmt shift value

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-08-15 22:28:53 +09:00
Axel Lin 161d55c3ec ASoC: sta32x: Fix a memory leak if snd_soc_register_codec fails
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15 22:28:52 +09:00
Mark Brown afe8db5f75 Merge branch 'for-3.1' into for-3.2 2011-08-14 19:19:58 +09:00
Mark Brown dc5de62be6 ASoC: Remove redundant -codec from WM8750
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 19:19:43 +09:00
Mark Brown a115c72802 ASoC: Move WM8962 CLKREG_OVD earlier
When the clocking registers are not overriden some of the registers are
not writable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-08-14 19:18:37 +09:00
Mark Brown 4b7ed83aa3 ASoC: Disable WM8994 VMID for digital only paths
On WM8994 class devices only the analogue portions of the CODEC require
VMID so when running digital only paths we can leave VMID disabled.
On some earlier devices the FLL uses VMID so we don't use DAPM reference
counting alone, we maintain an internal reference count which is also
enabled and disabled by the FLL startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:44:23 +09:00
Mark Brown 4e04adaf87 ASoC: Add VMID widget for wm_hubs devices
Currently this does not actually do anything, it is being introduced in
order to facilitate additional power optimisations for current generation
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:44:14 +09:00
Mark Brown 70e141228a ASoC: Add device tree binding for WM8753
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:43:14 +09:00
Mark Brown ce31a0f5a6 ASoC: Add device tree binding for WM8750
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:42:51 +09:00
Mark Brown 53a5a83d24 ASoC: Add device tree binding for WM8737
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:42:43 +09:00
Mark Brown 45b4d043da ASoC: Add device tree binding for WM8728
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:42:09 +09:00
Mark Brown 1552c8f67e ASoC: Add device tree binding for WM8711
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:41:52 +09:00
Mark Brown 733eef3e96 ASoC: Add device tree support for WM8580
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:41:38 +09:00
Mark Brown bf5a85be97 ASoC: Add device tree binding for WM8523
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:41:28 +09:00
Mark Brown 0a422e1a19 ASoC: Add device tree binding for WM8510
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14 13:41:24 +09:00
Takashi Iwai f6b864a907 ASoC: Fix compile warning in wm8750.c
sound/soc/codecs/wm8750.c:784:2: warning: missing braces around initializer
sound/soc/codecs/wm8750.c:784:2: warning: (near initialization for ‘wm8750_spi_ids[2].name’)

It's because struct spi_device_id.name is a char array, not a pointer,
while the driver initializes explicitly with 0.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-12 18:22:10 +02:00
Axel Lin 4c54c6de1a ASoC: sgtl5000: fix module device table type for sgtl5000_dt_ids
The module device table for of_device_id should use "of" type.

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-08-12 11:39:25 +09:00
Mark Brown 10645a7c68 Merge branch 'for-3.1' into for-3.2 2011-08-11 12:30:26 +09:00
Mark Brown feb00dceb5 ASoC: Terminate WM8750 SPI device ID table
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2011-08-11 12:30:13 +09:00
Mark Brown 4158a05741 Merge branch 'for-3.1' into for-3.2 2011-08-11 10:43:40 +09:00
Mark Brown 280ec8b718 ASoC: Add missing break in WM8994 probe
This error would have no effect on current silicon revisions, the fall
through case has the same behaviour.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-11 10:43:20 +09:00
Mark Brown 53b2bb3a41 ASoC: Specify register defaults for WM8958 MICBIAS1 and MICBIAS2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 19:42:47 +09:00
Mark Brown 29571ad67c Merge branch 'for-3.1' into for-3.2 2011-08-10 14:11:48 +09:00
Mark Brown 511d8cf0ab ASoC: Fix typo in wm8750 spi_ids
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
2011-08-10 14:11:34 +09:00
Mark Brown c38071c0ca ASoC: Fix warning in WM1250-EV1 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 00:38:58 +09:00
Mark Brown 39e9b8d25d ASoC: Add SPI support for WM8741
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 00:36:12 +09:00
Mark Brown 398575db00 ASoC: Refactor WM8741 regulator handling into CODEC generic code
No meaningful runtime impact but is more in line with other CODECs and
will support further work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 00:35:29 +09:00
Mark Brown 68817ee48a Merge branch 'for-3.1' into for-3.2 2011-08-10 00:18:10 +09:00
Mark Brown 0473e61b9a ASoC: Remove some more redundant -codecs from driver names
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 00:17:56 +09:00
Mark Brown 40045a85df ASoC: Fix SPI driver binding for WM8987
As we had no id_table only the driver name would be matched against
meaning that WM8987 devices wouldn't be bound.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-10 00:17:20 +09:00
Mark Brown 6f1a7767fd Merge branch 'for-3.1' into for-3.2 2011-08-09 10:00:05 +09:00
Mark Brown 630106342e ASoC: Remove unneeded -codec from WM8753 driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-09 09:59:54 +09:00
Stephen Warren f99847a690 ASoC: WM8903: Free IRQ on device removal
Without this, request_irq on subsequent device initialization fails, and
the codec cannot be used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-09 09:43:58 +09:00
Takashi Iwai 8c285645ab Merge branch 'wm8996-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-08-08 10:45:31 +02:00
Mark Brown 18d4ed4342 Merge branch 'for-3.1' into for-3.2
Conflict due to the fix for the register map failure - taken the for-3.1
version.

Conflicts:
	sound/soc/codecs/sgtl5000.c
2011-08-08 14:56:19 +09:00
Mark Brown 22de4534ae Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git into for-3.1 2011-08-08 14:52:06 +09:00
Mark Brown 844970916c ASoC: Acknowledge WM8996 interrupts before acting on them
This closes the small race between a status being read in response to an
interrupt and clearing the interrupt, meaning that if the status changes
between those periods we might not get a reassertion of the interrupt.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-08 14:30:59 +09:00
Mark Brown a9ba615134 ASoC: Rename WM8915 to WM8996
For marketing reasons the part will be called WM8996. In order to avoid
user confusion rename the driver to reflect this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-08 14:30:37 +09:00
Wolfram Sang 151798f872 ASoC: sgtl5000: fix cache handling
Cache handling in this driver is broken. The chip has 16-bit registers, yet the
register numbers also increase by 2 per register, i.e.  there are only
even-numbered registers. The cache in this driver, though, simply increments
register numbers, so it does need some mapping as seen in
sgtl5000_restore_regs(), note the '>> 1':

	snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL,
                        cache[SGTL5000_CHIP_LINREG_CTRL >> 1]);

That, of course, won't work with snd_soc_update_bits(). (Thus, we won't even
notice the missing register 0x1c in the default regs which shifted all follwing
registers to wrong values.) Noticed on the MX28EVK where enabling the regulators
simply locked up the chip.

Refactor the routines and use a properly sized default_regs array which matches
the register layout of the underlying chip, i.e. create a truly flat cache.
This also saves some code which should make up for the bigger array a little.
When soc-core will somewhen have another cache type which handles a step size,
this conversion will also ease the transition.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Dong Aisheng <b29396@freescale.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-08-03 10:21:42 +09:00
Mark Brown 722d0daf2b ASoC: Remove redundant -codec from WM8580 driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-03 01:09:17 +09:00
Mark Brown 9665408eac ASoC: Remove -codec from WM8523 driver name
It's redundant to specify it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-03 01:09:10 +09:00
Mark Brown eaefb38f34 ASoC: Parse board ID/revision information from WM1250-EV1 board
The WM1250-EV1 board has an ID chip on it, check the board ID and display
the board revision during startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-02 16:10:38 +09:00
Dong Aisheng c56c5d08e1 ASoC: sgtl5000: add one missed cache reg
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Signed-off-by: Zeng Zhaoming <zhaoming.zeng@freescale.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-08-01 22:17:50 +09:00
Mark Brown 4537c4e761 ASoC: Support separate left and right channel dcs_codes values
Some devices can have performance optimized by setting different offsets
for left and right channels.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-01 22:14:49 +09:00
Mark Brown 79ef0abcd8 ASoC: Implement new DC servo readback mode for late WM8994 revisions
Later WM8994 devices implement a new DC servo readback mode with the
register used to access the offset moved to register 0x59. Implement
support for this and enable it on the appropriate devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-01 22:14:30 +09:00
Shawn Guo 58e494247a ASoC: sgtl5000: add device tree probe support
It adds device tree probe support for sgtl5000 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-29 17:37:15 +01:00
Mark Brown f9925d4400 ASoC: Disable wm_hubs periodic DC servo update
This does not function correctly in all circumstances so disable the
periodic updates unconditionally for stable; a future patch will reenable
where appropriate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-29 10:31:07 +01:00
Mark Brown a7f96e4dc6 ASoC: Add device tree binding for WM8731
Tested with the famous "hey, look! this compiles" test plan.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked by: Grant Likely <grant.likely@secretlab.ca>
2011-07-29 10:30:16 +01:00
Linus Torvalds 7562343716 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (22 commits)
  ALSA: hda - Cirrus Logic CS421x support
  ALSA: Make pcm.h self-contained
  ALSA: hda - Allow codec-specific set_power_state ops
  ALSA: hda - Add post_suspend patch ops
  ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM
  ALSA: hda - Make sure mute led reflects master mute state
  ALSA: hda - Fix invalid mute led state on resume of IDT codecs
  ASoC: Revert "ASoC: SAMSUNG: Add I2S0 internal dma driver"
  ALSA: hda - Add support of the 4 internal speakers on certain HP laptops
  ALSA: Make snd_pcm_debug_name usable outside pcm_lib
  ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parser
  ASoC: dapm - Add methods to retrieve snd_card and soc_card from dapm context.
  ASoC: SAMSUNG: Add I2S0 internal dma driver
  ASoC: SAMSUNG: Modify I2S driver to support idma
  ASoC: davinci: add missing break statement
  ASoC: davinci: fix codec start and stop functions
  ASoC: dapm - add DAPM macro for external enum widgets
  ASoC: Acknowledge WM8962 interrupts before acting on them
  ASoC: sgtl5000: guide user when regulator support is needed
  ASoC: sgtl5000: refactor registering internal ldo
  ...
2011-07-27 09:25:15 -07:00
Linus Torvalds b0189cd087 Merge branch 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (47 commits)
  OMAP: Add debugfs node to show the summary of all clocks
  OMAP2+: hwmod: Follow the recommended PRCM module enable sequence
  OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code
  OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming
  OMAP2+: PM: idle clkdms only if already in idle
  OMAP2+: clockdomain: add clkdm_in_hwsup()
  OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework
  OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition()
  OMAP4: hwmod: Introduce the module control in hwmod control
  OMAP4: cm: Add two new APIs for modulemode control
  OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure
  OMAP4: hwmod data: Add PRM context register offset
  OMAP4: prm: Remove deprecated functions
  OMAP4: prm: Replace warm reset API with the offset based version
  OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros
  OMAP: hwmod: Wait the idle status to be disabled
  OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros
  OMAP2+: hwmod: Init clkdm field at boot time
  OMAP4: hwmod data: Add clock domain attribute
  OMAP4: clock data: Add missing divider selection for auxclks
  ...
2011-07-26 17:42:18 -07:00
Takashi Iwai 636f78581d Merge branch 'fix/asoc' into for-linus 2011-07-26 17:47:05 +02:00
Takashi Iwai 13b137ef03 Merge branch 'topic/asoc' into for-linus 2011-07-22 08:43:19 +02:00
Mark Brown 3198b9eb51 ASoC: Acknowledge WM8962 interrupts before acting on them
This closes the small race between a status being read in response to an
interrupt and clearing the interrupt, meaning that if the status changes
between those periods we might not get a reassertion of the interrupt.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-20 20:50:08 +01:00
Wolfram Sang 09bddc8eb2 ASoC: sgtl5000: guide user when regulator support is needed
Print a hint when the user has a setup where CONFIG_REGULATOR is really
needed to make the driver work.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Dong Aisheng <b29396@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-19 16:19:30 +01:00
Wolfram Sang e94a4062c8 ASoC: sgtl5000: refactor registering internal ldo
The code for registering the internal ldo was present twice. Turn it
into a function instead. Also, inform the user if LDO is used now.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Dong Aisheng <b29396@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-19 16:19:22 +01:00
Arnd Bergmann bc574e190d Merge branches 'omap/prcm' and 'omap/mfd' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc into next/devel-2 2011-07-17 21:48:22 +02:00
Mark Brown 4400855986 Merge branch 'for-3.0' into for-3.1 2011-07-17 18:25:58 +09:00
Mark Brown b793eb60a0 ASoC: Correct WM8994 MICBIAS supply widget hookup
The WM8994 and WM8958 series of devices have two MICBIAS supplies rather
than one, the current widget actually manages the microphone detection
control register bit (which is managed separately by the relevant API).

Fix this, hooking the relevant supplies up to the MICBIAS1 and MICBIAS2
widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-17 18:24:29 +09:00
Mark Brown 7d02173cd1 ASoC: Reduce power consumption for idle DAIs in WM8994
If DAIs are idle but their clocks are in use for some reason (eg, as
SYSCLK or for accessory detect) then set the clock dividers to the maximum
to reduce slightly the power consumption of the unclocked circuits.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-17 17:51:10 +09:00
Mark Brown ca1004bab9 ASoC: Report an error for unknown adav80x formats
Not only fixes error handling but also some uninitialized variable
warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2011-07-17 13:15:20 +09:00
Mark Brown f0f5039c3d ASoC: Handle failed WM8994 FLL lock waits
Try the completion before we start the FLL so that if an interrupt was
delayed long enough for us to miss it we don't wait for the completion
it signalled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-17 13:15:00 +09:00
Mark Brown 1479c3fb5f ASoC: Handle spurious wm_hubs DC servo done interrupts
Don't assume the first fire indicates that we're done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-15 23:48:05 +09:00
Dimitris Papastamos 6b3860b0a2 ASoC: WM8983: Initial driver
The WM8983 is a low power, high quality stereo CODEC
designed for portable multimedia applications. Highly flexible
analogue mixing functions enable new application features,
combining hi-fi quality audio with voice communication.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-15 23:39:53 +09:00
Mark Brown 47d90a03eb Merge branch 'for-3.0' into for-3.1 2011-07-15 22:43:07 +09:00
Mark Brown b35e160a11 ASoC: Fix shift in WM8958 accessory detection default implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-15 22:41:38 +09:00
Axel Lin 58499906c8 ASoC: wm8900: fix a memory leak if wm8900_set_fll fails
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 20:04:26 +09:00
Mark Brown 3b1af3f8c8 ASoC: Log WM8994 FIFO errors from the interrupt
We should spot them anyway on state changes but logging them gives us
better time information about when the misconfiguration happened.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 17:17:23 +09:00
Mark Brown f05bdb8bb6 ASoC: Don't warn on low WM8994/58 AIFnCLKs
We can have valid but very low clocks in accessory detection modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:38:30 +09:00
Mark Brown c7ebf932e5 ASoC: Use WM8994 FLL lock interrupt
If we have interrupts then wait for the FLL lock interrupt rather than
using dead reckoning when waiting for the FLL to start.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:38:22 +09:00
Mark Brown b30ead5f39 ASoC: Hook up DC servo completion IRQ for WM8994 and WM8958
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:38:14 +09:00
Mark Brown d96ca3cd0b ASoC: Implement DC servo completion IRQ handling for wm_hubs devices
The individual devices should set the flag dcs_done_irq in the hubs
shared data structure to indicate that they will flag the interrupt
by calling wm_hubs_dcs_done().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:38:04 +09:00
Mark Brown b70a51bab9 ASoC: Use late enable handling for direct voice, speaker and headphone
This ensures appropriate clocking for bypass paths to speaker and
headphone and direct voice paths on affected revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:37:52 +09:00
Johannes Stezenbach 889ebae537 ASoC: STA32x: Preserve reserved register bits
Chip documentation explicitly requires that the reset values
of reserved register bits are left untouched.  It is possible
there are differences between STA326 and STA328 or future
chip revisions in these bits, and clobbering them might
cause malfunction.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:24:32 +09:00
Johannes Stezenbach 7968843915 ASoC: STA32x: Add mixer controls for biquad coefficients
The STA32x has a number of preset EQ settings, but also
allows full user control of the biquad filter coeffcients
(when "Automode EQ" is set to "User").
Each biquad has five signed, 24bit, fixed-point coefficients
representing the range -1...1.  The five biquad coefficients
can be uploaded in one atomic operation into on-chip
coefficient RAM.
There are also a few prescale, postscale and mixing
coefficients, in the same numeric format and range
(a negative coefficient inverts phase).

These coefficients are made available as SNDRV_CTL_ELEM_TYPE_BYTES
mixer controls.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14 00:24:31 +09:00
Mark Brown 5b7396709e ASoC: Conditionalize the enable of WM8994 ADC TDM mode
Future devices will not benefit from this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-09 23:16:48 +09:00
Mark Brown 3db1bbfd4a Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-3.1 2011-07-09 23:16:12 +09:00
Takashi Iwai e8fd86efaa Merge branch 'fix/asoc' into for-linus 2011-07-09 11:56:43 +02:00
Takashi Iwai e320bc42be Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2011-07-09 11:43:04 +02:00
Mark Brown 71ae391d45 Merge branch 'for-3.0' into for-3.1 2011-07-09 18:20:36 +09:00
Takashi Iwai 18361bbe31 Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-07-09 09:44:09 +02:00
Mark Brown b5d5f59be2 Merge branch 'for-3.0' into for-3.1 2011-07-07 09:54:19 -07:00
Kuninori Morimoto bd7fdbcaa2 ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
mask didn't cover update-data

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-07 09:46:06 -07:00
Peter Ujfalusi 21385eeb02 ASoC: twl6040: Add back support for legacy mode
The legacy mode has been accidentaly removed by commit:
ASoC: twl6040: add all ABE DAIs

Add back the twl6040-hifi dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:47 +03:00
Peter Ujfalusi ff593ca1a4 ASoC: twl6040: No need to convert the PLL ID
Since the PLL handling has been simplified, and
rebased on 0, there is no longer need for converting
the PLL ID.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:46 +03:00
Peter Ujfalusi 753621c215 ASoC: twl6040: Configure PLL only once
Avoid configuring the PLL several times during audio startup.
We can configure the PLL at prepare time with parameters collected
earlier hw_param, and set_dai_sysclk calls.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:45 +03:00
Peter Ujfalusi f53c346c08 ASoC: twl6040: Simplify sample rate constraint handling
We can manage the sample rate constraints without the need
to maintain a variable and a pointer.
This simplifies the handling of the constraint, and makes it
more robust.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:44 +03:00
Peter Ujfalusi af958c72af ASoC: twl6040: Move PLL selection to codec driver
It is better if the selection between the Low power,
and High performance PLL is handled within the codec
driver, not in machine driver(s) to avoid duplicated
code, and also to have consistent tracking of the selected
PLL, and the resulting differences in supported sample
rates.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:44 +03:00
Peter Ujfalusi 7cca606794 ASoC: twl6040: Use neutral name for power mode text/enum
Change the variable names to be neutral (not refering to HS).
This will ease up the introduction of PLL selection, which
going to use the same enum strings.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:43 +03:00
Peter Ujfalusi 2a433b9daf ASoC: twl6040: Do not use wrapper for irq request
The twl6040_request_irq/free_irq inline functions are going
to be removed, so replace them with direct calls.
The irq number is provided by the core driver via resource.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:22 +03:00