Lines Matching refs:substream

132 			 struct snd_pcm_substream *substream)
134 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
138 snd_soc_set_runtime_hwparams(substream, &chv3_dma_hw);
140 res = snd_pcm_hw_constraint_pow2(substream->runtime, 0,
145 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
146 i2s->rx_substream = substream;
148 i2s->tx_substream = substream;
153 struct snd_pcm_substream *substream)
155 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
158 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
170 struct snd_pcm_substream *substream;
173 substream = rtd->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream;
174 if (substream) {
176 I2S_MAX_BUFFER_SIZE, &substream->dma_buffer);
181 substream = rtd->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
182 if (substream) {
184 I2S_MAX_BUFFER_SIZE, &substream->dma_buffer);
193 struct snd_pcm_substream *substream,
196 snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
201 struct snd_pcm_substream *substream)
203 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
207 buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
208 period_bytes = snd_pcm_lib_period_bytes(substream);
209 period_size = substream->runtime->period_size;
211 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) {
213 chv3_i2s_wr(i2s, I2S_RX_BASE_ADDR, substream->dma_buffer.addr);
219 chv3_i2s_wr(i2s, I2S_TX_BASE_ADDR, substream->dma_buffer.addr);
230 struct snd_pcm_substream *substream)
232 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
237 frame_bytes = substream->runtime->frame_bits * 8;
238 buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
240 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) {
248 return bytes_to_frames(substream->runtime, idx_bytes);
252 struct snd_pcm_substream *substream)
254 struct snd_pcm_runtime *runtime = substream->runtime;
255 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
260 idx = bytes & (snd_pcm_lib_buffer_bytes(substream) - 1);
262 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)