Skip to content

Commit e09defe

Browse files
committed
tools/capture-test.py: Fix ALSA parameter
This was a usage goof, the final "dir" argument to snd_pcm_hw_params_set_rate() is not specifying the direction of the stream, it's specifying the "direction" in which the code will err if it has to pick a non-matching value. In this case the parameter had a value of zero ("exact match", what we want) anyway, so it was an invisible noop. Signed-off-by: Andy Ross <andyross@google.com>
1 parent a4191f3 commit e09defe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/capture-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def pcm_init_stream(pcm, rate, chans, fmt, access):
112112
alsa.snd_pcm_hw_params_any(pcm, hwp)
113113
alsa.snd_pcm_hw_params_set_format(pcm, hwp, fmt)
114114
alsa.snd_pcm_hw_params_set_channels(pcm, hwp, chans)
115-
alsa.snd_pcm_hw_params_set_rate(pcm, hwp, rate, alsa.PCM_STREAM_PLAYBACK)
115+
alsa.snd_pcm_hw_params_set_rate(pcm, hwp, rate, 0)
116116
alsa.snd_pcm_hw_params_set_access(pcm, hwp, access)
117117
alsa.snd_pcm_hw_params(pcm, hwp)
118118

0 commit comments

Comments
 (0)