static void abe_dbg_stop_dma(struct omap_abe *abe)
{
    /* Since we are using self linking, there is a
    chance that the DMA as re-enabled the channel just after disabling it */
    while (omap_get_dma_active_status(abe->debugfs.dma_ch))
        omap_stop_dma(abe->debugfs.dma_ch);

    if (abe->debugfs.circular)
        omap_dma_unlink_lch(abe->debugfs.dma_ch, abe->debugfs.dma_ch);

    omap_free_dma(abe->debugfs.dma_ch);
    pm_runtime_put_sync(abe->dev);
}
Пример #2
0
static int omap_pcm_hw_free(struct snd_pcm_substream *substream)
{
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct omap_runtime_data *prtd = runtime->private_data;

	if (prtd->dma_data == NULL)
		return 0;

	omap_dma_unlink_lch(prtd->dma_ch, prtd->dma_ch);
	omap_free_dma(prtd->dma_ch);
	prtd->dma_data = NULL;

	snd_pcm_set_runtime_buffer(substream, NULL);

	return 0;
}
Пример #3
0
/***************************************************************************************
 *
 * DMA channel requests Freeing
 *
 **************************************************************************************/
static void omap_sound_dma_unlink_lch(void *data)
{
	audio_stream_t *s = (audio_stream_t *) data;
	int *chan = s->lch;
	int i;

	FN_IN;
	if (!s->linked) {
		FN_OUT(1);
		return;
	}
	for (i = 0; i < nr_linked_channels; i++) {
		int cur_chan = chan[i];
		int nex_chan =
		    ((nr_linked_channels - 1 ==
		      i) ? chan[0] : chan[i + 1]);
		omap_dma_unlink_lch(cur_chan, nex_chan);
	}
	s->linked = 0;
	FN_OUT(0);
}