Re: snd_pcm_hw_params_set_buffer_size returns -EINVAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Lorenz wrote:
> On Tuesday 27 September 2016 08:28:42 Clemens Ladisch wrote:
>> And you must set a buffer size that is supported by the device.
>
> Thanks, I just found snd_pcm_hw_params_set_buffer_size_near(). However, for
> our app, it would be nice to get the preferred buffer size before any PCM
> handle and params are created. Is this possible?

You can get the allowed range of buffer sizes with
snd_pcm_hw_params_get_buffer_size_min/max, but these values can depend
on any other hardware parameters, so you cannot get them without the
PCM handle, and they might be further restricted with any
snd_pcm_hw_params_set_xxx call.

There is no preferred size; what size your application prefers depends
on its latency requirements.


Regards,
Clemens

------------------------------------------------------------------------------
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux