]> sigrok.org Git - libsigrok.git/commit
alsa: Do not use snd_pcm_hw_params_set_rate_near()
authorAlexandru Gagniuc <redacted>
Thu, 27 Dec 2012 02:14:54 +0000 (20:14 -0600)
committerUwe Hermann <redacted>
Mon, 31 Dec 2012 23:37:17 +0000 (00:37 +0100)
commit0d6ff1039447c35fa8b423ee02468e62a5064cab
treef784f2833b37eeb6a2b8b49286774f56060f95c0
parentcbc8cbd8bbd664043c349133818e0ab41422c751
alsa: Do not use snd_pcm_hw_params_set_rate_near()

snd_pcm_hw_params_set_rate_near() will try to use the samplerate closest to the
given value, potentially starting the acquisition with a different samplerate
than the one specified.

Instead, use snd_pcm_hw_params_set_rate(). It will return an error if the
samplerate is not supported by the hardware, which is arguably better than
collecting data with a different samplerate than the one specified.

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/alsa/api.c