Lines Matching refs:channels

19  *	- Support up to 4 channels
22 * When driver works in the capture mode with multiple channels, it duplicates the looped
23 * pattern to each separate channel. For example, if we have 2 channels, format = U8, interleaved
155 static inline size_t buf_pos_n(struct pcmtst_buf_iter *v_iter, unsigned int channels,
158 return v_iter->buf_pos / channels + v_iter->chan_block * chan_num;
166 static inline size_t ch_pos_i(size_t b_total, unsigned int channels, unsigned int b_sample)
168 return b_total / channels / b_sample * b_sample + (b_total % b_sample);
181 ch_num = (v_iter->total_bytes / v_iter->sample_bytes) % runtime->channels;
183 runtime->channels,
197 unsigned int channels = runtime->channels;
203 ch_num = i % channels;
204 current_byte = runtime->dma_area[buf_pos_n(v_iter, channels, ch_num)];
207 if (current_byte != patt_bufs[ch_num].buf[(v_iter->total_bytes / channels)
241 unsigned int channels = runtime->channels;
245 ch_num = i % channels;
246 runtime->dma_area[buf_pos_n(v_iter, channels, ch_num)] =
247 patt_bufs[ch_num].buf[(v_iter->total_bytes / channels)
260 pos_in_ch = ch_pos_i(v_iter->total_bytes, runtime->channels, v_iter->sample_bytes);
263 for (ch = 0; ch < runtime->channels; ch++) {
284 unsigned int channels = runtime->channels;
289 for (i = 0; i < channels; i++) {
291 //b_rw - count of bytes must be written for all channels at each timer tick
292 get_random_bytes(runtime->dma_area + buf_pos_n(v_iter, channels, i),
293 v_iter->b_rw / channels);
296 get_random_bytes(runtime->dma_area + buf_pos_n(v_iter, channels, i),
297 bytes_remain / channels);
299 (v_iter->b_rw - bytes_remain) / channels);
482 v_iter->chan_block = snd_pcm_lib_buffer_bytes(substream) / runtime->channels;
487 v_iter->b_rw = v_iter->s_rw_ch * v_iter->sample_bytes * runtime->channels;