Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 304629
Collapse All | Expand All

(-)a/src/pcm/pcm_hw.c (-12 / +14 lines)
Lines 338-355 static int snd_pcm_hw_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params) Link Here
338
	return 0;
338
	return 0;
339
}
339
}
340
340
341
static int snd_pcm_hw_hw_free(snd_pcm_t *pcm)
342
{
343
	snd_pcm_hw_t *hw = pcm->private_data;
344
	int fd = hw->fd, err;
345
	if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) {
346
		err = -errno;
347
		SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed");
348
		return err;
349
	}
350
	return 0;
351
}
352
353
static void snd_pcm_hw_close_timer(snd_pcm_hw_t *hw)
341
static void snd_pcm_hw_close_timer(snd_pcm_hw_t *hw)
354
{
342
{
355
	if (hw->period_timer) {
343
	if (hw->period_timer) {
Lines 421-426 static int snd_pcm_hw_change_timer(snd_pcm_t *pcm, int enable) Link Here
421
	} else {
409
	} else {
422
		snd_pcm_hw_close_timer(hw);
410
		snd_pcm_hw_close_timer(hw);
423
		pcm->fast_ops = &snd_pcm_hw_fast_ops;
411
		pcm->fast_ops = &snd_pcm_hw_fast_ops;
412
		hw->period_event = 0;
413
	}
414
	return 0;
415
}
416
417
static int snd_pcm_hw_hw_free(snd_pcm_t *pcm)
418
{
419
	snd_pcm_hw_t *hw = pcm->private_data;
420
	int fd = hw->fd, err;
421
	snd_pcm_hw_change_timer(pcm, 0);
422
	if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) {
423
		err = -errno;
424
		SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed");
425
		return err;
424
	}
426
	}
425
	return 0;
427
	return 0;
426
}
428
}

Return to bug 304629