Lines Matching refs:params
460 struct snd_pcm_hw_params *params;
473 params = calloc(1, sizeof(struct snd_pcm_hw_params));
474 if (!params)
477 param_init(params);
478 if (ioctl(fd, SNDRV_PCM_IOCTL_HW_REFINE, params)) {
485 return (struct pcm_params *)params;
488 free(params);
497 struct snd_pcm_hw_params *params = (struct snd_pcm_hw_params *)pcm_params;
499 if (params)
500 free(params);
551 struct snd_pcm_hw_params *params = (struct snd_pcm_hw_params *)pcm_params;
554 if (!params)
561 return param_get_min(params, p);
567 struct snd_pcm_hw_params *params = (struct snd_pcm_hw_params *)pcm_params;
570 if (!params)
577 return param_get_max(params, p);
606 struct snd_pcm_hw_params params;
632 param_init(¶ms);
633 param_set_mask(¶ms, SNDRV_PCM_HW_PARAM_FORMAT,
635 param_set_mask(¶ms, SNDRV_PCM_HW_PARAM_SUBFORMAT,
637 param_set_min(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, config->period_size);
638 param_set_int(¶ms, SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
640 param_set_int(¶ms, SNDRV_PCM_HW_PARAM_FRAME_BITS,
642 param_set_int(¶ms, SNDRV_PCM_HW_PARAM_CHANNELS,
644 param_set_int(¶ms, SNDRV_PCM_HW_PARAM_PERIODS, config->period_count);
645 param_set_int(¶ms, SNDRV_PCM_HW_PARAM_RATE, config->rate);
654 params.flags |= SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP;
659 param_set_mask(¶ms, SNDRV_PCM_HW_PARAM_ACCESS,
662 param_set_mask(¶ms, SNDRV_PCM_HW_PARAM_ACCESS,
665 if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_HW_PARAMS, ¶ms)) {
666 oops(pcm, errno, "cannot set hw params");
671 config->period_size = param_get_int(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_SIZE);
672 config->period_count = param_get_int(¶ms, SNDRV_PCM_HW_PARAM_PERIODS);
728 oops(pcm, errno, "cannot set sw params");