/* Set the SampleRate of the SRC's attached to the given DMA engine.  */
static void vortex_adb_setsrc(vortex_t *vortex, int adbdma, unsigned int rate, int dir)
/* Set the SampleRate of the SRC's attached to the given DMA engine.  */
static void vortex_adb_setsrc(vortex_t *vortex, int adbdma, unsigned int rate, int dir)
{
	stream_t *stream = &(vortex->dma_adb[adbdma]);
	int i, cvrt;
	if (dir)
		cvrt = SRC_RATIO(rate, 48000);
	else
		cvrt = SRC_RATIO(48000, rate);
	for (i = 0; i < NR_SRC; i++) {
		if (stream->resources[VORTEX_RESOURCE_SRC] & (1 << i))
			vortex_src_setupchannel(vortex, i, cvrt, 0, 0, i, dir, 1, cvrt, dir);
	}
}