Commit 3cef8020 authored by andrzej zaborowski's avatar andrzej zaborowski Committed by Tony Lindgren

[PATCH] OMAP audio DMA changes for 310 CPUs

Avoid restarting McBSP hardware after every DMA transfer to OMAP audio
devices on OMAP310, restart only DMA. Also avoid trying to link DMA
channels together as this feature isn't supported on 310 processors.
Apply on top of "[PATCH 1/5] Change all omap15xx devices to use
similar DMA handling than h6300 uses".
Signed-off-by: default avatarAndrzej Zaborowski <balrog@zabor.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 63070a03
...@@ -200,7 +200,7 @@ int omap_request_alsa_sound_dma(int device_id, const char *device_name, ...@@ -200,7 +200,7 @@ int omap_request_alsa_sound_dma(int device_id, const char *device_name,
} }
/* Chain the channels together */ /* Chain the channels together */
if (!cpu_is_omap1510()) if (!cpu_is_omap15xx())
omap_sound_dma_link_lch(data); omap_sound_dma_link_lch(data);
spin_unlock(&dma_list_lock); spin_unlock(&dma_list_lock);
...@@ -251,7 +251,7 @@ int omap_free_alsa_sound_dma(void *data, int **channels) ...@@ -251,7 +251,7 @@ int omap_free_alsa_sound_dma(void *data, int **channels)
} }
chan = (*channels); chan = (*channels);
if (!cpu_is_omap1510()) if (!cpu_is_omap15xx())
omap_sound_dma_unlink_lch(data); omap_sound_dma_unlink_lch(data);
for (i = 0; i < nr_linked_channels; i++) { for (i = 0; i < nr_linked_channels; i++) {
int cur_chan = chan[i]; int cur_chan = chan[i];
...@@ -349,7 +349,8 @@ static int audio_start_dma_chain(struct audio_stream *s) ...@@ -349,7 +349,8 @@ static int audio_start_dma_chain(struct audio_stream *s)
omap_start_dma(channel); omap_start_dma(channel);
s->started = 1; s->started = 1;
s->hw_start(); /* start McBSP interface */ s->hw_start(); /* start McBSP interface */
} } else if (cpu_is_omap310())
omap_start_dma(channel);
/* else the dma itself will progress forward with out our help */ /* else the dma itself will progress forward with out our help */
FN_OUT(0); FN_OUT(0);
return 0; return 0;
......
...@@ -203,7 +203,7 @@ static void audio_process_dma(struct audio_stream *s) ...@@ -203,7 +203,7 @@ static void audio_process_dma(struct audio_stream *s)
* irq from DMA after the first transfered/played buffer. * irq from DMA after the first transfered/played buffer.
* (invocation of callback_omap_alsa_sound_dma() method). * (invocation of callback_omap_alsa_sound_dma() method).
*/ */
if (cpu_is_omap15xx()) { if (cpu_is_omap1510()) {
omap_stop_alsa_sound_dma(s); omap_stop_alsa_sound_dma(s);
} }
ret = omap_start_alsa_sound_dma(s, ret = omap_start_alsa_sound_dma(s,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment