diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-09-03 12:28:41 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2013-10-30 09:55:27 +0800 |
commit | 90c9d9d337ae5d899d0303e8608c97a8c2fd808f (patch) | |
tree | 0014b79befd09a41feb512380db43708f5b8442c /sound | |
parent | f85a96590fd19086c188e78093fbf73f6e6b16a4 (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.c | 37 |
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; } |