pcm: hw_params - copy periods and buffer_time to the local variable
It is expected to return the correct numbers for get_periods and
get_buffer_time requests. Copy the appropriate fields in the
hw_params call.
Fixes: https://github.com/alsa-project/alsa-lib/issues/258
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela
1 year, 8 months ago
2406 | 2406 | INTERNAL(snd_pcm_hw_params_get_subformat)(params, &pcm->subformat); |
2407 | 2407 | INTERNAL(snd_pcm_hw_params_get_channels)(params, &pcm->channels); |
2408 | 2408 | INTERNAL(snd_pcm_hw_params_get_rate)(params, &pcm->rate, 0); |
2409 | snd_interval_copy(&pcm->periods, ¶ms->intervals[SND_PCM_HW_PARAM_PERIODS - SND_PCM_HW_PARAM_FIRST_INTERVAL]); | |
2410 | snd_interval_copy(&pcm->buffer_time, ¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_TIME - SND_PCM_HW_PARAM_FIRST_INTERVAL]); | |
2409 | 2411 | INTERNAL(snd_pcm_hw_params_get_period_time)(params, &pcm->period_time, 0); |
2410 | 2412 | INTERNAL(snd_pcm_hw_params_get_period_size)(params, &pcm->period_size, 0); |
2411 | 2413 | INTERNAL(snd_pcm_hw_params_get_buffer_size)(params, &pcm->buffer_size); |