1
0
Fork 0
Commit Graph

3507 Commits (39f1b56593293a3d1d3b49b97a59337a19fef053)

Author SHA1 Message Date
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
Jiri Kosina b7e9c223be Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
2011-07-11 14:15:55 +02: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
Mark Brown 3f9c42ed6b Merge branch 'for-3.0' into for-3.1 2011-07-09 19:06:33 +09:00
Kuninori Morimoto 2c7beb9285 ASoC: sh: fsi-hdmi: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch
special thanks to Takashi.

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>
2011-07-09 19:06:16 +09:00
Kuninori Morimoto f15c941331 ASoC: sh: fsi-da7210: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.

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>
2011-07-09 19:06:05 +09:00
Kuninori Morimoto 505b04e0f8 ASoC: sh: fsi-ak4642: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.

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>
2011-07-09 19:05:55 +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
Axel Lin e12c28a98f ASoC: pxa2xx-pcm: remove unused variable 'dai'
Remove unused variable 'dai' to eliminate below warning.

  CC      sound/soc/pxa/pxa2xx-pcm.o
sound/soc/pxa/pxa2xx-pcm.c: In function 'pxa2xx_soc_pcm_new':
sound/soc/pxa/pxa2xx-pcm.c:91: warning: unused variable 'dai'

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-07-07 09:54:09 -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
Sascha Hauer 6584cb8825 ARM i.MX dma: Fix burstsize settings
dmaengine expects the maxburst parameter in words, not bytes.
The imxdma driver and its users do this wrong. Fix this.

As a side note the imx-pcm-dma-mx2 driver was 'fixed' to work
with imx-dma. This broke the driver with imx-sdma support which
correctly takes the maxburst parameter in words. This patch
puts the sdma based sound back to work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-07 09:55:50 +02:00
Stephen Warren 774fec338b ASoC: Tegra: Implement SPDIF CPU DAI
This is a minimal driver for the Tegra SPDIF controller.

In hardware, the SPDIF output signal is always routed to any active HDMI
display controllers, and may also be routed to external pins on Tegra
using the pinmux.

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-07-05 12:20:56 -07:00
Liam Girdwood a82ce2ae0d ASoC: core - Add platform IO tracing
Trace platform IO just like CODEC IO.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-05 11:08:10 -07:00
Liam Girdwood cb2cf612fb ASoC: core - Add convenience register for platform kcontrol and DAPM
Allow platform probe to register platform kcontrols and DAPM just like
the CODEC probe().

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-05 11:07:41 -07:00
Liam Girdwood b795064137 ASoC: core - Add platform widget IO
Allow platform driver widgets to perform any IO required for DAPM.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-05 11:07:39 -07:00
Liam Girdwood a491a5c84f ASoC: core - Add API call to register platform kcontrols.
In preparation for Dynamic PCM (AKA DSP) support.

Allow platform drivers to register kcontrols.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-05 11:07:34 -07:00
Mark Brown 8a27bd9a33 ASoC: Manage WM8731 ACTIVE bit as a supply widget
Now we have supply widgets there's no need to open code the handling of
the ACTIVE bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-05 11:07:33 -07:00
Mark Brown 4c7c5374ce ASoC: Manage WM8731 ACTIVE bit as a supply widget
Now we have supply widgets there's no need to open code the handling of
the ACTIVE bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-05 11:00:21 -07:00
Takashi Iwai 873bd4cb4f ASoC: Don't set invalid name string to snd_card->driver field
The snd_card->driver field contains a driver name string, and in
general it shouldn't contain space or special letters.  The commit
2b39535b9e changed the string copy from
card->name, but the long name string may contain such letters, thus
it may still lead to a segfault.

A temporary fix is not to copy the long name string but just keep it
empty as the earlier version did.

Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-05 14:39:27 +02:00
Takashi Iwai f187700c2d Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2011-07-05 08:20:19 +02:00
Takashi Iwai 8d9afa08fe Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-07-05 08:20:00 +02:00
Takashi Iwai 56aa533910 Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-07-05 07:33:23 +02:00
Takashi Iwai 63bc975016 Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc 2011-07-05 07:33:06 +02:00
Liam Girdwood f1442bc1e9 ASoC: core - Add platform read and write.
In preparation for ASoC Dynamic PCM (AKA DSP) support.

