sound (ASoC) fixes
Subsystems (3)
Linus,
please pull sound (ASoC) fixes for v2.6.38-rc7 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git fix/asoc
These commits should have been included in the previous pull requests, but slipped just mistakenly. The changes aren't so small for the late rc, but they are mostly hw specific and have been long enough in the tree.
Thanks!
Takashi
===
Dimitris Papastamos (2):
ASoC: WM8994: Improve robustness in some use cases
ASoC: WM8994: Improve playback robustness
Janusz Krzysztofik (1):
ASoC: CX20442: fix wrong reg_cache_default content
Mark Brown (2):
ASoC: Sync initial widget state with hardware
ASoC: Ensure supplies are maintained for force enabled widgets
Stephen Warren (2):
ASoC: WM8903: Fix mic detection register definitions
ASoC: WM8903: Fix mic detection enable logic
--- include/sound/wm8903.h | 10 +-- sound/soc/codecs/cx20442.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8994.c | 197 ++++++++++++++++++++++++++++++++++++++++--- sound/soc/soc-dapm.c | 23 +++++- 5 files changed, 210 insertions(+), 24 deletions(-)
include/sound/wm8903.h +3 -7
@@ -17,13 +17,9 @@/* * R6 (0x06) - Mic Bias Control 0 */ -#define WM8903_MICDET_HYST_ENA 0x0080/* MICDET_HYST_ENA */ -#define WM8903_MICDET_HYST_ENA_MASK 0x0080/* MICDET_HYST_ENA */ -#define WM8903_MICDET_HYST_ENA_SHIFT 7/* MICDET_HYST_ENA */ -#define WM8903_MICDET_HYST_ENA_WIDTH 1/* MICDET_HYST_ENA */ -#define WM8903_MICDET_THR_MASK 0x0070/* MICDET_THR - [6:4] */ -#define WM8903_MICDET_THR_SHIFT 4/* MICDET_THR - [6:4] */ -#define WM8903_MICDET_THR_WIDTH 3/* MICDET_THR - [6:4] */ +#define WM8903_MICDET_THR_MASK 0x0030/* MICDET_THR - [5:4] */ +#define WM8903_MICDET_THR_SHIFT 4/* MICDET_THR - [5:4] */ +#define WM8903_MICDET_THR_WIDTH 2/* MICDET_THR - [5:4] */ #define WM8903_MICSHORT_THR_MASK 0x000C/* MICSHORT_THR - [3:2] */ #define WM8903_MICSHORT_THR_SHIFT 2/* MICSHORT_THR - [3:2] */ #define WM8903_MICSHORT_THR_WIDTH 2/* MICSHORT_THR - [3:2] */
sound/soc/codecs/cx20442.c +1 -1
@@ -367,7 +367,7 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)return 0 ; } -static const u8 cx20442_reg =CX20442_TELOUT |CX20442_MIC ; +static const u8 cx20442_reg;static struct snd_soc_codec_driver cx20442_codec_dev = { .probe = cx20442_codec_probe,
sound/soc/codecs/wm8903.c +1 -1
@@ -1482,7 +1482,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,WM8903_MICDET_EINT |WM8903_MICSHRT_EINT , irq_mask); -if (det && shrt) { +if (det || shrt) {/* Enable mic detection, this may not have been set through * platform data (eg, if the defaults are OK). */ snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,
sound/soc/codecs/wm8994.c +183 -14
277 lines not on this page · raw message
sound/soc/soc-dapm.c +22 -1
@@ -712,7 +712,15 @@ static int dapm_supply_check_power(struct snd_soc_dapm_widget *w) !path->connected(path->source, path->sink))continue ; -if (path->sink && path->sink->power_check && +if (!path->sink) +continue ; + +if (path->sink->force) { + power =1 ; +break ; + } + +if (path->sink->power_check && path->sink->power_check (path->sink)) { power =1 ;break ;
@@ -1627,6 +1635,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_add_routes);int snd_soc_dapm_new_widgets (struct snd_soc_dapm_context *dapm) {struct snd_soc_dapm_widget *w; +unsigned int val;list_for_each_entry (w, &dapm->card->widgets, list) {
@@ -1675,6 +1684,18 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)case snd_soc_dapm_post:break ; } + +/* Read the initial power state from the device */ +if (w->reg >=0 ) { + val =snd_soc_read (w->codec, w->reg); + val &=1 << w->shift; +if (w->invert) + val = !val; + +if (val) + w->power =1 ; + } + w->new =1 ; }