Lines Matching defs:pcm
516 int snd_pcm_direct_nonblock(snd_pcm_t *pcm ATTRIBUTE_UNUSED, int nonblock ATTRIBUTE_UNUSED)
518 /* value is cached for us in pcm->mode (SND_PCM_NONBLOCK flag) */
522 int snd_pcm_direct_async(snd_pcm_t *pcm, int sig, pid_t pid)
524 snd_pcm_direct_t *dmix = pcm->private_data;
575 * The first client recovers slave pcm.
666 int snd_pcm_direct_check_xrun(snd_pcm_direct_t *direct, snd_pcm_t *pcm)
692 pcm->fast_ops->drop(pcm->fast_op_arg);
694 gettimestamp(&direct->trigger_tstamp, pcm->tstamp_type);
718 * In contrast poll() on pcm hardware checks ALSA state and will immediately
726 int snd_pcm_direct_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds,
729 if (pcm->poll_fd < 0) {
734 pfds->fd = pcm->poll_fd;
735 pfds->events = pcm->poll_events | POLLERR | POLLNVAL;
742 switch (__snd_pcm_state(pcm)) {
751 int snd_pcm_direct_poll_revents(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
753 snd_pcm_direct_t *dmix = pcm->private_data;
763 __snd_pcm_avail_update(pcm);
764 if (pcm->stream == SND_PCM_STREAM_PLAYBACK) {
767 avail = snd_pcm_mmap_playback_avail(pcm);
769 avail = snd_pcm_mmap_capture_avail(pcm);
771 empty = avail < pcm->avail_min;
774 if (snd_pcm_direct_check_xrun(dmix, pcm) < 0 ||
791 switch (__snd_pcm_state(pcm)) {
806 int snd_pcm_direct_info(snd_pcm_t *pcm, snd_pcm_info_t * info)
808 snd_pcm_direct_t *dmix = pcm->private_data;
814 info->stream = pcm->stream;
817 if (pcm->name) {
818 snd_strlcpy((char *)info->id, pcm->name, sizeof(info->id));
819 snd_strlcpy((char *)info->name, pcm->name, sizeof(info->name));
820 snd_strlcpy((char *)info->subname, pcm->name, sizeof(info->subname));
894 int snd_pcm_direct_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
896 snd_pcm_direct_t *dshare = pcm->private_data;
1006 err = snd_pcm_hw_refine_soft(pcm, params);
1029 int snd_pcm_direct_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
1031 snd_pcm_direct_t *dmix = pcm->private_data;
1041 int snd_pcm_direct_hw_free(snd_pcm_t *pcm ATTRIBUTE_UNUSED)
1043 /* values are cached in the pcm structure */
1047 int snd_pcm_direct_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
1049 if (params->tstamp_type != pcm->tstamp_type)
1052 /* values are cached in the pcm structure */
1056 int snd_pcm_direct_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t * info)
1058 return snd_pcm_channel_info_shm(pcm, info, -1);
1061 int snd_pcm_direct_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED)
1066 int snd_pcm_direct_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED)
1071 snd_pcm_chmap_query_t **snd_pcm_direct_query_chmaps(snd_pcm_t *pcm)
1073 snd_pcm_direct_t *dmix = pcm->private_data;
1104 snd_pcm_chmap_t *snd_pcm_direct_get_chmap(snd_pcm_t *pcm)
1106 snd_pcm_direct_t *dmix = pcm->private_data;
1110 int snd_pcm_direct_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
1112 snd_pcm_direct_t *dmix = pcm->private_data;
1116 int snd_pcm_direct_prepare(snd_pcm_t *pcm)
1118 snd_pcm_direct_t *dmix = pcm->private_data;
1136 snd_pcm_direct_check_interleave(dmix, pcm);
1143 int snd_pcm_direct_resume(snd_pcm_t *pcm)
1145 snd_pcm_direct_t *dmix = pcm->private_data;
1433 SNDERR("unable to use hardware pcm with fd more than one!!!");
1481 SNDERR("unable to info for slave pcm");
1680 int snd_pcm_direct_check_interleave(snd_pcm_direct_t *dmix, snd_pcm_t *pcm)
1687 bits = snd_pcm_format_physical_width(pcm->format);
1694 src_areas = snd_pcm_mmap_areas(pcm);
1822 err = snd_config_search_definition(root, "pcm", str, &pcm_conf);
1844 if (snd_config_search(pcm_conf, "pcm", &pcm_conf) >= 0) {
1853 if (snd_config_search(pcm_conf, "pcm",
1946 if (snd_config_search(root, "defaults.pcm.dmix_max_periods", &n) >= 0) {
2128 void snd_pcm_direct_reset_slave_ptr(snd_pcm_t *pcm, snd_pcm_direct_t *dmix,
2134 pcm->buffer_size <= pcm->period_size * 2))
2140 ((dmix->slave_period_size * SEC_TO_MS) / pcm->rate) < LOW_LATENCY_PERIOD_TIME))