In package/base/linux, the following patch files no longer apply cleanly to the current
kernel version. they need to be deiabled/removed, or freshened. (the kernel builds fine
without them, at least on MIPS64)
adaptec-usbxchange.patch
tg3-macmini-2012.patch
acpi-dsdt-initrd-2.6.29.patch
Also, the white-space is off in svn version of oss-max-dma-channels.patch.mips64, so that
it fails to apply.
attached is a corrected version.
Jan
MAX_DMA_CHANNELS is left undefined so kernel/dma.c builds only the dummy
versions but sound/oss/soundcard.c doesn't support the same thing except
with a rather crude patch following what kernel/dma.c already does such
as below. It gets everything to build for the affected systems but I
doubt much (if anything) will be working.
At this stage I just wanna get rid of OSS for MIPS entirely; it has very
little life if any left.
Ralf
Signed-off-by: Ralf Baechle <[email protected]>
sound/oss/soundcard.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
Adapted for T2 Kernel 3.9.9 by JLR
--- linux-3.9/sound/oss/soundcard.c.vanilla 2013-08-13 11:45:48.461184074
-0400
+++ linux-3.9/sound/oss/soundcard.c 2013-08-13 11:52:32.779441920 -0400
@@ -66,7 +66,10 @@
int sound_dmap_flag = 0;
#endif
+#ifdef MAX_DMA_CHANNELS
static char dma_alloc_map[MAX_DMA_CHANNELS];
+#endif
+
#define DMA_MAP_UNAVAIL 0
#define DMA_MAP_FREE 1
@@ -594,11 +597,13 @@
sequencer_unload();
+#ifdef MAX_DMA_CHANNELS
for (i = 0; i < MAX_DMA_CHANNELS; i++)
if (dma_alloc_map[i] != DMA_MAP_UNAVAIL) {
printk(KERN_ERR "Sound: Hmm, DMA%d was left allocated -
fixed\n", i);
sound_free_dma(i);
}
+#endif
for (i = 0; i < sound_nblocks; i++)
vfree(sound_mem_blocks[i]);
@@ -614,6 +619,7 @@
int sound_alloc_dma(int chn, char *deviceID)
{
+#ifdef MAX_DMA_CHANNELS
int err;
if ((err = request_dma(chn, deviceID)) != 0)
@@ -622,11 +628,15 @@
dma_alloc_map[chn] = DMA_MAP_FREE;
return 0;
+#else
+ return 1; /* No ISA DMA supported */
+#endif
}
EXPORT_SYMBOL(sound_alloc_dma);
int sound_open_dma(int chn, char *deviceID)
{
+#ifdef MAX_DMA_CHANNELS
if (!valid_dma(chn)) {
printk(KERN_ERR "sound_open_dma: Invalid DMA channel %d\n",
chn);
return 1;
@@ -638,27 +648,34 @@
}
dma_alloc_map[chn] = DMA_MAP_BUSY;
return 0;
+#else
+ return 1; /* No ISA DMA supported */
+#endif
}
EXPORT_SYMBOL(sound_open_dma);
void sound_free_dma(int chn)
{
+#ifdef MAX_DMA_CHANNELS
if (dma_alloc_map[chn] == DMA_MAP_UNAVAIL) {
/* printk( "sound_free_dma: Bad access to DMA channel %d\n",
chn); */
return;
}
free_dma(chn);
dma_alloc_map[chn] = DMA_MAP_UNAVAIL;
+#endif
}
EXPORT_SYMBOL(sound_free_dma);
void sound_close_dma(int chn)
{
+#ifdef MAX_DMA_CHANNELS
if (dma_alloc_map[chn] != DMA_MAP_BUSY) {
printk(KERN_ERR "sound_close_dma: Bad access to DMA channel
%d\n", chn);
return;
}
dma_alloc_map[chn] = DMA_MAP_FREE;
+#endif
}
EXPORT_SYMBOL(sound_close_dma);
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2