Lines Matching refs:params
85 struct snd_pcm_hw_params *params;
93 params = (struct snd_pcm_hw_params*) calloc(1, sizeof(struct snd_pcm_hw_params));
94 if (!params) {
99 param_init(params);
101 param_set_mask(params, SNDRV_PCM_HW_PARAM_ACCESS,
103 param_set_mask(params, SNDRV_PCM_HW_PARAM_FORMAT, pcm->format);
104 param_set_mask(params, SNDRV_PCM_HW_PARAM_SUBFORMAT,
107 param_set_min(params, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, period);
109 param_set_min(params, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 10);
110 param_set_int(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 16);
111 param_set_int(params, SNDRV_PCM_HW_PARAM_FRAME_BITS,
113 param_set_int(params, SNDRV_PCM_HW_PARAM_CHANNELS,
115 param_set_int(params, SNDRV_PCM_HW_PARAM_RATE, pcm->rate);
116 param_set_hw_refine(pcm, params);
118 if (param_set_hw_params(pcm, params)) {
119 fprintf(stderr, "Aplay:cannot set hw params\n");
123 param_dump(params);
125 pcm->buffer_size = pcm_buffer_size(params);
126 pcm->period_size = pcm_period_size(params);
151 fprintf(stderr, "Aplay:cannot set sw params");
239 fprintf(stderr, "Aplay:params setting failed\n");
264 fprintf(stderr, "Aplay:params setting failed\n");