Lines Matching defs:stream
111 /* Used for comstraint setting on the second stream */
285 static void davinci_mcasp_start(struct davinci_mcasp *mcasp, int stream)
289 if (stream == SNDRV_PCM_STREAM_PLAYBACK)
302 * In synchronous mode stop the TX clocks if no other stream is
329 * In synchronous mode keep TX clocks running if the capture stream is
350 static void davinci_mcasp_stop(struct davinci_mcasp *mcasp, int stream)
354 if (stream == SNDRV_PCM_STREAM_PLAYBACK)
706 static int davinci_mcasp_ch_constraint(struct davinci_mcasp *mcasp, int stream,
709 struct snd_pcm_hw_constraint_list *cl = &mcasp->chconstr[stream];
714 if (mcasp->tdm_mask[stream])
715 slots = hweight32(mcasp->tdm_mask[stream]);
834 static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
837 struct snd_dmaengine_dai_dma_data *dma_data = &mcasp->dma_data[stream];
850 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
890 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
901 dev_warn(mcasp->dev, "stream has more channels (%d) than are "
953 mcasp->active_serializers[stream] = active_serializers;
958 static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,
973 * are channels in the stream.
975 if (mcasp->tdm_mask[stream]) {
976 active_slots = hweight32(mcasp->tdm_mask[stream]);
982 if ((1 << i) & mcasp->tdm_mask[stream]) {
1004 if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
1009 } else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
1171 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1245 ret = mcasp_common_hw_param(mcasp, substream->stream,
1253 ret = mcasp_i2s_hw_param(mcasp, substream->stream,
1280 davinci_mcasp_start(mcasp, substream->stream);
1285 davinci_mcasp_stop(mcasp, substream->stream);
1458 &mcasp->ruledata[substream->stream];
1463 /* Do not allow more then one stream per direction */
1464 if (mcasp->substreams[substream->stream])
1467 mcasp->substreams[substream->stream] = substream;
1469 if (mcasp->tdm_mask[substream->stream])
1470 tdm_slots = hweight32(mcasp->tdm_mask[substream->stream]);
1476 * Limit the maximum allowed channels for the first stream:
1479 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
1492 * If the already active stream has less channels than the calculated
1494 * is in use we need to use that as a constraint for the second stream.
1495 * Otherwise (first stream or less allowed channels or more than one
1514 &mcasp->chconstr[substream->stream]);
1519 * bus as the currently running stream
1574 mcasp->substreams[substream->stream] = NULL;
1575 mcasp->active_serializers[substream->stream] = 0;