Lines Matching refs:substream

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