Skip to contentSkip to conversation

Fixed broken sound/mips/au1x00.c

PATCH New Freddy Spierenburg 1 participant 1 message Mar 31, 2006 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed broken sound/mips/au1x00.c

Hi Jaroslav,

Since kernel version 2.6.16 sound/mips/au1x00.c gives me compile time errors.

The enclosed patch fixes the compile time errors and the kernel panic that was also hidden in the code. Now things are working smoothly again.

Signature · 4 lines
$ cat ~/.signature
Freddy Spierenburg <[email protected]>  http://freddy.snarl.nl/
GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1  E588 6F17 FD5D 7941 D1E1
$ # Please read http://www.ietf.org/rfc/rfc2015.txt before complain!
sound/mips/au1x00.c +4 -2
@@ -43,6 +43,7 @@
 #include <sound/core.h>
 #include <sound/initval.h>
 #include <sound/pcm.h>
+#include <sound/pcm_params.h>
 #include <sound/ac97_codec.h>
 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-au1x00/au1000_dma.h>
@@ -153,6 +154,7 @@
 {
 	struct snd_pcm_substream *substream = stream->substream;
 	struct snd_pcm_runtime *runtime = substream->runtime;
+	struct au1000_period *pointer;
 	unsigned long dma_start;
 	int i;
 
@@ -638,8 +640,6 @@
 	au1000 = card->private_data;
 	/* so that snd_au1000_free will work as intended */
 	au1000->card = card;
-	au1000->stream[PLAYBACK]->dma = -1;
-	au1000->stream[CAPTURE]->dma = -1;
  	au1000->ac97_res_port = NULL;
 	au1000->stream[PLAYBACK] = kmalloc(sizeof(struct audio_stream), GFP_KERNEL);
 	au1000->stream[CAPTURE] = kmalloc(sizeof(struct audio_stream), GFP_KERNEL);
@@ -648,6 +648,8 @@
 		snd_card_free(card);
 		return -ENOMEM;
 	}
+	au1000->stream[PLAYBACK]->dma = -1;
+	au1000->stream[CAPTURE]->dma = -1;
 
 	if ((err = snd_au1000_ac97_new(au1000)) < 0 ) {
 		snd_card_free(card);