Commit Graph

29 Commits

Author SHA1 Message Date
Mark Brown 8d50e447d1 ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-03 16:59:16 +01:00
Mark Brown d5fc3b5fe3 Merge branch 'for-2.6.31' into for-2.6.32 2009-06-25 13:58:37 +01:00
Mark Brown b3b50b3f31 ASoC: Add suspend and resume callbacks to Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 22:30:18 +01:00
Mark Brown 9e79261f30 ASoC: Automatically control WM8903 sloping stopband filter
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:23 +01:00
Mark Brown ba2533a478 ASoC: Remove odd bit clock ratios for WM8903
These are not supported since performance can not be guaranteed
when they are in use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-06-12 17:29:54 +01:00
Mark Brown 291ce18ceb ASoC: Implement WM8903 digital sidetone support
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:48 +01:00
Mark Brown 727fb909e5 ASoC: Remove redundant rate constraint for WM8903
This is now handled by symmetric_rates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:42 +01:00
Mark Brown d7d5c5476a ASoC: Actively manage the DC servo for WM8903
Save a little extra power by enabling the DC servo offset correction
for the output channels only when the relevant channels are enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:36 +01:00
Mark Brown 4dbfe80971 ASoC: Optimise configuration of WM8903 DC servo
Modify the default startup sequence in the chip to set the DC servo
dither level for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:30 +01:00
Mark Brown c2aef4ffd2 ASoC: Support CLK_DSP in WM8903
CLK_DSP provides a master clock for the DAC and ADC related functionality
on the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:24 +01:00
Mark Brown 42768a1282 ASoC: Use DAPM supply widget for WM8903 charge pump
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 21:37:02 +01:00
Mark Brown 0d960e8891 ASoC: Request shared rates for WM8903
It has a shared LRCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:11 +01:00
Eric Miao 6335d05548 ASoC: make ops a pointer in 'struct snd_soc_dai'
Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.

The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-04 22:29:47 +00:00
Mark Brown c6f2981170 ASoC: Add device init/exit annotations to new-style Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 21:26:58 +00:00
Mark Brown 6627a653bc ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC
platform device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:30:54 +00:00
Ian Molton 3e8e1952e3 ASoC: cleanup duplicated code.
Many codec drivers were implementing cookie-cutter copies of the function
that adds kcontrols to the codec.

This patch moves this code to a common function snd_soc_add_controls() in
soc-core.c and updates all drivers using copies of this function to use the
new common version.

[Edited to raise priority of error log message and document parameters.
 -- broonie]

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 10:39:49 +00:00
Mark Brown 3b1228abc9 ASoC: Stop WM8903 SYSCLK when suspending
This will save some additional power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 19:47:45 +00:00
Mark Brown d58d5d5567 ASoC: Convert WM8903 driver to register at I2C probe time
The driver now registers the codec and DAI when probed as an I2C device.
Also convert the driver to use a single dynamic allocation to simplify
error handling.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 19:47:44 +00:00
Mark Brown 1e297a1925 ASoC: Work around warnings from some build environments
BUG() should be marked as not returning but for at least some
configurations (including some widely deployed compilers) that's either
not happening or being forgotten by the compiler.  Add some extra return
statements to the affected paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 11:08:33 +00:00
Takashi Iwai c9b3a40ff2 ALSA: ASoC - Fix wrong section types
The module init entries should be __init instead of __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 07:47:22 +01:00
Mark Brown 64089b84ab ASoC: Register non-AC97 codec DAIs
Currently this is done at module probe time since ASoC ties in codec
device probe to the instantiation of the entire ASoC device. Subsequent
patches will refactor the codec drivers to handle probing separately.
Note that the core does not yet use this information.

AC97 is special since the codec is controlled over the AC97 link but
we want to give the machine driver a chance to set up the system before
trying to instantiate since it may need to do configuration before the
AC97 link will operate

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:29 +00:00
Mark Brown 4b4fffdd9d ASoC: Fix WM8903 right mixer bypass path
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 12:40:28 +00:00
Mark Brown 968a6025aa ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
Currently ASoC card initialisation is completed by a function called
snd_soc_register_card().  As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:50 +00:00
Takashi Iwai 0bc286e2ac Revert "ALSA: soc - Fix compile warnings in wm8903.c"
This reverts commit 9171e5e6a2.

I can't reproduce the compile warnings any more.  The warnings
might be some weird cross-compiling set up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:00:20 +01:00
Takashi Iwai 9171e5e6a2 ALSA: soc - Fix compile warnings in wm8903.c
Hide annoying uninitialized warnings:
  sound/soc/codecs/wm8903.c:382: warning: ‘reg’ may be used uninitialized in this function
  sound/soc/codecs/wm8903.c:383: warning: ‘shift’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:39:13 +01:00
Mark Brown dee89c4d94 ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.

This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:12:10 +00:00
Mark Brown 5715952b39 ALSA: ASoC: Fix inverted input PGA mute bits in WM8903
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:18:04 +02:00
Mark Brown acdfc9e305 ALSA: ASoC: WM8903 I2C cleanups
Fix a few issues identified by Jean Delvare:

 - Add missing newline to error display.
 - Return an error when we fail to locate the I2C adaptor.
 - Remove the static wm8903_i2c_device Jean suggested, it's redundant.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-29 10:06:09 +02:00
Mark Brown f1c0a02f32 ALSA: ASoC: Add WM8903 CODEC driver
The WM8903 is a high performance ultra-low power stereo CODEC optimised
for portable audio applications.  Features include:

    * 5mW power consumption for DAC to headphone playback
    * Stereo DAC SNR 96dB typical, THD -86dB typical
    * Stereo ADC SNR 93dB typical, THD -80dB typical
    * Up to 3 single ended inputs per stereo channel
    * Up to 2 pseudo differential inputs per stereo channel
    * Up to 1 fully differential mic input per stereo channel
    * Digital Dynamic Range Controller (compressor/limiter)
    * Digital sidetone mixing

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-29 10:05:47 +02:00