]> sigrok.org Git - libsigrok.git/commit
alsa: Find supported samplerates during device scan
authorAlexandru Gagniuc <redacted>
Wed, 26 Dec 2012 18:11:33 +0000 (12:11 -0600)
committerUwe Hermann <redacted>
Mon, 31 Dec 2012 23:37:17 +0000 (00:37 +0100)
commit65faa197ae4c607c9c127af99af6c8e5b6acd7b3
tree32727416df88a31bd0267b7f2327d891156f8cf7
parent729850c9e7dfa2c08c11a025d5a54b8e8e803f3c
alsa: Find supported samplerates during device scan

Since we are using the 'hw' interface of ALSA, we don't have the luxury of
samplerate conversion, given by the 'plughw' interface. If we try to set a
samplerate that is not supported, ALSA will just throw an error.

We can test for the supported samplerates, and create a list of supported
samplerates, then limit the selection to only those values. The frontend can
query the list of supported samplerates.

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