Lines Matching refs:chandle
223 int setparams(snd_pcm_t *phandle, snd_pcm_t *chandle, int *bufsize)
243 if ((err = setparams_stream(chandle, ct_params, "capture")) < 0) {
266 if ((err = setparams_bufsize(chandle, c_params, ct_params, *bufsize, "capture")) < 0) {
305 if ((err = setparams_set(chandle, c_params, c_swparams, "capture")) < 0) {
316 snd_pcm_dump(chandle, output);
582 snd_pcm_t *phandle, *chandle;
714 if ((err = snd_pcm_open(&chandle, cdevice, SND_PCM_STREAM_CAPTURE, block ? 0 : SND_PCM_NONBLOCK)) < 0) {
740 if (setparams(phandle, chandle, &latency) < 0)
743 if ((err = snd_pcm_link(chandle, phandle)) < 0) {
762 if ((err = snd_pcm_start(chandle)) < 0) {
769 gettimestamp(chandle, &c_tstamp);
774 showstat(chandle, frames_in);
783 cap_avail = get_avail(chandle);
791 snd_pcm_wait(chandle, 1000);
797 cap_avail = get_avail(chandle);
817 if ((r = readbuf(chandle, buffer, cap_avail, &frames_in, &in_max)) < 0)
833 showstat(chandle, frames_in);
845 snd_pcm_drop(chandle);
860 snd_pcm_unlink(chandle);
862 snd_pcm_hw_free(chandle);
865 snd_pcm_close(chandle);