aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-10-13 13:05:43 -0700
committerErik Gilling <konkers@android.com>2011-10-13 13:05:43 -0700
commita77bcf8c4218788e45132bc49db004c2545cae5b (patch)
treed81be4e4b415853d73c7c208fae24ba8ac13290f /sound
parent7ef83790f80e50f19209bb25cf2859331e4bcd7b (diff)
parent405b6316c4dd7585fa5f0114a3749525df41dd91 (diff)
downloadkernel_samsung_tuna-a77bcf8c4218788e45132bc49db004c2545cae5b.zip
kernel_samsung_tuna-a77bcf8c4218788e45132bc49db004c2545cae5b.tar.gz
kernel_samsung_tuna-a77bcf8c4218788e45132bc49db004c2545cae5b.tar.bz2
Merge branch 'linux-omap-3.0' into android-omap-3.0
Conflicts: drivers/mfd/twl6030-madc.c Change-Id: I90bdfede31b046c57527297123eefef2e4fab771
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/omap-hdmi-codec.c6
-rw-r--r--sound/soc/codecs/twl6040.c33
2 files changed, 25 insertions, 14 deletions
diff --git a/sound/soc/codecs/omap-hdmi-codec.c b/sound/soc/codecs/omap-hdmi-codec.c
index c735700..b30e6cd 100644
--- a/sound/soc/codecs/omap-hdmi-codec.c
+++ b/sound/soc/codecs/omap-hdmi-codec.c
@@ -250,8 +250,12 @@ int hdmi_audio_notifier_callback(struct notifier_block *nb,
if (hdmi_data.active)
hdmi_ti_4xxx_audio_enable(&hdmi_data.ip_data, 0);
hdmi_audio_set_configuration(&hdmi_data);
- if (hdmi_data.active)
+ if (hdmi_data.active) {
+ omap_hwmod_set_slave_idlemode(hdmi_data.oh,
+ HWMOD_IDLEMODE_NO);
hdmi_ti_4xxx_audio_enable(&hdmi_data.ip_data, 1);
+
+ }
}
return 0;
}
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 0ef82f2..0563466 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -813,13 +813,6 @@ static int twl6040_hs_dac_event(struct snd_soc_dapm_widget *w,
return 0;
}
-static int twl6040_micbias_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- msleep(150);
- return 0;
-}
-
static int twl6040_power_mode_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
@@ -1227,12 +1220,11 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
TWL6040_REG_MICRCTL, 1, 0, NULL, 0),
/* ADCs */
- SND_SOC_DAPM_ADC_E("ADC Left", "Left Front Capture",
- TWL6040_REG_MICLCTL, 2, 0, twl6040_micbias_event,
- SND_SOC_DAPM_POST_PMU),
- SND_SOC_DAPM_ADC_E("ADC Right", "Right Front Capture",
- TWL6040_REG_MICRCTL, 2, 0, twl6040_micbias_event,
- SND_SOC_DAPM_POST_PMU),
+ SND_SOC_DAPM_ADC("ADC Left", "Left Front Capture",
+ TWL6040_REG_MICLCTL, 2, 0),
+ SND_SOC_DAPM_ADC("ADC Right", "Right Front Capture",
+ TWL6040_REG_MICRCTL, 2, 0),
+
/* Microphone bias */
SND_SOC_DAPM_MICBIAS("Headset Mic Bias",
TWL6040_REG_AMICBCTL, 0, 0),
@@ -1527,6 +1519,21 @@ static int twl6040_prepare(struct snd_pcm_substream *substream,
priv->sysclk);
return -EPERM;
}
+
+ /*
+ * In the capture, the Analog path should be turn on and stabilized
+ * before McPDM prepare itself to avoid pop noises.
+ * So the codec startup event is sending through dapm in prepare itself
+ * to ensure that the codec analog path is up before McPDM Uplink FIFO
+ * is going to be activated.
+ */
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+ snd_soc_dapm_codec_stream_event(dai->codec,
+ dai->driver->capture.stream_name,
+ SND_SOC_DAPM_STREAM_START);
+ msleep(150);
+ }
+
return 0;
}