/sof-2.7.6/test/cmocka/src/audio/buffer/ |
D | buffer_write.c | 34 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 0); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 35 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 256); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 36 assert_ptr_equal(buf->stream.w_ptr, buf->stream.r_ptr); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 40 memcpy_s(buf->stream.w_ptr, test_buf_desc.size, &bytes, 10); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 43 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 10); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 44 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 246); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 45 assert_ptr_equal(buf->stream.w_ptr, (char *)buf->stream.r_ptr + 10); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 47 assert_int_equal(memcmp(buf->stream.r_ptr, &bytes, 10), 0); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 51 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 0); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() 52 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 256); in test_audio_buffer_write_10_bytes_out_of_256_and_read_back() [all …]
|
D | buffer_wrap.c | 33 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 0); in test_audio_buffer_write_fill_10_bytes_and_write_5() 34 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 10); in test_audio_buffer_write_fill_10_bytes_and_write_5() 35 assert_ptr_equal(buf->stream.w_ptr, buf->stream.r_ptr); in test_audio_buffer_write_fill_10_bytes_and_write_5() 43 ptr = audio_stream_write_frag(&buf->stream, i, sizeof(uint8_t)); in test_audio_buffer_write_fill_10_bytes_and_write_5() 48 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), sizeof(bytes)); in test_audio_buffer_write_fill_10_bytes_and_write_5() 49 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 0); in test_audio_buffer_write_fill_10_bytes_and_write_5() 50 assert_ptr_equal(buf->stream.w_ptr, buf->stream.r_ptr); in test_audio_buffer_write_fill_10_bytes_and_write_5() 55 ptr = audio_stream_write_frag(&buf->stream, i, sizeof(uint8_t)); in test_audio_buffer_write_fill_10_bytes_and_write_5() 63 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 10); in test_audio_buffer_write_fill_10_bytes_and_write_5() 64 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 0); in test_audio_buffer_write_fill_10_bytes_and_write_5() [all …]
|
D | buffer_copy.c | 40 audio_stream_can_copy_bytes(&src->stream, &snk->stream, 16); in test_audio_buffer_copy_underrun() 42 assert_int_equal(audio_stream_get_avail_bytes(&src->stream), 10); in test_audio_buffer_copy_underrun() 68 audio_stream_can_copy_bytes(&src->stream, &snk->stream, 16); in test_audio_buffer_copy_overrun() 70 assert_int_equal(audio_stream_get_avail_bytes(&src->stream), 16); in test_audio_buffer_copy_overrun() 71 assert_int_equal(audio_stream_get_free_bytes(&snk->stream), 10); in test_audio_buffer_copy_overrun() 95 copy_bytes = audio_stream_can_copy_bytes(&src->stream, &snk->stream, 0); in test_audio_buffer_copy_success() 97 assert_int_equal(audio_stream_get_avail_bytes(&src->stream), 10); in test_audio_buffer_copy_success() 122 copy_bytes = audio_stream_get_copy_bytes(&src->stream, &snk->stream); in test_audio_buffer_copy_fit_space_constraint() 124 assert_int_equal(audio_stream_get_avail_bytes(&src->stream), 16); in test_audio_buffer_copy_fit_space_constraint() 125 assert_int_equal(audio_stream_get_free_bytes(&snk->stream), 10); in test_audio_buffer_copy_fit_space_constraint() [all …]
|
D | buffer_new.c | 33 assert_int_equal(audio_stream_get_avail_bytes(&buf->stream), 0); in test_audio_buffer_new() 34 assert_int_equal(audio_stream_get_free_bytes(&buf->stream), 256); in test_audio_buffer_new() 35 assert_ptr_equal(buf->stream.w_ptr, buf->stream.r_ptr); in test_audio_buffer_new()
|
/sof-2.7.6/src/audio/ |
D | buffer.c | 56 buffer->stream.addr = rballoc_align(0, caps, size, align); in buffer_alloc() 57 if (!buffer->stream.addr) { in buffer_alloc() 77 bzero(buffer->stream.addr, buffer->stream.size); in buffer_zero() 79 dcache_writeback_region(buffer->stream.addr, in buffer_zero() 80 buffer->stream.size); in buffer_zero() 93 if (size == buffer->stream.size) in buffer_set_size() 96 new_ptr = rbrealloc(buffer->stream.addr, SOF_MEM_FLAG_NO_COPY, in buffer_set_size() 97 buffer->caps, size, buffer->stream.size); in buffer_set_size() 100 if (!new_ptr && size > buffer->stream.size) { in buffer_set_size() 102 buffer->stream.size, buffer->caps); in buffer_set_size() [all …]
|
D | google_hotword_detect.c | 178 if (sourceb->stream.channels != 1) { in ghd_params() 183 if (sourceb->stream.frame_fmt != SOF_IPC_FRAME_S16_LE) { in ghd_params() 188 if (sourceb->stream.rate != KPB_SAMPLNG_FREQUENCY) { in ghd_params() 332 struct audio_stream *stream, in ghd_detect() argument 349 sample_bytes = audio_stream_sample_bytes(stream); in ghd_detect() 385 struct audio_stream *stream; in ghd_copy() local 401 stream = &source->stream; in ghd_copy() 404 bytes = audio_stream_get_avail_bytes(&source->stream); in ghd_copy() 409 (uint32_t)stream->addr, in ghd_copy() 410 (uint32_t)stream->r_ptr, in ghd_copy() [all …]
|
/sof-2.7.6/test/cmocka/src/math/fft/ |
D | fft.c | 41 if (src->stream.channels != 1) in fft_real() 44 if (src->stream.size < size * sizeof(int32_t) || in fft_real() 45 dst->stream.size < size * sizeof(struct icomplex32)) in fft_real() 62 inb[i].real = *((int32_t *)src->stream.addr + i); in fft_real() 70 *((int32_t *)dst->stream.addr + 2 * i) = outb[i].real; in fft_real() 71 *((int32_t *)dst->stream.addr + 2 * i + 1) = outb[i].imag; in fft_real() 95 if (src->stream.channels != 1) in ifft_complex() 98 if (src->stream.size < size * sizeof(struct icomplex32) || in ifft_complex() 99 dst->stream.size < size * sizeof(struct icomplex32)) in ifft_complex() 117 inb[i].real = *((int32_t *)src->stream.addr + 2 * i); in ifft_complex() [all …]
|
/sof-2.7.6/src/include/sof/audio/ |
D | audio_stream.h | 237 audio_stream_get_avail_bytes(const struct audio_stream *stream) in audio_stream_get_avail_bytes() argument 245 if (stream->underrun_permitted) in audio_stream_get_avail_bytes() 246 return stream->avail != 0 ? stream->avail : stream->size; in audio_stream_get_avail_bytes() 248 return stream->avail; in audio_stream_get_avail_bytes() 257 audio_stream_get_avail_samples(const struct audio_stream *stream) in audio_stream_get_avail_samples() argument 259 return audio_stream_get_avail_bytes(stream) / in audio_stream_get_avail_samples() 260 audio_stream_sample_bytes(stream); in audio_stream_get_avail_samples() 269 audio_stream_get_avail_frames(const struct audio_stream *stream) in audio_stream_get_avail_frames() argument 271 return audio_stream_get_avail_bytes(stream) / in audio_stream_get_avail_frames() 272 audio_stream_frame_bytes(stream); in audio_stream_get_avail_frames() [all …]
|
D | buffer.h | 91 struct audio_stream stream; member 179 audio_stream_invalidate(&buffer->stream, bytes); in buffer_invalidate() 187 audio_stream_writeback(&buffer->stream, bytes); in buffer_writeback() 243 audio_stream_reset(&buffer->stream); in buffer_reset_pos() 257 audio_stream_init(&buffer->stream, buffer->stream.addr, size); in buffer_init()
|
/sof-2.7.6/test/cmocka/src/ |
D | util.h | 28 memset(buffer->stream.addr, 0, buffer_size); in create_test_sink() 37 buffer->stream.frame_fmt = frame_fmt; in create_test_sink() 38 buffer->stream.channels = channels; in create_test_sink() 63 memset(buffer->stream.addr, 0, buffer_size); in create_test_source() 72 buffer->stream.frame_fmt = frame_fmt; in create_test_source() 73 buffer->stream.channels = channels; in create_test_source()
|
/sof-2.7.6/src/audio/selector/ |
D | selector.c | 138 cd->config.out_channels_count : buffer->stream.channels; in selector_verify_params() 159 cd->config.in_channels_count : buffer->stream.channels; in selector_verify_params() 167 component_set_period_frames(dev, sinkb->stream.rate); in selector_verify_params() 391 if (!source->stream.avail) in selector_copy() 397 frames = audio_stream_avail_frames(&source->stream, &sink->stream); in selector_copy() 398 source_bytes = frames * audio_stream_frame_bytes(&source->stream); in selector_copy() 399 sink_bytes = frames * audio_stream_frame_bytes(&sink->stream); in selector_copy() 409 cd->sel_func(dev, &sink->stream, &source->stream, frames); in selector_copy() 447 cd->source_format = sourceb->stream.frame_fmt; in selector_prepare() 449 audio_stream_period_bytes(&sourceb->stream, dev->frames); in selector_prepare() [all …]
|
/sof-2.7.6/test/cmocka/src/audio/volume/ |
D | volume_process.c | 124 int16_t *src = (int16_t *)vol_state->source->stream.r_ptr; in fill_source_s16() 128 for (i = 0; i < vol_state->source->stream.size / sizeof(int16_t); i++) { in fill_source_s16() 140 const int16_t *src = (int16_t *)source->stream.r_ptr; in verify_s16_to_s16() 141 const int16_t *dst = (int16_t *)sink->stream.w_ptr; in verify_s16_to_s16() 143 int channels = sink->stream.channels; in verify_s16_to_s16() 149 for (i = 0; i < sink->stream.size / sizeof(uint16_t); i += channels) { in verify_s16_to_s16() 173 int32_t *src = (int32_t *)vol_state->source->stream.r_ptr; in fill_source_s24() 177 for (i = 0; i < vol_state->source->stream.size / sizeof(int32_t); i++) { in fill_source_s24() 190 const int32_t *src = (int32_t *)source->stream.r_ptr; in verify_s24_to_s24_s32() 191 const int32_t *dst = (int32_t *)sink->stream.w_ptr; in verify_s24_to_s24_s32() [all …]
|
/sof-2.7.6/test/cmocka/src/audio/selector/ |
D | selector_test.c | 109 struct audio_stream *stream = &sel_state->source->stream; in fill_source_s16() local 113 for (i = 0; i < audio_stream_get_free_samples(stream); i++) { in fill_source_s16() 114 w_ptr = audio_stream_write_frag_s16(stream, i); in fill_source_s16() 118 audio_stream_produce(stream, audio_stream_get_free_bytes(stream)); in fill_source_s16() 189 struct audio_stream *stream = &sel_state->source->stream; in fill_source_s32() local 193 for (i = 0; i < audio_stream_get_free_samples(stream); i++) { in fill_source_s32() 194 w_ptr = audio_stream_write_frag_s32(stream, i); in fill_source_s32() 198 audio_stream_produce(stream, audio_stream_get_free_bytes(stream)); in fill_source_s32() 285 cd->sel_func(sel_state->dev, &sel_state->sink->stream, &sel_state->source->stream, in test_audio_sel() 288 sel_state->verify(sel_state->dev, &sel_state->sink->stream, &sel_state->source->stream); in test_audio_sel()
|
/sof-2.7.6/src/audio/smart_amp/ |
D | smart_amp.c | 550 sad->feedback_buf->stream.channels); in smart_amp_process() 558 switch (sad->source_buf->stream.frame_fmt) { in get_smart_amp_process() 590 audio_stream_avail_frames(&sad->source_buf->stream, in smart_amp_copy() 591 &sad->sink_buf->stream); in smart_amp_copy() 603 audio_stream_get_avail_frames(&sad->feedback_buf->stream); in smart_amp_copy() 609 audio_stream_frame_bytes(&sad->feedback_buf->stream); in smart_amp_copy() 618 sad->process(dev, &sad->feedback_buf->stream, in smart_amp_copy() 619 &sad->sink_buf->stream, avail_frames, in smart_amp_copy() 631 audio_stream_frame_bytes(&sad->source_buf->stream); in smart_amp_copy() 636 audio_stream_frame_bytes(&sad->sink_buf->stream); in smart_amp_copy() [all …]
|
/sof-2.7.6/src/audio/crossover/ |
D | crossover_generic.c | 95 const struct audio_stream *source_stream = &source->stream; in crossover_s16_default_pass() 106 y = audio_stream_read_frag_s16((&sinks[j]->stream), i); in crossover_s16_default_pass() 120 const struct audio_stream *source_stream = &source->stream; in crossover_s32_default_pass() 130 y = audio_stream_read_frag_s32((&sinks[j]->stream), i); in crossover_s32_default_pass() 146 const struct audio_stream *source_stream = &source->stream; in crossover_s16_default() 164 sink_stream = &sinks[j]->stream; in crossover_s16_default() 185 const struct audio_stream *source_stream = &source->stream; in crossover_s24_default() 203 sink_stream = &sinks[j]->stream; in crossover_s24_default() 224 const struct audio_stream *source_stream = &source->stream; in crossover_s32_default() 242 sink_stream = &sinks[j]->stream; in crossover_s32_default()
|
/sof-2.7.6/src/samples/audio/ |
D | smart_amp_test.c | 396 switch (sad->source_buf->stream.frame_fmt) { in get_smart_amp_process() 429 audio_stream_avail_frames(&sad->source_buf->stream, in smart_amp_copy() 430 &sad->sink_buf->stream); in smart_amp_copy() 442 audio_stream_get_avail_frames(&sad->feedback_buf->stream); in smart_amp_copy() 448 audio_stream_frame_bytes(&sad->feedback_buf->stream); in smart_amp_copy() 457 sad->process(dev, &sad->feedback_buf->stream, in smart_amp_copy() 458 &sad->sink_buf->stream, avail_frames, in smart_amp_copy() 470 audio_stream_frame_bytes(&sad->source_buf->stream); in smart_amp_copy() 475 audio_stream_frame_bytes(&sad->sink_buf->stream); in smart_amp_copy() 480 sad->process(dev, &sad->source_buf->stream, &sad->sink_buf->stream, in smart_amp_copy() [all …]
|
/sof-2.7.6/test/cmocka/src/audio/pcm_converter/ |
D | pcm_float.c | 88 memcpy_s(source->stream.w_ptr, source->stream.size, data, inbytes); in _test_pcm_convert() 89 audio_stream_produce(&source->stream, inbytes); in _test_pcm_convert() 92 memset(sink->stream.w_ptr, fillval, outbytes); in _test_pcm_convert() 97 fun(&source->stream, 0, &sink->stream, 0, samples); in _test_pcm_convert() 100 assert_int_equal(((uint8_t *)sink->stream.w_ptr)[outbytes - 1], fillval); in _test_pcm_convert() 150 read_val = audio_stream_read_frag(&sink->stream, i, sizeof(Tout)); in test_pcm_convert_s16_to_f() 189 read_val = audio_stream_read_frag(&sink->stream, i, sizeof(Tout)); in test_pcm_convert_f_to_s16() 234 read_val = audio_stream_read_frag(&sink->stream, i, sizeof(Tout)); in test_pcm_convert_s24_in_s32_to_f() 278 read_val = audio_stream_read_frag(&sink->stream, i, sizeof(Tout)); in test_pcm_convert_s24_to_f() 324 read_val = audio_stream_read_frag(&sink->stream, i, sizeof(Tout)); in test_pcm_convert_f_to_s24() [all …]
|
/sof-2.7.6/src/audio/drc/ |
D | drc.c | 314 cd->drc_func(dev, &source->stream, &sink->stream, frames); in drc_process() 342 ret = drc_setup(cd, sourceb->stream.channels, sourceb->stream.rate); in drc_copy() 383 cd->source_format = sourceb->stream.frame_fmt; in drc_prepare() 390 ret = drc_setup(cd, sourceb->stream.channels, sourceb->stream.rate); in drc_prepare() 413 if (cd->source_format != sinkb->stream.frame_fmt) { in drc_prepare() 415 cd->source_format, sinkb->stream.frame_fmt); in drc_prepare() 420 sink_period_bytes = audio_stream_period_bytes(&sinkb->stream, in drc_prepare() 423 if (sinkb->stream.size < sink_period_bytes) { in drc_prepare() 425 sinkb->stream.size); in drc_prepare()
|
/sof-2.7.6/src/audio/rtnr/ |
D | rtnr.c | 294 cd->source_rate = sourceb->stream.rate; in rtnr_params() 295 cd->sink_rate = sinkb->stream.rate; in rtnr_params() 302 switch (sourceb->stream.rate) { in rtnr_params() 308 sourceb->stream.rate); in rtnr_params() 312 if (sourceb->stream.channels != 2 || sinkb->stream.channels != 2) { in rtnr_params() 518 RTKMA_API_First_Copy(cd->rtk_agl, cd->source_rate, source->stream.channels); in rtnr_copy() 521 frames = audio_stream_avail_frames(&source->stream, &sink->stream); in rtnr_copy() 529 source_bytes = frames * audio_stream_frame_bytes(&source->stream); in rtnr_copy() 530 sink_bytes = frames * audio_stream_frame_bytes(&sink->stream); in rtnr_copy() 540 sources_stream[0] = &source->stream; in rtnr_copy() [all …]
|
/sof-2.7.6/test/cmocka/src/audio/mux/ |
D | mux_get_processing_function.c | 82 td->sink->stream.frame_fmt = SOF_IPC_FRAME_FLOAT; in test_mux_get_processing_function_invalid_float() 96 td->sink->stream.frame_fmt = SOF_IPC_FRAME_S16_LE; in test_mux_get_processing_function_valid_s16le() 110 td->sink->stream.frame_fmt = SOF_IPC_FRAME_S24_4LE; in test_mux_get_processing_function_valid_s24_4le() 124 td->sink->stream.frame_fmt = SOF_IPC_FRAME_S32_LE; in test_mux_get_processing_function_valid_s32le()
|
/sof-2.7.6/tools/tune/tdfb/ |
D | example_pass_config.m | 19 bf.output_stream_mix = [0 0]; % Mix both filters to stream 0 21 bf.num_output_streams = 1; % One sink stream 37 bf.output_stream_mix = [0 0 0 0]; % Mix both filters to stream 0 39 bf.num_output_streams = 1; % One sink stream
|
/sof-2.7.6/src/audio/asrc/ |
D | asrc.c | 396 cd->source_rate = sourceb->stream.rate; in asrc_params() 397 cd->sink_rate = sinkb->stream.rate; in asrc_params() 586 cd->source_format = sourceb->stream.frame_fmt; in asrc_prepare() 587 source_period_bytes = audio_stream_period_bytes(&sourceb->stream, in asrc_prepare() 591 cd->sink_format = sinkb->stream.frame_fmt; in asrc_prepare() 592 sink_period_bytes = audio_stream_period_bytes(&sinkb->stream, in asrc_prepare() 595 if (sinkb->stream.size < dev->ipc_config.periods_sink * sink_period_bytes) { in asrc_prepare() 597 sinkb->stream.size, dev->ipc_config.periods_sink, sink_period_bytes); in asrc_prepare() 615 switch (sourceb->stream.frame_fmt) { in asrc_prepare() 635 frame_bytes = audio_stream_frame_bytes(&sourceb->stream); in asrc_prepare() [all …]
|
/sof-2.7.6/src/ipc/ |
D | ipc-helper.c | 50 buffer->stream.underrun_permitted = desc->flags & in buffer_new() 52 buffer->stream.overrun_permitted = desc->flags & in buffer_new() 89 params->frame_fmt = buffer->stream.frame_fmt; in comp_update_params() 95 params->channels = buffer->stream.channels; in comp_update_params() 98 params->rate = buffer->stream.rate; in comp_update_params() 148 component_set_period_frames(dev, buf->stream.rate); in comp_verify_params() 173 component_set_period_frames(dev, sinkb->stream.rate); in comp_verify_params()
|
/sof-2.7.6/src/lib/ |
D | dma.c | 188 struct audio_stream *istream = &source->stream; in dma_buffer_copy_from() 191 uint32_t sink_bytes = audio_stream_sample_bytes(&sink->stream) * in dma_buffer_copy_from() 199 ret = process(istream, 0, &sink->stream, 0, samples); in dma_buffer_copy_from() 216 struct audio_stream *ostream = &sink->stream; in dma_buffer_copy_to() 219 uint32_t source_bytes = audio_stream_sample_bytes(&source->stream) * in dma_buffer_copy_to() 226 ret = process(&source->stream, 0, ostream, 0, samples); in dma_buffer_copy_to()
|
/sof-2.7.6/src/audio/codec_adapter/ |
D | codec_adapter.c | 349 ptr = audio_stream_wrap(&sink->stream, sink->stream.w_ptr); in generate_zeroes() 350 tmp = audio_stream_bytes_without_wrap(&sink->stream, in generate_zeroes() 383 codec_buff_size, local_buff->stream.free, source->stream.avail); in codec_adapter_copy() 390 codec_adapter_copy_from_source_to_lib(&source->stream, &codec->cpd, in codec_adapter_copy() 415 if (local_buff->stream.free < get_output_bytes(dev)) in codec_adapter_copy() 419 codec_adapter_copy_from_source_to_lib(&source->stream, &codec->cpd, in codec_adapter_copy() 433 codec_adapter_copy_from_lib_to_sink(&codec->cpd, &local_buff->stream, in codec_adapter_copy() 440 audio_stream_produce(&local_buff->stream, codec->cpd.produced); in codec_adapter_copy() 449 if (audio_stream_get_avail_bytes(&local_buff->stream) >= cd->period_bytes) in codec_adapter_copy() 456 if (cd->deep_buff_bytes >= audio_stream_get_avail_bytes(&local_buff->stream)) { in codec_adapter_copy() [all …]
|