Lines Matching refs:params
281 struct snd_pcm_hw_params *params; in setHardwareParams() local
287 params = (snd_pcm_hw_params*) calloc(1, sizeof(struct snd_pcm_hw_params)); in setHardwareParams()
288 if (!params) { in setHardwareParams()
292 param_init(params); in setHardwareParams()
293 param_set_mask(params, SNDRV_PCM_HW_PARAM_ACCESS, in setHardwareParams()
295 param_set_mask(params, SNDRV_PCM_HW_PARAM_FORMAT, in setHardwareParams()
297 param_set_mask(params, SNDRV_PCM_HW_PARAM_SUBFORMAT, in setHardwareParams()
300 param_set_min(params, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, periodBytes); in setHardwareParams()
301 param_set_int(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 16); in setHardwareParams()
302 param_set_int(params, SNDRV_PCM_HW_PARAM_FRAME_BITS, in setHardwareParams()
304 param_set_int(params, SNDRV_PCM_HW_PARAM_CHANNELS, in setHardwareParams()
306 param_set_int(params, SNDRV_PCM_HW_PARAM_RATE, sampleRate); in setHardwareParams()
307 param_set_hw_refine(txHandle, params); in setHardwareParams()
309 if (param_set_hw_params(txHandle, params)) { in setHardwareParams()
314 param_dump(params); in setHardwareParams()
316 txHandle->period_size = pcm_period_size(params); in setHardwareParams()
317 txHandle->buffer_size = pcm_buffer_size(params); in setHardwareParams()
330 struct snd_pcm_sw_params* params; in setSoftwareParams() local
332 params = (snd_pcm_sw_params*) calloc(1, sizeof(struct snd_pcm_sw_params)); in setSoftwareParams()
333 if (!params) { in setSoftwareParams()
338 params->tstamp_mode = SNDRV_PCM_TSTAMP_NONE; in setSoftwareParams()
339 params->period_step = 1; in setSoftwareParams()
341 params->avail_min = (pcm->flags & PCM_MONO) ? pcm->period_size/2 : pcm->period_size/4; in setSoftwareParams()
344 params->start_threshold = (pcm->flags & PCM_MONO) ? pcm->period_size*8 : pcm->period_size*4; in setSoftwareParams()
345 params->xfer_align = (pcm->flags & PCM_MONO) ? pcm->period_size*8 : pcm->period_size*4; in setSoftwareParams()
347 params->start_threshold = (pcm->flags & PCM_MONO) ? pcm->period_size/2 : pcm->period_size/4; in setSoftwareParams()
348 params->xfer_align = (pcm->flags & PCM_MONO) ? pcm->period_size/2 : pcm->period_size/4; in setSoftwareParams()
350 params->stop_threshold = pcm->buffer_size; in setSoftwareParams()
352 params->xfer_align = (pcm->flags & PCM_MONO) ? pcm->period_size/2 : pcm->period_size/4; in setSoftwareParams()
353 params->silence_size = 0; in setSoftwareParams()
354 params->silence_threshold = 0; in setSoftwareParams()
356 if (param_set_sw_params(pcm, params)) { in setSoftwareParams()