Lines Matching defs:substream
83 struct snd_pcm_substream *substream;
272 static int btcvsd_bytes_to_frame(struct snd_pcm_substream *substream,
276 struct snd_pcm_runtime *runtime = substream->runtime;
622 snd_pcm_period_elapsed(bt->rx->substream);
628 snd_pcm_period_elapsed(bt->tx->substream);
858 (struct mtk_btcvsd_snd *bt, struct snd_pcm_substream *substream)
860 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
879 struct snd_pcm_substream *substream)
884 dev_dbg(bt->dev, "%s(), stream %d, substream %p\n",
885 __func__, substream->stream, substream);
887 snd_soc_set_runtime_hwparams(substream, &mtk_btcvsd_hardware);
889 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
891 bt->tx->substream = substream;
894 bt->rx->substream = substream;
901 struct snd_pcm_substream *substream)
904 struct mtk_btcvsd_snd_stream *bt_stream = get_bt_stream(bt, substream);
906 dev_dbg(bt->dev, "%s(), stream %d\n", __func__, substream->stream);
909 bt_stream->substream = NULL;
914 struct snd_pcm_substream *substream,
919 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
927 substream->runtime->dma_bytes = params_buffer_bytes(hw_params);
932 struct snd_pcm_substream *substream)
936 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
943 struct snd_pcm_substream *substream)
946 struct mtk_btcvsd_snd_stream *bt_stream = get_bt_stream(bt, substream);
948 dev_dbg(bt->dev, "%s(), stream %d\n", __func__, substream->stream);
955 struct snd_pcm_substream *substream, int cmd)
958 struct mtk_btcvsd_snd_stream *bt_stream = get_bt_stream(bt, substream);
959 int stream = substream->stream;
963 __func__, substream->stream, cmd);
986 struct snd_pcm_substream *substream)
997 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
1006 hw_packet_ptr = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?
1022 frame = btcvsd_bytes_to_frame(substream, byte);
1024 frame %= substream->runtime->buffer_size;
1034 struct snd_pcm_substream *substream,
1040 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)