[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#366522: kernel-source-2.6.8: ALi M5451 Audio did not work



Package: kernel-source-2.6.8
Version: 2.6.8-16sarge2
Severity: normal


I had a problem to use ALi M5451 ALSA driver with my system.  My system 
has an M5451 rev 01 chip and the supplied driver did not activate AC97 
mixer when installed.

With many tries and errors, I happened to make a patch that works for 
me.  However, I do not have any official reference documentation, I 
cannot confirm that the patch is correct.  Can anybody confirm the 
correctness, please?

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (100, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages kernel-source-2.6.8 depends on:
ii  binutils                      2.15-6     The GNU assembler, linker and bina
ii  bzip2                         1.0.2-7    high-quality block-sorting file co
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities

-- no debconf information

*** /tmp/diff.txt
diff -u kernel-source-2.6.8/sound/pci/ali5451/ali5451.c linux/sound/pci/ali5451/ali5451.c
--- kernel-source-2.6.8/sound/pci/ali5451/ali5451.c	2004-08-14 14:38:04.000000000 +0900
+++ linux/sound/pci/ali5451/ali5451.c	2006-05-09 02:55:12.302579810 +0900
@@ -470,7 +470,7 @@
 		return ~0;
 	}
 
-	port = codec->chregs.regs.ac97read;
+	port = codec->chregs.regs.ac97write;
 
 	if (snd_ali_codec_ready(codec, port, 0) < 0)
 		return ~0;
@@ -481,7 +481,7 @@
 	dwVal |= 0x8000;				/* bit 15*/
 	if (secondary) dwVal |= 0x0080;
 
-	snd_ali_5451_poke(codec, port, dwVal);
+	outw(dwVal, codec->port + port);
 
 	if (snd_ali_stimer_ready(codec, 0) < 0)
 		return ~0;



Reply to: