/third_party/alsa-lib/src/pcm/ |
H A D | pcm_rate.c | 230 * for best period_size, we should prefer situation when in snd_pcm_rate_hw_refine_cchange() 231 * (buffer_size / period_size) * period_size == buffer_size in snd_pcm_rate_hw_refine_cchange() 234 snd_interval_t *period_size; in snd_pcm_rate_hw_refine_cchange() local 235 period_size = (snd_interval_t *)snd_pcm_hw_param_get_interval(params, SND_PCM_HW_PARAM_PERIOD_SIZE); in snd_pcm_rate_hw_refine_cchange() 236 if (!snd_interval_checkempty(period_size) && in snd_pcm_rate_hw_refine_cchange() 237 period_size->openmin && period_size->openmax && in snd_pcm_rate_hw_refine_cchange() 238 period_size->min + 1 == period_size in snd_pcm_rate_hw_refine_cchange() [all...] |
H A D | pcm_rate_linear.c | 365 rate->pitch = (((uint64_t)info->out.period_size * LINEAR_DIV) + in linear_adjust_pitch() 366 (info->in.period_size/2) ) / info->in.period_size; in linear_adjust_pitch() 368 cframes = input_frames(rate, info->out.period_size); in linear_adjust_pitch() 369 while (cframes != info->in.period_size) { in linear_adjust_pitch() 371 if (cframes > info->in.period_size) in linear_adjust_pitch() 375 cframes_new = input_frames(rate, info->out.period_size); in linear_adjust_pitch() 376 if ((cframes > info->in.period_size && cframes_new < info->in.period_size) || in linear_adjust_pitch() 377 (cframes < info->in.period_size in linear_adjust_pitch() [all...] |
H A D | pcm_simple.c | 119 err = snd_pcm_sw_params_set_start_threshold(pcm, sw_params, (pcm->buffer_size / pcm->period_size) * pcm->period_size); in set_sw_params() 122 err = snd_pcm_sw_params_set_avail_min(pcm, sw_params, pcm->period_size); in set_sw_params() 279 * \param period_size Pointer to store the current period size 287 snd_pcm_uframes_t *period_size) in snd_spcm_init_get_params() 296 if (period_size) in snd_spcm_init_get_params() 297 *period_size = pcm->period_size; in snd_spcm_init_get_params() 284 snd_spcm_init_get_params(snd_pcm_t *pcm, unsigned int *rate, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size) snd_spcm_init_get_params() argument
|
H A D | pcm_direct.c | 945 &dshare->shmptr->hw.period_size); 967 snd_interval_t period_size = dshare->shmptr->hw.period_size; local 981 if (dshare->shmptr->hw.buffer_size.max / 2 > period_size.max) { 982 period_size.max = dshare->shmptr->hw.buffer_size.max / 2; 983 period_size.openmax = dshare->shmptr->hw.buffer_size.openmax; 992 &period_size); 1164 COPY_SLAVE(period_size); 1303 } else if (params->period_size > 0) { 1305 &hw_params, (snd_pcm_uframes_t *)¶ms->period_size, [all...] |
H A D | pcm_direct.h | 71 snd_pcm_sframes_t period_size; member 87 snd_interval_t period_size; member 98 unsigned int period_size; member
|
H A D | pcm_hw.c | 762 if (pcm->period_size == 0) in snd_pcm_hw_drain() 772 if ((pcm->boundary % pcm->period_size) == 0) { in snd_pcm_hw_drain() 773 silence_size = pcm->period_size - (*pcm->appl.ptr % pcm->period_size); in snd_pcm_hw_drain() 774 if (silence_size == pcm->period_size) in snd_pcm_hw_drain() 781 silence_size = pcm->period_size; in snd_pcm_hw_drain()
|
H A D | pcm_share.c | 392 hw_ptr += spcm->period_size - 1; in snd_pcm_share_thread() 395 hw_ptr -= hw_ptr % spcm->period_size; in snd_pcm_share_thread() 446 hw_ptr += spcm->period_size - 1; in _snd_pcm_share_update() 449 hw_ptr -= hw_ptr % spcm->period_size; in _snd_pcm_share_update() 666 slave->safety_threshold += slave->pcm->period_size - 1; in snd_pcm_share_hw_params() 667 slave->safety_threshold -= slave->safety_threshold % slave->pcm->period_size; in snd_pcm_share_hw_params()
|
H A D | pcm.c | 917 snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_PERIOD_SIZE - SND_PCM_HW_PARAM_FIRST_INTERVAL], pcm->period_size); in snd_pcm_hw_params_current() 2357 snd_output_printf(out, " period_size : %lu\n", pcm->period_size); in snd_pcm_dump_hw_setup() 2934 timeout = (pcm->period_size * 1000ULL) / pcm->rate; in __snd_pcm_wait_io_timeout() 6669 /* Fix avail_min if it's below period size. The period_size in snd_pcm_sw_params_set_avail_min() 6673 if (val < pcm->period_size) in snd_pcm_sw_params_set_avail_min() 6674 val = pcm->period_size; in snd_pcm_sw_params_set_avail_min() 7486 // we want to process frames in chunks (period_size) 7487 if (avail < period_size) 7489 size = period_size; 8796 snd_pcm_uframes_t buffer_size, period_size; snd_pcm_set_params() local 8974 snd_pcm_get_params(snd_pcm_t *pcm, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t *period_size) snd_pcm_get_params() argument [all...] |
H A D | pcm_dsnoop.c | 253 dsnoop->hw_ptr %= pcm->period_size; in snd_pcm_dsnoop_reset() 720 period_size INT # in frames 814 params.period_size = psize; in _snd_pcm_dsnoop_open()
|
/third_party/alsa-utils/bat/ |
H A D | alsa.c | 36 snd_pcm_uframes_t period_size; member 81 snd_pcm_uframes_t period_size = 0; in set_snd_pcm_params() local 153 if (bat->buffer_size > 0 && bat->period_size == 0) in set_snd_pcm_params() 154 bat->period_size = bat->buffer_size / DIV_BUFFERSIZE; in set_snd_pcm_params() 170 &period_size, 0) < 0) { in set_snd_pcm_params() 174 (int) period_size, in set_snd_pcm_params() 179 bat->period_size = (int) period_size; in set_snd_pcm_params() 184 period_size = bat->period_size; in set_snd_pcm_params() [all...] |
H A D | tinyalsa.c | 62 if (bat->period_size > 0) in init_config() 63 config->period_size = bat->period_size; in init_config() 65 config->period_size = TINYALSA_PERIODSIZE; in init_config() 146 config->period_size, "Period size", "Hz"); in check_playback_params()
|
H A D | bat.c | 370 bat->period_size = 0; in set_defaults() 487 bat->period_size = err >= MIN_PERIODSIZE in parse_arguments() 690 bat.period_size += bat.rate / 1000; in main() 692 bat.period_size * DIV_BUFFERSIZE; in main() 694 /* terminate the test if period_size is in main() 696 if (bat.period_size > bat.rate * 0.2) in main()
|
H A D | common.h | 223 int period_size; /* period size in frames */ member
|
/third_party/alsa-lib/test/ |
H A D | pcm.c | 33 static snd_pcm_sframes_t period_size; variable 173 period_size = size; in set_hwparams() 195 err = snd_pcm_sw_params_set_start_threshold(handle, swparams, (buffer_size / period_size) * period_size); in set_swparams() 200 /* allow the transfer when at least period_size samples can be processed */ in set_swparams() 202 err = snd_pcm_sw_params_set_avail_min(handle, swparams, period_event ? buffer_size : period_size); in set_swparams() 263 generate_sine(areas, 0, period_size, &phase); in write_loop() 265 cptr = period_size; in write_loop() 346 generate_sine(areas, 0, period_size, &phase); in write_and_poll_loop() 348 cptr = period_size; in write_and_poll_loop() [all...] |
H A D | seq-sender.c | 9 int period_size = 1024; variable 50 err = snd_pcm_hw_params_set_period_size_near(phandle, params, period_size); in set_hwparams() 217 pbuf = calloc(1, period_size * 4); in event_sender() 251 if (snd_pcm_writei(phandle, pbuf, period_size) != period_size) { in event_sender()
|
H A D | latency.c | 60 int period_size = 0; /* auto */ variable 171 if (period_size > 0) in setparams_bufsize() 172 periodsize = period_size; in setparams_bufsize() 641 period_size = err >= 32 && err < 200000 ? err : 0; in main()
|
/third_party/pulseaudio/src/modules/alsa/ |
H A D | alsa-util.h | 46 snd_pcm_uframes_t *period_size, /* modified at return */ 65 snd_pcm_uframes_t *period_size, /* modified at return */ 80 snd_pcm_uframes_t *period_size, /* modified at return */ 94 snd_pcm_uframes_t *period_size, /* modified at return */ 109 snd_pcm_uframes_t *period_size, /* modified at return */
|
H A D | alsa-util.c | 198 * selected fragment settings in *buffer_size and *period_size. Determine 203 snd_pcm_uframes_t *period_size, in pa_alsa_set_hw_params() 213 snd_pcm_uframes_t _period_size = period_size ? *period_size : 0; in pa_alsa_set_hw_params() 446 if (period_size) in pa_alsa_set_hw_params() 447 *period_size = _period_size; in pa_alsa_set_hw_params() 520 snd_pcm_uframes_t *period_size, in pa_alsa_open_by_device_id_auto() 558 period_size, in pa_alsa_open_by_device_id_auto() 585 period_size, in pa_alsa_open_by_device_id_auto() 609 period_size, in pa_alsa_open_by_device_id_auto() 200 pa_alsa_set_hw_params( snd_pcm_t *pcm_handle, pa_sample_spec *ss, snd_pcm_uframes_t *period_size, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t tsched_size, bool *use_mmap, bool *use_tsched, bool require_exact_channel_number) pa_alsa_set_hw_params() argument 514 pa_alsa_open_by_device_id_auto( const char *dev_id, char **dev, pa_sample_spec *ss, pa_channel_map* map, int mode, snd_pcm_uframes_t *period_size, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t tsched_size, bool *use_mmap, bool *use_tsched, pa_alsa_profile_set *ps, pa_alsa_mapping **mapping) pa_alsa_open_by_device_id_auto() argument 623 pa_alsa_open_by_device_id_mapping( const char *dev_id, char **dev, pa_sample_spec *ss, pa_channel_map* map, int mode, snd_pcm_uframes_t *period_size, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t tsched_size, bool *use_mmap, bool *use_tsched, pa_alsa_mapping *m) pa_alsa_open_by_device_id_mapping() argument 675 pa_alsa_open_by_device_string( const char *device, char **dev, pa_sample_spec *ss, pa_channel_map* map, int mode, snd_pcm_uframes_t *period_size, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t tsched_size, bool *use_mmap, bool *use_tsched, bool require_exact_channel_number) pa_alsa_open_by_device_string() argument 774 pa_alsa_open_by_template( char **template, const char *dev_id, char **dev, pa_sample_spec *ss, pa_channel_map* map, int mode, snd_pcm_uframes_t *period_size, snd_pcm_uframes_t *buffer_size, snd_pcm_uframes_t tsched_size, bool *use_mmap, bool *use_tsched, bool require_exact_channel_number) pa_alsa_open_by_template() argument [all...] |
/third_party/alsa-utils/speaker-test/ |
H A D | speaker-test.c | 115 static snd_pcm_uframes_t period_size; variable 563 snd_pcm_hw_params_get_period_size(params, &period_size, NULL); in set_hwparams() 564 printf(_("was set period_size = %lu\n"),period_size); in set_hwparams() 566 if (2*period_size > buffer_size) { in set_hwparams() 591 /* allow the transfer when at least period_size frames can be processed */ in set_swparams() 592 err = snd_pcm_sw_params_set_avail_min(handle, swparams, period_size); in set_swparams() 911 int bufsize = snd_pcm_frames_to_bytes(handle, period_size); in write_loop() 932 do_generate(frames, channel, period_size, generate_pink_noise, &pink); in write_loop() 934 do_generate(frames, channel, period_size, generate_patter in write_loop() [all...] |
/third_party/ffmpeg/libavdevice/ |
H A D | alsa_dec.c | 90 s->period_size, 1.5E-6); in audio_read_header() 109 int ret = av_new_packet(s->pkt, s->period_size * s->frame_size); in audio_read_packet() 116 while ((res = snd_pcm_readi(s->h, s->pkt->data + s->pkt->size, s->period_size - s->pkt->size / s->frame_size)) < 0) { in audio_read_packet() 129 } while (s->pkt->size < s->period_size * s->frame_size); in audio_read_packet()
|
H A D | alsa.c | 183 snd_pcm_uframes_t buffer_size, period_size; in ff_alsa_open() local 259 snd_pcm_hw_params_get_period_size_min(hw_params, &period_size, NULL); in ff_alsa_open() 260 if (!period_size) in ff_alsa_open() 261 period_size = buffer_size / 4; in ff_alsa_open() 262 res = snd_pcm_hw_params_set_period_size_near(h, hw_params, &period_size, NULL); in ff_alsa_open() 268 s->period_size = period_size; in ff_alsa_open()
|
H A D | alsa.h | 52 int period_size; ///< preferred size for reads and writes, in frames member
|
/third_party/alsa-lib/include/ |
H A D | pcm_ioplug.h | 122 snd_pcm_uframes_t period_size; /**< period size; filled after hw_params is called */ member
|
H A D | pcm_rate.h | 48 snd_pcm_uframes_t period_size; member
|
/third_party/alsa-utils/alsaloop/ |
H A D | alsaloop.h | 97 unsigned int period_size; member
|