aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_ssi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r--sound/soc/fsl/fsl_ssi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 3711d8454d96..93f0f38a32c9 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -375,18 +375,14 @@ static int fsl_ssi_startup(struct snd_pcm_substream *substream,
375 struct snd_pcm_runtime *first_runtime = 375 struct snd_pcm_runtime *first_runtime =
376 ssi_private->first_stream->runtime; 376 ssi_private->first_stream->runtime;
377 377
378 if (!first_runtime->rate || !first_runtime->sample_bits) { 378 if (!first_runtime->sample_bits) {
379 dev_err(substream->pcm->card->dev, 379 dev_err(substream->pcm->card->dev,
380 "set sample rate and size in %s stream first\n", 380 "set sample size in %s stream first\n",
381 substream->stream == SNDRV_PCM_STREAM_PLAYBACK 381 substream->stream == SNDRV_PCM_STREAM_PLAYBACK
382 ? "capture" : "playback"); 382 ? "capture" : "playback");
383 return -EAGAIN; 383 return -EAGAIN;
384 } 384 }
385 385
386 snd_pcm_hw_constraint_minmax(substream->runtime,
387 SNDRV_PCM_HW_PARAM_RATE,
388 first_runtime->rate, first_runtime->rate);
389
390 /* If we're in synchronous mode, then we need to constrain 386 /* If we're in synchronous mode, then we need to constrain
391 * the sample size as well. We don't support independent sample 387 * the sample size as well. We don't support independent sample
392 * rates in asynchronous mode. 388 * rates in asynchronous mode.
@@ -674,7 +670,7 @@ struct snd_soc_dai *fsl_ssi_create_dai(struct fsl_ssi_info *ssi_info)
674 ssi_private->dev = ssi_info->dev; 670 ssi_private->dev = ssi_info->dev;
675 ssi_private->asynchronous = ssi_info->asynchronous; 671 ssi_private->asynchronous = ssi_info->asynchronous;
676 672
677 ssi_private->dev->driver_data = fsl_ssi_dai; 673 dev_set_drvdata(ssi_private->dev, fsl_ssi_dai);
678 674
679 /* Initialize the the device_attribute structure */ 675 /* Initialize the the device_attribute structure */
680 dev_attr->attr.name = "ssi-stats"; 676 dev_attr->attr.name = "ssi-stats";
@@ -693,6 +689,7 @@ struct snd_soc_dai *fsl_ssi_create_dai(struct fsl_ssi_info *ssi_info)
693 fsl_ssi_dai->name = ssi_private->name; 689 fsl_ssi_dai->name = ssi_private->name;
694 fsl_ssi_dai->id = ssi_info->id; 690 fsl_ssi_dai->id = ssi_info->id;
695 fsl_ssi_dai->dev = ssi_info->dev; 691 fsl_ssi_dai->dev = ssi_info->dev;
692 fsl_ssi_dai->symmetric_rates = 1;
696 693
697 ret = snd_soc_register_dai(fsl_ssi_dai); 694 ret = snd_soc_register_dai(fsl_ssi_dai);
698 if (ret != 0) { 695 if (ret != 0) {