• Home
  • Raw
  • Download

Lines Matching refs:ctrl

205 			void *ctrl;  member
247 volatile snd_pcm_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in pcm_shm_hw_ptr_changed() local
250 ctrl->hw.changed = 1; in pcm_shm_hw_ptr_changed()
252 ctrl->hw.use_mmap = 1; in pcm_shm_hw_ptr_changed()
253 ctrl->hw.offset = pcm->hw.offset; in pcm_shm_hw_ptr_changed()
256 ctrl->hw.use_mmap = 0; in pcm_shm_hw_ptr_changed()
257 ctrl->hw.ptr = pcm->hw.ptr ? *pcm->hw.ptr : 0; in pcm_shm_hw_ptr_changed()
259 loop->hw.ptr = &ctrl->hw.ptr; in pcm_shm_hw_ptr_changed()
260 pcm->hw.ptr = &ctrl->hw.ptr; in pcm_shm_hw_ptr_changed()
266 volatile snd_pcm_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in pcm_shm_appl_ptr_changed() local
269 ctrl->appl.changed = 1; in pcm_shm_appl_ptr_changed()
271 ctrl->appl.use_mmap = 1; in pcm_shm_appl_ptr_changed()
272 ctrl->appl.offset = pcm->appl.offset; in pcm_shm_appl_ptr_changed()
275 ctrl->appl.use_mmap = 0; in pcm_shm_appl_ptr_changed()
276 ctrl->appl.ptr = pcm->appl.ptr ? *pcm->appl.ptr : 0; in pcm_shm_appl_ptr_changed()
278 loop->appl.ptr = &ctrl->appl.ptr; in pcm_shm_appl_ptr_changed()
279 pcm->appl.ptr = &ctrl->appl.ptr; in pcm_shm_appl_ptr_changed()
305 client->transport.shm.ctrl = shmat(shmid, 0, 0); in pcm_shm_open()
306 if (client->transport.shm.ctrl == (void*) -1) { in pcm_shm_open()
324 snd_pcm_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in pcm_shm_close() local
330 ctrl->result = err; in pcm_shm_close()
333 if (client->transport.shm.ctrl) { in pcm_shm_close()
334 err = shmdt((void *)client->transport.shm.ctrl); in pcm_shm_close()
340 client->transport.shm.ctrl = 0; in pcm_shm_close()
392 volatile snd_pcm_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in pcm_shm_cmd() local
400 cmd = ctrl->cmd; in pcm_shm_cmd()
401 ctrl->cmd = 0; in pcm_shm_cmd()
405 ctrl->result = snd_pcm_async(pcm, ctrl->u.async.sig, ctrl->u.async.pid); in pcm_shm_cmd()
406 if (ctrl->result < 0) in pcm_shm_cmd()
408 if (ctrl->u.async.sig >= 0) { in pcm_shm_cmd()
410 ctrl->result = snd_async_add_pcm_handler(&client->async_handler, pcm, async_handler, client); in pcm_shm_cmd()
411 if (ctrl->result < 0) in pcm_shm_cmd()
417 client->async_sig = ctrl->u.async.sig; in pcm_shm_cmd()
418 client->async_pid = ctrl->u.async.pid; in pcm_shm_cmd()
421 ctrl->result = snd_pcm_info(pcm, (snd_pcm_info_t *) &ctrl->u.info); in pcm_shm_cmd()
424 ctrl->result = snd_pcm_hw_refine(pcm, (snd_pcm_hw_params_t *) &ctrl->u.hw_refine); in pcm_shm_cmd()
427 ctrl->result = snd_pcm_hw_params(pcm, (snd_pcm_hw_params_t *) &ctrl->u.hw_params); in pcm_shm_cmd()
430 ctrl->result = snd_pcm_hw_free(pcm); in pcm_shm_cmd()
433 ctrl->result = snd_pcm_sw_params(pcm, (snd_pcm_sw_params_t *) &ctrl->u.sw_params); in pcm_shm_cmd()
436 ctrl->result = snd_pcm_status(pcm, (snd_pcm_status_t *) &ctrl->u.status); in pcm_shm_cmd()
439 ctrl->result = snd_pcm_state(pcm); in pcm_shm_cmd()
442 ctrl->result = snd_pcm_hwsync(pcm); in pcm_shm_cmd()
445 ctrl->result = snd_pcm_delay(pcm, (snd_pcm_sframes_t *) &ctrl->u.delay.frames); in pcm_shm_cmd()
448 ctrl->result = snd_pcm_avail_update(pcm); in pcm_shm_cmd()
451 ctrl->result = snd_pcm_prepare(pcm); in pcm_shm_cmd()
454 ctrl->result = snd_pcm_reset(pcm); in pcm_shm_cmd()
457 ctrl->result = snd_pcm_start(pcm); in pcm_shm_cmd()
460 ctrl->result = snd_pcm_drain(pcm); in pcm_shm_cmd()
463 ctrl->result = snd_pcm_drop(pcm); in pcm_shm_cmd()
466 ctrl->result = snd_pcm_pause(pcm, ctrl->u.pause.enable); in pcm_shm_cmd()
469 ctrl->result = snd_pcm_channel_info(pcm, (snd_pcm_channel_info_t *) &ctrl->u.channel_info); in pcm_shm_cmd()
470 if (ctrl->result >= 0 && in pcm_shm_cmd()
471 ctrl->u.channel_info.type == SND_PCM_AREA_MMAP) in pcm_shm_cmd()
472 return shm_ack_fd(client, ctrl->u.channel_info.u.mmap.fd); in pcm_shm_cmd()
475 ctrl->result = snd_pcm_rewind(pcm, ctrl->u.rewind.frames); in pcm_shm_cmd()
478 ctrl->result = snd_pcm_forward(pcm, ctrl->u.forward.frames); in pcm_shm_cmd()
483 ctrl->result = -ENOSYS; in pcm_shm_cmd()
487 ctrl->result = snd_pcm_unlink(pcm); in pcm_shm_cmd()
490 ctrl->result = snd_pcm_resume(pcm); in pcm_shm_cmd()
494 ctrl->result = snd_pcm_mmap(pcm); in pcm_shm_cmd()
499 ctrl->result = snd_pcm_munmap(pcm); in pcm_shm_cmd()
503 ctrl->result = snd_pcm_mmap_commit(pcm, in pcm_shm_cmd()
504 ctrl->u.mmap_commit.offset, in pcm_shm_cmd()
505 ctrl->u.mmap_commit.frames); in pcm_shm_cmd()
508 ctrl->result = 0; in pcm_shm_cmd()
518 ERROR("Bogus cmd: %x", ctrl->cmd); in pcm_shm_cmd()
519 ctrl->result = -ENOSYS; in pcm_shm_cmd()
566 client->transport.shm.ctrl = shmat(shmid, 0, 0); in ctl_shm_open()
567 if (!client->transport.shm.ctrl) { in ctl_shm_open()
587 snd_ctl_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in ctl_shm_close() local
593 ctrl->result = err; in ctl_shm_close()
596 if (client->transport.shm.ctrl) { in ctl_shm_close()
597 err = shmdt((void *)client->transport.shm.ctrl); in ctl_shm_close()
603 client->transport.shm.ctrl = 0; in ctl_shm_close()
611 snd_ctl_shm_ctrl_t *ctrl = client->transport.shm.ctrl; in ctl_shm_cmd() local
619 cmd = ctrl->cmd; in ctl_shm_cmd()
620 ctrl->cmd = 0; in ctl_shm_cmd()
624 ctrl->result = snd_ctl_async(ctl, ctrl->u.async.sig, ctrl->u.async.pid); in ctl_shm_cmd()
625 if (ctrl->result < 0) in ctl_shm_cmd()
627 if (ctrl->u.async.sig >= 0) { in ctl_shm_cmd()
629 ctrl->result = snd_async_add_ctl_handler(&client->async_handler, ctl, async_handler, client); in ctl_shm_cmd()
630 if (ctrl->result < 0) in ctl_shm_cmd()
636 client->async_sig = ctrl->u.async.sig; in ctl_shm_cmd()
637 client->async_pid = ctrl->u.async.pid; in ctl_shm_cmd()
641 ctrl->result = snd_ctl_subscribe_events(ctl, ctrl->u.subscribe_events); in ctl_shm_cmd()
644 ctrl->result = snd_ctl_card_info(ctl, &ctrl->u.card_info); in ctl_shm_cmd()
649 if (ctrl->u.element_list.space * sizeof(*ctrl->u.element_list.pids) > maxsize) { in ctl_shm_cmd()
650 ctrl->result = -EFAULT; in ctl_shm_cmd()
653 ctrl->u.element_list.pids = (snd_ctl_elem_id_t*) ctrl->data; in ctl_shm_cmd()
654 ctrl->result = snd_ctl_elem_list(ctl, &ctrl->u.element_list); in ctl_shm_cmd()
658 ctrl->result = snd_ctl_elem_info(ctl, &ctrl->u.element_info); in ctl_shm_cmd()
661 ctrl->result = snd_ctl_elem_read(ctl, &ctrl->u.element_read); in ctl_shm_cmd()
664 ctrl->result = snd_ctl_elem_write(ctl, &ctrl->u.element_write); in ctl_shm_cmd()
667 ctrl->result = snd_ctl_elem_lock(ctl, &ctrl->u.element_lock); in ctl_shm_cmd()
670 ctrl->result = snd_ctl_elem_unlock(ctl, &ctrl->u.element_unlock); in ctl_shm_cmd()
673 ctrl->result = snd_ctl_hwdep_next_device(ctl, &ctrl->u.device); in ctl_shm_cmd()
676 ctrl->result = snd_ctl_hwdep_info(ctl, &ctrl->u.hwdep_info); in ctl_shm_cmd()
679 ctrl->result = snd_ctl_pcm_next_device(ctl, &ctrl->u.device); in ctl_shm_cmd()
682 ctrl->result = snd_ctl_pcm_info(ctl, &ctrl->u.pcm_info); in ctl_shm_cmd()
685 ctrl->result = snd_ctl_pcm_prefer_subdevice(ctl, ctrl->u.pcm_prefer_subdevice); in ctl_shm_cmd()
688 ctrl->result = snd_ctl_rawmidi_next_device(ctl, &ctrl->u.device); in ctl_shm_cmd()
691 ctrl->result = snd_ctl_rawmidi_info(ctl, &ctrl->u.rawmidi_info); in ctl_shm_cmd()
694 ctrl->result = snd_ctl_rawmidi_prefer_subdevice(ctl, ctrl->u.rawmidi_prefer_subdevice); in ctl_shm_cmd()
697 ctrl->result = snd_ctl_set_power_state(ctl, ctrl->u.power_state); in ctl_shm_cmd()
700 ctrl->result = snd_ctl_get_power_state(ctl, &ctrl->u.power_state); in ctl_shm_cmd()
703 ctrl->result = snd_ctl_read(ctl, &ctrl->u.read); in ctl_shm_cmd()
709 ctrl->result = 0; in ctl_shm_cmd()
712 ERROR("Bogus cmd: %x", ctrl->cmd); in ctl_shm_cmd()
713 ctrl->result = -ENOSYS; in ctl_shm_cmd()