summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-09-03 12:28:41 +0800
committerNicolin Chen <b42378@freescale.com>2013-09-05 10:51:01 +0800
commit3f66fa6cfcb8a10619a13f044e770ef35a8cb1f3 (patch)
treefb228e2e2b6b7d807be68065f66ceeaee51d350b /sound
parentda1ee6d7463254d88449b91e4f102dc9c0ec6a3b (diff)
ENGR00277715-2 ASoC: fsl: Drop constraint in startup() of ssi driver
The constraint would disavow two simultaineous streams, eg: arecord | aplay. Since the hw_params() have the SSIEN checking, the stccr register would not be modified during a actual procedure of one stream, we can safely drop this one in startup(). Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_ssi.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 794964fd268d..731fc3f293c6 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -424,43 +424,6 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
* finished initializing the DMA controller.
*/
} else {
- if (synchronous) {
- struct snd_pcm_runtime *first_runtime =
- ssi_private->first_stream->runtime;
- /*
- * This is the second stream open, and we're in
- * synchronous mode, so we need to impose sample
- * sample size constraints. This is because STCCR is
- * used for playback and capture in synchronous mode,
- * so there's no way to specify different word
- * lengths.
- *
- * Note that this can cause a race condition if the
- * second stream is opened before the first stream is
- * fully initialized. We provide some protection by
- * checking to make sure the first stream is
- * initialized, but it's not perfect. ALSA sometimes
- * re-initializes the driver with a different sample
- * rate or size. If the second stream is opened
- * before the first stream has received its final
- * parameters, then the second stream may be
- * constrained to the wrong sample rate or size.
- */
- if (!first_runtime->sample_bits) {
- dev_err(substream->pcm->card->dev,
- "set sample size in %s stream first\n",
- substream->stream ==
- SNDRV_PCM_STREAM_PLAYBACK
- ? "capture" : "playback");
- return -EAGAIN;
- }
-
- snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
- first_runtime->sample_bits,
- first_runtime->sample_bits);
- }
-
ssi_private->second_stream = substream;
}