Lines Matching refs:hlp

104 static void alsa_fini_poll (struct pollhlp *hlp)  in alsa_fini_poll()  argument
107 struct pollfd *pfds = hlp->pfds; in alsa_fini_poll()
110 for (i = 0; i < hlp->count; ++i) { in alsa_fini_poll()
115 hlp->pfds = NULL; in alsa_fini_poll()
116 hlp->count = 0; in alsa_fini_poll()
117 hlp->handle = NULL; in alsa_fini_poll()
129 static void alsa_anal_close (snd_pcm_t **handlep, struct pollhlp *hlp) in alsa_anal_close() argument
131 alsa_fini_poll (hlp); in alsa_anal_close()
159 struct pollhlp *hlp = opaque; in alsa_poll_handler() local
162 count = poll (hlp->pfds, hlp->count, 0); in alsa_poll_handler()
174 err = snd_pcm_poll_descriptors_revents (hlp->handle, hlp->pfds, in alsa_poll_handler()
175 hlp->count, &revents); in alsa_poll_handler()
181 if (!(revents & hlp->mask)) { in alsa_poll_handler()
186 state = snd_pcm_state (hlp->handle); in alsa_poll_handler()
189 alsa_recover (hlp->handle); in alsa_poll_handler()
193 alsa_recover (hlp->handle); in alsa_poll_handler()
197 alsa_resume (hlp->handle); in alsa_poll_handler()
201 audio_run(hlp->s, "alsa run (prepared)"); in alsa_poll_handler()
205 audio_run(hlp->s, "alsa run (running)"); in alsa_poll_handler()
213 static int alsa_poll_helper (snd_pcm_t *handle, struct pollhlp *hlp, int mask) in alsa_poll_helper() argument
237 qemu_set_fd_handler (pfds[i].fd, alsa_poll_handler, NULL, hlp); in alsa_poll_helper()
241 qemu_set_fd_handler (pfds[i].fd, NULL, alsa_poll_handler, hlp); in alsa_poll_helper()
246 hlp->pfds = pfds; in alsa_poll_helper()
247 hlp->count = count; in alsa_poll_helper()
248 hlp->handle = handle; in alsa_poll_helper()
249 hlp->mask = mask; in alsa_poll_helper()