aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-06 10:44:07 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-08 06:08:44 -0500
commitda18396f949ecaa45007d3aeb1b81bd6da092811 (patch)
treeb55566ec8ecc2ecd42a1caec23310e41b24ebfb9 /include/sound
parente38b9b7478d57701fbcbaafdde169aa1a88d0eca (diff)
ASoC: core: Allow digital mute for capture
Help avoid noise from the power up of the capture path propagating through into the start of the recording (especially noise caused by the ramp of microphone biases) by keeping the capture muted until after we've finished powering things up with DAPM in the same manner we do for playback. This allows us to take advantage of soft mute support in the hardware more effectively and is more consistent. The core code using the existing digital mute operation is updated to take advantage of this. Some additional cases in the soc-pcm code and suspend will need separate handling but these are less practically relevant than the main runtime stream start/stop case. Rather than refactor the digital mute function in every single driver a new operation is added for drivers taking advantage of this functionality, the old operation should be phased out over time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 3953cea0ecfb..a680f23a04fb 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -126,7 +126,8 @@ int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
126int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); 126int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
127 127
128/* Digital Audio Interface mute */ 128/* Digital Audio Interface mute */
129int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute); 129int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
130 int direction);
130 131
131struct snd_soc_dai_ops { 132struct snd_soc_dai_ops {
132 /* 133 /*
@@ -157,6 +158,7 @@ struct snd_soc_dai_ops {
157 * Called by soc-core to minimise any pops. 158 * Called by soc-core to minimise any pops.
158 */ 159 */
159 int (*digital_mute)(struct snd_soc_dai *dai, int mute); 160 int (*digital_mute)(struct snd_soc_dai *dai, int mute);
161 int (*mute_stream)(struct snd_soc_dai *dai, int mute, int stream);
160 162
161 /* 163 /*
162 * ALSA PCM audio operations - all optional. 164 * ALSA PCM audio operations - all optional.