aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/sh/drivers/dma/dma-api.c7
-rw-r--r--include/asm-sh/dma.h1
-rw-r--r--sound/sh/aica.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
index cf8e1199433..76ed816d9a2 100644
--- a/arch/sh/drivers/dma/dma-api.c
+++ b/arch/sh/drivers/dma/dma-api.c
@@ -31,8 +31,8 @@ struct dma_info *get_dma_info(unsigned int chan)
* the channel is.
*/
list_for_each_entry(info, &registered_dmac_list, list) {
- if ((chan < info->first_channel_nr) ||
- (chan >= info->first_channel_nr + info->nr_channels))
+ if ((chan < info->first_vchannel_nr) ||
+ (chan >= info->first_vchannel_nr + info->nr_channels))
continue;
return info;
@@ -82,7 +82,7 @@ struct dma_channel *get_dma_channel(unsigned int chan)
for (i = 0; i < info->nr_channels; i++) {
channel = &info->channels[i];
- if (channel->chan == chan)
+ if (channel->vchan == chan)
return channel;
}
@@ -369,6 +369,7 @@ int register_dmac(struct dma_info *info)
}
total_channels = get_nr_channels();
+ info->first_vchannel_nr = total_channels;
for (i = 0; i < info->nr_channels; i++) {
struct dma_channel *chan = &info->channels[i];
diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h
index 6034d4a29e7..4c75b70b641 100644
--- a/include/asm-sh/dma.h
+++ b/include/asm-sh/dma.h
@@ -111,6 +111,7 @@ struct dma_info {
struct list_head list;
int first_channel_nr;
+ int first_vchannel_nr;
};
struct dma_chan_caps {
diff --git a/sound/sh/aica.h b/sound/sh/aica.h
index 8c11e3d10a5..d098baaa011 100644
--- a/sound/sh/aica.h
+++ b/sound/sh/aica.h
@@ -52,7 +52,7 @@
#define AICA_CHANNEL1_OFFSET 0x21000
#define CHANNEL_OFFSET 0x10000
-#define AICA_DMA_CHANNEL 0
+#define AICA_DMA_CHANNEL 5
#define AICA_DMA_MODE 5
#define SND_AICA_DRIVER "AICA"