Allow platform driver to perform IO. Intended for platform DAPM.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 12:41:07 -07:00
Jarkko Nikula 404b566569 ASoC: tlv320aic3x: Add correct hw registers to Line1 cross connect muxes
Commit af46800 ("ASoC: Implement mux control sharing") revealed that
"Left Line1[L | R] Mux" and "Right Line1[L | R] Mux" widgets were pointing
to the same kcontrols and codec registers and thus soc-core falsely detected
them as shared controls. This is actually wrong since there are separate
registers in hardware that configure Line1L to RADC and Line1R to LADC cross
connects so these muxes should not be shared.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-04 19:54:38 +01:00
Axel Castaneda Gonzalez 1fbe99529d ASoC: twl6040: Configure ramp step based on platform
Enable ramp down/up step to be configured based on
platform.

Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:36:29 +03:00
Liam Girdwood f7026c9996 ASoC: twl6040: set default constraints.
Set default sysclk constraints to high performance mode.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:36:28 +03:00
Misael Lopez Cruz 6bba63b68d ASoC: twl6040: Remove pll and headset mode dependency
Remove dependency between pll (hppll, lppll) and headset power
mode (low-power, high-performance), as headset power mode can
be used with any pll.

A new control is created to allow headset power mode configuration
from userspace. Changing headset power mode during earpiece related
usecases is not propagated down to the codec as earpiece requires
HS DAC in HP mode.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:36:27 +03:00
Liam Girdwood e17e4ab801 ASoC: twl6040: Support other sample rates in constraints.
Add other supported sample rates to LP and HP modes.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:36:26 +03:00
Liam Girdwood 6510bdc3f4 ASoC: twl6040: add all ABE DAIs
Add all DAIs to fully support OMAP4 ABE.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:36:25 +03:00
Misael Lopez Cruz fb34d3d505 ASoC: twl6040: Convert into TWL6040 MFD child
Convert TWL6040 CODEC driver into a TWL6040 MFD child, it implies
that MFD-level operations like register accesses, clock setting
and power management are done through MFD APIs, not directly by
CODEC driver anymore. To avoid conflicts with the other MFD child,
vibrator registers are skipped in CODEC driver.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:35:06 +03:00
Mark Brown 469bb638dc Merge branch 'for-3.0' into for-3.1 2011-07-04 08:54:40 -07:00
Mark Brown 8e9ddf811b ASoC: Ensure we delay long enough for WM8994 FLL to lock when starting
This delay is very conservative.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-07-04 08:51:44 -07:00
Stephen Warren b5f9cfed12 ASoC: Tegra: I2S: s/clk_get_sys/clk_get/
The clock needed by the I2S driver is associated with the I2S device name
in the standard fashion. Hence, use clk_get(dev) instead of clk_get_sys(clk_name).

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-07-04 08:49:24 -07:00
Stephen Warren 713d136978 ASoC: Tegra: I2S: Ensure clock is enabled when writing regs
The I2S controller needs a clock to respond to register writes. Without
this, register writes will at worst hang the CPU. In practice, I've only
observed writes being dropped.

Luckily, the dropped register writes historically had no effect:

TEGRA_I2S_TIMING: The value we wrote was the reset default.

TEGRA_I2S_FIFO_SCR: The default was for the FIFOs to request more data
when one slot was empty. The requested value was for the FIFOs to request
when four slots were empty. The DMA controller in the mainline kernel is
configured to burst a single entry at a time into the FIFO, hence there
was no issue. The only negative effect was on bus efficiency losses due
to an increased number of arbitration attempts.

However, in various non-upstream changes, the DMA controller now bursts
four entries at a time into the FIFO. If there is only space for one
entry, the data is simply dropped. In practice, this resulted in 3/4 of
samples being dropped, and playback at 4x the expected rate and pitch.
By fixing the clocking issue, this is solved.

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-07-04 08:49:05 -07:00
Peter Ujfalusi 4ae6df5e10 MFD: twl4030-audio: Rename platform data
Allign the platform data names for twl4030 audio submodule:
twl4030_audio_data: for the core MFD driver
twl4030_codec_data: for ASoC codec driver
twl4030_vibra_data: for the input/ForceFeedback driver

To avoid breakage, change all depending drivers, files
to use the new types.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04 18:44:02 +03:00
Peter Ujfalusi 57fe7251f5 MFD: twl4030-codec -> twl4030-audio: Rename the driver
Rename the driver, and header file from twl4030-codec to
twl4030-audio.
To avoid breakage change depending drivers at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04 18:43:56 +03:00
Liam Girdwood 956245e9cd ASoC: core - Make platform probe more like codec probe.
In preparation for ASoC dynamic PCM support (AKA ASoC DSP)

Platform will also support DAPM so separate out the probe function
to simplify the code (just like the codec probe).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-02 11:50:16 -07:00
Mark Brown 67d0c479d9 ASoC: Improve error reporting in Speyside WM8962 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-30 13:17:49 -07:00
Mark Brown 57cc2432e1 Merge branch 'for-3.0' into for-3.1 2011-06-29 09:49:04 -07:00
Mark Brown 4e8e78e37c ASoC: Change WM9081 speaker output enable to _OUT_DRV
More for neatness than any actual performance improvement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-29 09:48:55 -07:00
Mark Brown d5b040c92d ASoC: Correct left/right swap in wm_hubs DC offset correction
It was consistently wrong for everything except WM8993 so should be no
functional change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.comm>
2011-06-29 09:48:36 -07:00
Mark Brown e999dc5040 ASoC: Fix Blackfin I2S _pointer() implementation return in bounds values
The Blackfin DMA controller can report one frame beyond the end of the
buffer in the wraparound case but ALSA requires that the pointer always
be in the buffer. Do the wraparound to handle this. A similar bug is
likely to apply to the other Blackfin PCM drivers but the code is less
obvious to inspection and I don't have a user to test.

Reported-by: Kieran O'Leary <Kieran.O'Leary@wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-29 09:47:53 -07:00
Lars-Peter Clausen aef05294df ASoC: Blackfin: Add machine driver for EVAL-ADAV80X boards
Add a machine driver to support the EVAL-ADAV801 and EVAL-ADAV803 boards
connected to a Analog Devices BF5XX evaluation board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-28 17:12:44 +01:00
Lars-Peter Clausen cc52688a08 ASoC: Add ADAV80x codec driver
This patch adds support for the Analog Devices ADAV801 and ADAV803 audio codec.

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-06-28 17:11:20 +01:00
Sangbeom Kim 766705eef5 ASoC: SAMSUNG: Add idma related register definition
This patch add idma related register definitions to support idma.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-26 12:05:23 +01:00
Sangbeom Kim 172a453dcf ASoC: SAMSUNG: Move I2S common register definition
I2S registers can be used for control idma.
Previously, register is defined in i2s.c.
For sharing the registers, It is moved to i2s-regs.h

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-26 12:05:17 +01:00
Sangbeom Kim d2ec3ababa ASoC: SAMSUNG: Add WM8994 PCM Machine driver
This patch add WM8994 PCM machine driver to support PCM audio
on SMDKV310, SMDKC210 boards.
Playback and Capture supports 8kHz sampling rates.
and It is tested on SMDKV310, SMDKC210.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-26 12:05:12 +01:00
Takashi Iwai e093811857 Merge branch 'fix/asoc' into for-linus 2011-06-24 12:36:25 +02:00
Jesper Juhl 16866741bd ALSA: Remove unneeded version.h includes from sound/
In the sound/ directory there are two files (flagged by 'make
versioncheck'); sound/pci/asihpi/asihpi.c and
sound/soc/codecs/wm8991.c that include linux/version.h although they
don't need it. This patch removes the unneeded includes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-24 11:28:17 +02:00
Joe Perches dbc6221be7 treewide: Fix recieve/receive typos
Just spelling fixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-24 11:18:57 +02:00
Mark Brown 1ae4e9b996 Merge branch 'for-3.0' into for-3.1 2011-06-23 20:10:28 +01:00
Daniel Mack 53dea36c70 ASoC: pxa-ssp: Correct check for stream presence
Don't rely on the codec's channels_min information to decide wheter or
not allocate a substream's DMA buffer. Rather check if the substream
itself was allocated previously.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-23 20:09:56 +01:00
Arnaud Patard (Rtp) 96dcabb99b ASoC: imx: add missing module informations
- add some modules aliases
- add module license to avoid tainted kernel when loading the imx-pcm-audio
  driver

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-23 20:08:50 +01:00
Arnaud Patard (Rtp) f6d96e0da1 ASoC: imx: Remove unused Kconfig SND_MXC_SOC_SSI entry
SND_MXC_SOC_SSI looks to be unused, so kill it.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-23 20:08:30 +01:00
Mark Brown df1553c8de ASoC: Add basic WM8918 support
The WM8918 is register compatible with the WM8904 with a subset of the
functionality. Add the device ID, a subsequent patch will ensure that only
the relevant functionality is exported to userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-23 20:05:38 +01:00
Mark Brown 780b75b4a0 ASoC: Allow suppression of series updates on wm_hubs devices
Some devices do not support manual updates of the DC servo.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-23 20:05:31 +01:00
Mark Brown f9acf9fe5b ASoC: Trigger wm_hubs series update startup off a separate flag
Allowing the two to be used independently.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-23 20:05:23 +01:00
Johannes Stezenbach ec3ea54c6c ASoC: add WM8782 ADC Codec Driver
Signed-off-by: Johannes Stezenbach <js@sig21.net>
[zonque@gmail.com: transform to new ASoC structure]
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-22 19:11:02 +01:00
Johannes Stezenbach c034abf6e5 ASoC: add STA32X codec driver
Signed-off-by: Johannes Stezenbach <js@sig21.net>
[zonque@gmail.com: transform to new ASoC structure]
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-22 19:10:59 +01:00
Taylor Hutt bab3b59d53 ASoC: codecs: Max98095: Fix logging of hardware revision.
The base hardware revision of the Maxim 98095 part is 0x40; the code
which outputs the revision of the hardware has been updated to
properly use uppercase alphabetic values for the revision numbers.

Also, the use of a constant for the length 'max98095_dai' has been
replaced with ARRAY_SIZE().

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Acked-by: Peter Hsiang <peter.hsiang@maxim-ic.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-22 00:27:39 +01:00
Dan Carpenter c20974090e ASoC: adau1701: signedness bug in adau1701_write()
"ret" is supposed to be signed here.  The current code will only
return -EIO on error, instead of a more appropriate error code such
as -EAGAIN etc.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-20 18:46:33 +01:00
Mark Brown 29376bc7e2 ASoC: Fix DAPM sequence run for per-widget I/O methods
Previously we were using the DAPM context rather than a widget as the
argument for update_bits() so we didn't need to care that our list walk
of widgets left us one beyond the end of the list. Now we're using them
for the register update we need to make sure we're pointing at an actual
widget not the list_head.

Fix originally suggested by Liam on IM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-20 11:27:10 +01:00
Mark Brown ee8c7e9744 ASoC: Remove adau1701 from SND_SOC_ALL_CODECS due to Sigma dependency
The Sigma code is in drivers/firmware which is only included on a very
small subset of architectures and so ends up breaking the build on
others.  There's a pending patch to make the directory build as standard
but it's not merged yet.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-18 15:31:38 +01:00
Grant Likely f8db4cc4f2 Merge branch 'spi/merge' into spi/next 2011-06-17 08:32:26 -06:00
Mike Frysinger 4d1e46b7ef ASoC: Blackfin: allow SPI for SSM2602 parts
This board has hardware switches for selecting SPI or I2C, so don't
require I2C for this driver.

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>
2011-06-17 10:40:16 +01:00
Barry Song 5d0e7f6170 ASoC: AD1836: rename suspend/resume funcs
Use less specific names for suspend/resume to match the probe/remove funcs
where these are now used.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16 11:42:10 +01:00
Mike Frysinger 0679059a41 ASoC: AD1836: fix codec name
The codec name should not have a "-codec" suffix since this is not part of
a MFD.  This was incorrectly changed during the multi-component updated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16 11:42:01 +01:00
Mike Frysinger d4d80f5e46 ASoC: AD1836: fix intermixed tab/space indentation
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16 11:41:53 +01:00
Mike Frysinger 15e8705129 ASoC: AD1836: drop unnecessary spi register check
The only thing the init func does is register a spi driver, so if that
fails, we return the value back up to the caller who will display an
error message for us.  So drop the redundant checking/message.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16 11:41:46 +01:00
Mike Frysinger 42f32c5591 ASoC: AD1836: clean up comment headers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16 11:41:38 +01:00
Lars-Peter Clausen 53a93d58fb ASoC: Blackfin: Add bf5xx-adau1701 machine driver
Add a machine driver to support the ADAU1701 SigmaDSP processors on
Analog Devices BF5XX evaluation boards.

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-06-16 11:24:25 +01:00
Lars-Peter Clausen 631ed8a213 ASoC: Add ADAU1701 codec driver
This patch adds support for the Analog Devices ADAU1701 SigmaDSP.

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-06-16 11:24:17 +01:00
Mark Brown b83e60c000 ASoC: Clean up some coding style nits in the bf5xx-i2s-pcm driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-16 11:24:16 +01:00
Ryan Mallon 1c5454eed8 Change Ryan Mallon's email address across the kernel
I no longer work at Bluewater Systems. Update my email address accordingly. I
have deleted my email address from C files rather than change it. This
was suggested by several people, since the commit from my new email
address will cause scripts/get_maintainer.pl to function properly. I
have not added the .mailmap entry as suggested by Joe because I think
it is no longer necessary if I touch all the files which had my name
in them.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Cc: Andre Renaud <andre@bluewatersys.com>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Joe Perches <joe@perches.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: trivial@kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-16 11:22:05 +02:00
Liam Girdwood 0445bdf4ae ASoC: dapm - Refactor widget IO functions in preparation for platform widgets.
This time with soc_widget_update_bits reflecting recent soc_update_bits changes.

Currently widget IO is tightly coupled to the CODEC drivers. Future platform DSP
devices have mixer components that can alter power usage and hence require full
DAPM support.

This provides a generic widget IO operation wrapper in preparation for
future patches that implement platform driver DAPM.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-14 14:25:32 +01:00
Jiri Kosina 323c9dd26b trivial: don't touch fsi_ssl.c with ioremap fixes
This is a partial revert of 28f65c11f2 ("treewide: Convert uses of
struct resource to resource_size(ptr)") as the code is rewritten
in the sound tree and thus the change is obsolete.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-14 10:40:40 +02:00
Mark Brown 65fdd5c05a Merge branch 'for-3.0' into for-3.1
Trival fixup for move of I/O code into separate file.

Conflicts:
	sound/soc/soc-cache.c
2011-06-13 19:21:09 +01:00
Mark Brown e9c039052b ASoC: Remove unused and about to be broken SND_SOC_CUSTOM I/O bus
This will be removed in -next so let's drop it from mainline as soon as
we can in order to minimise surprises.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-13 19:17:55 +01:00
Mark Brown 2231571214 ASoC: Don't use codec->control_data in bulk write
In order to facilitate merging with the register map I/O replace the use
of control_data for the bulk writes with direct lookup of the client data
from the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13 19:17:33 +01:00
Mark Brown bf3a9e137c ASoC: Add weak routes for sidetone style paths
Normally DAPM will power up any connected audio path. This is not ideal
for sidetone paths as with sidetone paths the audio path is not wanted in
itself, it is only desired if the two paths it provides a sidetone between
are both active. If the sidetone path causes a power up then it can be
hard to minimise pops as we first power up either the sidetone or the main
output path and then power the other, with the second power up potentially
introducing a DC offset.

Address this by introducing the concept of a weak path. If a path is marked
as weak then DAPM will ignore that path when walking the graph, though all
the relevant controls are still available to the application layer to allow
these paths to be configured.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13 18:59:33 +01:00
Mark Brown 5bef44f9b4 ASoC: Move register I/O code into a separate file
For clarity and to help ongoing refactoring in this area create a new file
to contain the physical I/O functions, separating them out from the cache
operations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13 18:56:10 +01:00
Mark Brown f0c4205b54 ASoC: Factor out redundant read() functions
We've got a whole bunch of functions which just call straight through to
do_hw_read(). Simplify this situation by removing them and using hw_read()
directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-13 14:22:57 +01:00
Takashi Iwai 05e205429d Merge branch 'fix/asoc' into for-linus 2011-06-10 17:49:34 +02:00
Joe Perches 28f65c11f2 treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.

Done via coccinelle scripts like:

@@
struct resource *ptr;
@@

- ptr->end - ptr->start + 1
+ resource_size(ptr)

and some grep and typing.

Mostly uncompiled, no cross-compilers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-10 14:55:36 +02:00
Naveen Krishna Chatradhi f192c0ab24 ASoC: SMDKV310: Enable SPDIF device
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-10 11:05:09 +01:00
Mark Brown 0f28f8e567 Merge branch 'for-3.0' into for-3.1 2011-06-10 11:03:54 +01:00
Uwe Kleine-König 2f2b3cf1dd sound/atmel_ssc_dai: add a missing space to an error message
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-10 10:55:20 +01:00
Sangbeom Kim 33195500ed ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
If DMA active status should be checked, I2SCON register should be referenced.
In this patch, Fix the incorrect referencing of I2SCON register.

Reported-by : Lakkyung Jung <lakkyung.jung@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-06-10 10:54:46 +01:00
Liam Girdwood 91d5e6b4f5 ASoC: pcm - rename snd_codec_close() to snd_pcm_close().
Make sure we follow naming convention for all PCM ops.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 19:29:35 +01:00
Liam Girdwood b8c0dab9bf ASoC: core - PCM mutex per rtd
In preparation for the new ASoC Dynamic PCM support (AKA DSP support).

The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
at runtime between the PCM device end (or Frontend - FE) and the physical DAI
(Backend - BE) using regular kcontrols (just like a hardware CODEC routes
audio in the analog domain). The Dynamic PCM core therefore must be
able to call PCM operations for both the Frontend and Backend(s) DAIs at
the same time.

Currently we have a global pcm_mutex that is used to serialise
the ASoC PCM operations. This patch removes the global mutex
and adds a mutex per RTD allowing the PCM operations to be reentrant and
allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
could configure multiple backend DAI hw_params() with similar or different
hw parameters at the same time.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 19:29:29 +01:00
Mark Brown 2c36c2ce00 Merge branch 'for-3.0' into for-3.1 2011-06-09 15:07:42 +01:00
Liam Girdwood ddee627cf6 ASoC: core - Separate out PCM operations into new file.
In preparation for Dynamic PCM support (AKA DSP support).

There will be future patches that add support to allow PCMs to be dynamically
routed to multiple DAIs at startup and also during stream runtime. This patch
moves the ASoC core PCM operaitions into a new file called soc-pcm.c.  This will
in simplify the ASoC core features into distinct files.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 15:07:27 +01:00
Lars-Peter Clausen 4b80b8c2ee ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
Currently it is possible that snd_soc_new_{mixer,mux,pga} is called with a
DAPM context not matching the widgets context. This can lead to a wrong
prefix_len calculation, which will result in undefined behaviour. To avoid
this always use the DAPM context from the widget itself.

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>
Cc: stable@kernel.org
2011-06-09 15:06:54 +01:00
Mark Brown bf564ea997 Merge branch 'for-3.0' into for-3.1 2011-06-09 12:02:26 +01:00
Timur Tabi 147dfe90f7 ASoC: p1022ds: fix incorrect referencing of device tree properties
Device tree integer properties are encoded in big-endian format, but some of
the Freescale ASoC drivers were assuming that the host is in big-endian format
as well.  Although this is true, it's better to use endian-safe accessors.

Also add a check for a failed ioremap() call in the SSI driver.

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-06-09 12:02:08 +01:00
Timur Tabi 0cd114fff9 ASoC: fsl: fix initialization of DMA buffers
The DMA (PCM) driver used by some Freescale PowerPC supports separate DAIs
for playback and capture, so DMA buffers should be allocated only for the
initialized streams.  Instead of checking for the number of active channels,
which apparently is not reliable, check to see if the actual stream object
exists.

Also provide a better name for the DMA interrupt.

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-06-09 11:53:11 +01:00
Mark Brown 3115ae1746 ASoC: WM8804 does not support sample rates below 32kHz
Reported-by: Kieran O'Leary <Kieran.O'Leary@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-06-09 11:51:07 +01:00
Mika Westerberg 51e2cc0c51 ASoC: ep93xx: convert to use the DMA engine API
Now that we have the EP93xx DMA engine driver in place, we convert the ASoC
drivers (I2S, AC97 and PCM) to take advantage of this new API. There are no
functional changes.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-08 15:45:59 -06:00
Ricardo Neri 2763f45d40 ASoC: twl6040 - According to TWL6040 specification, gain start at 6dB and not -6dB.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-06-08 19:52:17 +01:00
Mark Brown 995e54f5fe ASoC: Fix mismerge of Speyside set_bias_level_post()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 17:51:38 +01:00
Mark Brown 47cb55a99b Merge branch 'for-3.0' into for-3.1 2011-06-08 15:25:07 +01:00
Mark Brown 22cb839bc8 ASoC: Support Speyside build variants with WM8962 fitted
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:49 +01:00
Mark Brown 417ceff939 ASoC: Defer all WM8962 clocking configuration until power up
Don't require an audio rate SYSCLK in hw_params() in order to better
support microphone detection use cases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-08 15:24:48 +01:00
Mark Brown 8f63aaa887 ASoC: Implement base 5 band EQ control for WM8962
ReTune Mobile modes are not currently supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:48 +01:00
Mark Brown 649a1a0ef2 ASoC: Report errors when we have a WM8962 IRQ and don't get FLL lock
We really should be getting the interrupt - if we don't get one it's very
likely that the configuration is incorrect and audio will fail. Also
increase the timeout substantially in this case for safety.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:47 +01:00
Mark Brown c7356da9e2 ASoC: Factor out I2C usage in WM8962 driver
The chip can actually support SPI so we shouldn't assume we've got an I2C
device even though that's the most common configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:46 +01:00
Mark Brown ffdaa48aed ASoC: Suppress restore of default register values for rbtree cache sync
Currently the rbtree code will write out the entire register map when
doing a cache sync which is wasteful and will slow things down. Check
to see if the value we're about to write is the default and don't bother
restoring it if it is, either the value will have been retained or the
device will have been reset and holds the value already.

We should really store the defaults in the nodes but this resolves the
immediate issue.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08 15:24:36 +01:00
Mark Brown 0f82bdf572 ASoC: Fix WM8962 headphone volume update for use of advanced caches
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-06-08 15:18:17 +01:00
Liam Girdwood 0168bf0d13 ASoC: core - Allow components to probe/remove in sequence.
Some ASoC components depend on other ASoC components to provide clocks and
power resources in order to probe() and vice versa for remove().

Allow components to be ordered so that components can be probed() and removed()
in sequences that conform to their dependencies.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Liam Girdwood 552d1ef6b5 ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.

Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Mark Brown cf3383fbb0 Merge branch 'for-3.0' into for-3.1 2011-06-07 09:49:47 +01:00
Lars-Peter Clausen 064d58ee3a ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
Fix the codec_name field of the dai_link to match the actual device name
of the codec. Otherwise the card won't be instantiated.

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>
Cc: stable@kernel.org
2011-06-07 09:49:28 +01:00
Lars-Peter Clausen 0c8e2917f2 ASoC: AD1836: Fix build error
Commit f97d0c6d5f ("ASoC: AD1836: Add input gain control for ADC2") contained
a typo in the register name, causing a build error. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 09:48:21 +01:00
Greg Dietsche bca6b39979 ASoC: wm8940: remove unnecessary if statements
removing unnecessary if(ret) checks

This updated patch corrects a minor spelling problem in the commit message
and resolves two other (similar) issues found in wm8940.c by Jonathan Cameron.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 09:47:40 +01:00
Mark Brown 46758dee72 Merge branch 'for-3.0' into for-3.1 2011-06-06 21:57:54 +01:00
Lars-Peter Clausen 8ca695f273 ASoC: AD1836: Fix setting the PCM format
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>
Cc: stable@kernel.org
2011-06-06 21:55:10 +01:00
Lars-Peter Clausen f97d0c6d5f ASoC: AD1836: Add input gain control for ADC2
The AD1836 has a PGA for its second ADC. This patch adds a control for
adjusting the the gain of the PGA.

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-06-06 21:54:43 +01:00
Lars-Peter Clausen 583eadab21 ASoC: AD1836: Remove unused fields from private struct
The control_type field is never used, so it can be removed.  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: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:43 +01:00
Lars-Peter Clausen 874ce77bc3 ASoC: AD1836: Add AD1835/AD1837/AD1838/AD1839 support
The AD183X codec devices are mostly register compatible and can easily be
supported by the same driver.  The main difference between those devices
is the number of DACs and ADCs.

This patch adjusts the driver to allocate the controls, DAPM widgets and
routes for the DACs and ADCs dynamically based on the chip type.

The AD1836 is a bit special in that it supports different modes for its second
ADC, so it needs some special handling. Right now the driver hardcodes the mode
to the differential PGA mode.

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-06-06 21:54:42 +01:00
Lars-Peter Clausen 2cf0342822 ASoC: AD1836: 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: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06 21:54:41 +01:00
Lars-Peter Clausen 90bc11d1d0 ASoC: AD1836: Add ADC/DAC controls helper macros
The different ADC and DAC controls follow the same scheme, so add some helper
macros for declaring them.
This should make the code a bit more readable and also decreases the code size
a bit.

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-06-06 21:54:41 +01:00
Mark Brown 85e9e76638 ASoC: Manage Speyside system clocking only in bias management
Now that the CODEC driver supports it defer configuration of the system
clock until bias management which is a much more idiomatic place to do
system power control and makes things a lot more happy when we're using
both interfaces.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:47:28 +01:00
Mark Brown cc4c670a41 ASoC: Only provide a default bias level update for CODEC contexts
This allows the card driver to use the bias level variable more easily in
multi component systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:47:05 +01:00
Mark Brown d4c6005f8e ASoC: Add context parameter to card DAPM callbacks
The card callback will get called for each DAPM context in the card so it
can be useful for it to know which device is currently undergoing a
transition.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:45 +01:00
Mark Brown 171ec6b089 ASoC: Simplify logic in snd_soc_dapm_set_bias_level()
No functional changes but much less indentation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:19 +01:00
Mark Brown 4113e44316 ASoC: Remove trace for DAPM bias level logging
It's redundant now thanks to the use of the generic trace infrastructure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:00 +01:00
Mark Brown 88d960864e ASoC: Indentation fix for null loop operation
More with the legibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown dfcc9047c9 ASoC: Don't bring the CODEC up to full power for supplies and biases
If the only widgets active within a CODEC are supplies and micbiases we
are not passing audio, we are probably just doing microphone detection.
This will not generally require either fully accurate reference voltages
or much power so

If this turns out to be unsuitable for some systems we can provide a
facility to override this decision.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown 56fba41f8f ASoC: Specify target bias state directly as a bias state
Rather than a simple flag to say if we want the DAPM context to be at full
power specify the target bias state. This should have no current effect
but is a bit more direct and so makes it easier to change our decisions
about the which bias state to go into in future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown 6dffdea700 ASoC: Allow WM8915 BCLK calculation outside hw_params()
Allow more dynamic management of the device clocking by allowing BCLK to
be calculated when we set SYSCLK. This means that if the system is idle
when hw_params() runs then we don't try to use the SYSCLK used in that case
to set up the BCLK dividers, we can instead wait until a later point such
as bias level configuration. This makes it easier to manage low power modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:45:44 +01:00
Mark Brown bd4f2acb8d Merge branch 'for-3.0' into for-3.1 2011-06-06 19:34:58 +01:00
Mark Brown fd137e2bba ASoC: Check for NULL register bank in snd_soc_get_cache_val()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 19:34:11 +01:00
Mark Brown 78bf3c9ab6 ASoC: Enforce the mask in snd_soc_update_bits()
Avoids issues if someone does a read followed by restore and doesn't mask
out only the bits being updated.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:48:42 +01:00
Mark Brown 51b3b5cabb ASoC: Error out when FLL lock interrupt is not delivered on WM8915
When the FLL locks on the WM8915 an interrupt is generated.  For safety
error out if we don't get that interrupt when the IRQ output of the
WM8915 is hooked up.  Since we *really* expect an interrupt but the
threaded IRQ handler may take a bit longer than expected to get
scheduled also dramatically increase the delay in this case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 12:47:57 +01:00