diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-28 10:41:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-28 10:41:37 -0400 |
commit | 1ab9ecc24819a8cf8ee982aaf6fb83298f094b0d (patch) | |
tree | 4c8f24eca6c1e56a030586003b53f124966b0b9d /sound | |
parent | 9f1b2556c57f1fd861313902311275e89f7d9fba (diff) | |
parent | 7d6898be8db92450ce7a0afcc4238680b9703e2b (diff) |
Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 1eb152cb1097..dfd997aaadfc 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -383,6 +383,8 @@ static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol, | |||
383 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 383 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
384 | int drc = wm8994_get_drc(kcontrol->id.name); | 384 | int drc = wm8994_get_drc(kcontrol->id.name); |
385 | 385 | ||
386 | if (drc < 0) | ||
387 | return drc; | ||
386 | ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc]; | 388 | ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc]; |
387 | 389 | ||
388 | return 0; | 390 | return 0; |
@@ -488,6 +490,9 @@ static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, | |||
488 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 490 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
489 | int block = wm8994_get_retune_mobile_block(kcontrol->id.name); | 491 | int block = wm8994_get_retune_mobile_block(kcontrol->id.name); |
490 | 492 | ||
493 | if (block < 0) | ||
494 | return block; | ||
495 | |||
491 | ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block]; | 496 | ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block]; |
492 | 497 | ||
493 | return 0; | 498 | return 0; |
@@ -1031,7 +1036,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
1031 | { | 1036 | { |
1032 | struct snd_soc_codec *codec = w->codec; | 1037 | struct snd_soc_codec *codec = w->codec; |
1033 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 1038 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
1034 | struct wm8994 *control = codec->control_data; | 1039 | struct wm8994 *control = wm8994->wm8994; |
1035 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; | 1040 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; |
1036 | int i; | 1041 | int i; |
1037 | int dac; | 1042 | int dac; |
@@ -3833,6 +3838,11 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3833 | dev_dbg(codec->dev, "Ignoring removed jack\n"); | 3838 | dev_dbg(codec->dev, "Ignoring removed jack\n"); |
3834 | return IRQ_HANDLED; | 3839 | return IRQ_HANDLED; |
3835 | } | 3840 | } |
3841 | } else if (!(reg & WM8958_MICD_STS)) { | ||
3842 | snd_soc_jack_report(wm8994->micdet[0].jack, 0, | ||
3843 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | | ||
3844 | wm8994->btn_mask); | ||
3845 | goto out; | ||
3836 | } | 3846 | } |
3837 | 3847 | ||
3838 | if (wm8994->mic_detecting) | 3848 | if (wm8994->mic_detecting) |