Lines Matching refs:hw

44     HWVoiceOut hw;
55 HWVoiceIn hw;
90 HWVoiceOut *hw = &pa->hw;
93 threshold = conf.divisor ? hw->samples / conf.divisor : 0;
117 rpos = hw->rpos;
125 int chunk = audio_MIN (to_mix, hw->samples - rpos);
126 struct st_sample *src = hw->mix_buf + rpos;
128 hw->clip (pa->pcm_buf, src, chunk);
131 chunk << hw->info.shift, &error) < 0) {
136 rpos = (rpos + chunk) % hw->samples;
154 static int qpa_run_out (HWVoiceOut *hw, int live)
157 PAVoiceOut *pa = (PAVoiceOut *) hw;
166 hw->rpos = pa->rpos;
185 HWVoiceIn *hw = &pa->hw;
188 threshold = conf.divisor ? hw->samples / conf.divisor : 0;
212 wpos = hw->wpos;
220 int chunk = audio_MIN (to_grab, hw->samples - wpos);
224 chunk << hw->info.shift, &error) < 0) {
229 hw->conv (hw->conv_buf + wpos, buf, chunk, &nominal_volume);
230 wpos = (wpos + chunk) % hw->samples;
248 static int qpa_run_in (HWVoiceIn *hw)
251 PAVoiceIn *pa = (PAVoiceIn *) hw;
257 live = audio_pcm_hw_get_live_in (hw);
258 dead = hw->samples - live;
262 hw->wpos = pa->wpos;
325 static int qpa_init_out (HWVoiceOut *hw, struct audsettings *as)
330 PAVoiceOut *pa = (PAVoiceOut *) hw;
354 audio_pcm_init_info (&hw->info, &obt_as);
355 hw->samples = conf.samples;
356 pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
359 hw->samples << hw->info.shift);
363 if (audio_pt_init (&pa->pt, qpa_thread_out, hw, AUDIO_CAP, AUDIO_FUNC)) {
379 static int qpa_init_in (HWVoiceIn *hw, struct audsettings *as)
384 PAVoiceIn *pa = (PAVoiceIn *) hw;
408 audio_pcm_init_info (&hw->info, &obt_as);
409 hw->samples = conf.samples;
410 pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
413 hw->samples << hw->info.shift);
417 if (audio_pt_init (&pa->pt, qpa_thread_in, hw, AUDIO_CAP, AUDIO_FUNC)) {
433 static void qpa_fini_out (HWVoiceOut *hw)
436 PAVoiceOut *pa = (PAVoiceOut *) hw;
453 static void qpa_fini_in (HWVoiceIn *hw)
456 PAVoiceIn *pa = (PAVoiceIn *) hw;
473 static int qpa_ctl_out (HWVoiceOut *hw, int cmd, ...)
475 (void) hw;
480 static int qpa_ctl_in (HWVoiceIn *hw, int cmd, ...)
482 (void) hw;