- msg = "unable to get buffer time";
- ret = snd_pcm_hw_params_get_buffer_time_max(hwparams, &buffer_time,
- NULL);
- if (ret < 0 || buffer_time == 0)
- goto fail;
- /* buffer at most 500 milliseconds */
- buffer_time = PARA_MIN(buffer_time, 500U * 1000U);