Lines Matching defs:pcm

180 		} pcm;
245 static void pcm_shm_hw_ptr_changed(snd_pcm_t *pcm, snd_pcm_t *src ATTRIBUTE_UNUSED)
247 client_t *client = pcm->hw.private_data;
252 if (pcm->hw.fd >= 0) {
254 ctrl->hw.offset = pcm->hw.offset;
258 ctrl->hw.ptr = pcm->hw.ptr ? *pcm->hw.ptr : 0;
259 for (loop = pcm->hw.master; loop; loop = loop->hw.master)
261 pcm->hw.ptr = &ctrl->hw.ptr;
264 static void pcm_shm_appl_ptr_changed(snd_pcm_t *pcm, snd_pcm_t *src ATTRIBUTE_UNUSED)
266 client_t *client = pcm->appl.private_data;
271 if (pcm->appl.fd >= 0) {
273 ctrl->appl.offset = pcm->appl.offset;
277 ctrl->appl.ptr = pcm->appl.ptr ? *pcm->appl.ptr : 0;
278 for (loop = pcm->appl.master; loop; loop = loop->appl.master)
280 pcm->appl.ptr = &ctrl->appl.ptr;
286 snd_pcm_t *pcm;
289 err = snd_pcm_open(&pcm, client->name, client->stream, SND_PCM_NONBLOCK);
292 client->device.pcm.handle = pcm;
293 client->device.pcm.fd = _snd_pcm_poll_descriptor(pcm);
294 pcm->hw.private_data = client;
295 pcm->hw.changed = pcm_shm_hw_ptr_changed;
296 pcm->appl.private_data = client;
297 pcm->appl.changed = pcm_shm_appl_ptr_changed;
317 snd_pcm_close(pcm);
327 del_waiter(client->device.pcm.fd);
330 err = snd_pcm_close(client->device.pcm.handle);
397 snd_pcm_t *pcm;
403 pcm = client->device.pcm.handle;
406 ctrl->result = snd_pcm_async(pcm, ctrl->u.async.sig, ctrl->u.async.pid);
411 ctrl->result = snd_async_add_pcm_handler(&client->async_handler, pcm, async_handler, client);
422 ctrl->result = snd_pcm_info(pcm, (snd_pcm_info_t *) &ctrl->u.info);
425 ctrl->result = snd_pcm_hw_refine(pcm, (snd_pcm_hw_params_t *) &ctrl->u.hw_refine);
428 ctrl->result = snd_pcm_hw_params(pcm, (snd_pcm_hw_params_t *) &ctrl->u.hw_params);
431 ctrl->result = snd_pcm_hw_free(pcm);
434 ctrl->result = snd_pcm_sw_params(pcm, (snd_pcm_sw_params_t *) &ctrl->u.sw_params);
437 ctrl->result = snd_pcm_status(pcm, (snd_pcm_status_t *) &ctrl->u.status);
440 ctrl->result = snd_pcm_state(pcm);
443 ctrl->result = snd_pcm_hwsync(pcm);
446 ctrl->result = snd_pcm_delay(pcm, (snd_pcm_sframes_t *) &ctrl->u.delay.frames);
449 ctrl->result = snd_pcm_avail_update(pcm);
452 ctrl->result = snd_pcm_prepare(pcm);
455 ctrl->result = snd_pcm_reset(pcm);
458 ctrl->result = snd_pcm_start(pcm);
461 ctrl->result = snd_pcm_drain(pcm);
464 ctrl->result = snd_pcm_drop(pcm);
467 ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause.enable);
470 ctrl->result = snd_pcm_channel_info(pcm, (snd_pcm_channel_info_t *) &ctrl->u.channel_info);
476 ctrl->result = snd_pcm_rewind(pcm, ctrl->u.rewind.frames);
479 ctrl->result = snd_pcm_forward(pcm, ctrl->u.forward.frames);
488 ctrl->result = snd_pcm_unlink(pcm);
491 ctrl->result = snd_pcm_resume(pcm);
495 ctrl->result = snd_pcm_mmap(pcm);
500 ctrl->result = snd_pcm_munmap(pcm);
504 ctrl->result = snd_pcm_mmap_commit(pcm,
510 return shm_ack_fd(client, _snd_pcm_poll_descriptor(pcm));
515 return shm_rbptr_fd(client, &pcm->hw);
517 return shm_rbptr_fd(client, &pcm->appl);