Re: 2.6.25-mm1 (snd-pcsp causes driver conflict)

From: Stas Sergeev
Date: Mon Apr 21 2008 - 14:25:29 EST


Hello.

Takashi Iwai wrote:
> [Added snd-pcsp author to Cc]
Thanks.

> Seems that snd-pcsp registers as "pcspkr", which is identical with
> input pc-speaker driver. Does the patch below fix the problem?
Actually it does not. The reason is that
then it fails to match the platform device,
which is created in arch/x86/kernel/pcspeaker.c,
with the name of "pcspkr".

But we already had the patch for that in an
alsa tree, it probably got forgotten. Here
it is:
http://hg-mirror.alsa-project.org/alsa-driver/raw-file/90eeee75052f/utils/patches/pcsp-kernel-2.6.22-01.diff

Also attaching it here.
It simply disables the pcspkr driver in
Kconfig. snd-pcsp has the copy of that
driver, so that only one driver would
drive the device.

Does that fix look good? (presumably acked
by Takashi, otherwise the patch wouldn't
be in an alsa tree)

---------------

- Prevent pcspkr driver from being built
together with snd-pcsp. snd-pcsp fully
superceeds pcspkr.
- Update CREDITS file. :)

Signed-off-by: Stas Sergeev <stsp@xxxxxxxx>
Acked-by: Takashi Iwai <tiwai@xxxxxxx>
diff -urN linux-2.6.24/CREDITS linux-2.6.24-pcsp-kern/CREDITS
--- linux-2.6.24/CREDITS 2008-01-27 16:13:20.000000000 +0300
+++ linux-2.6.24-pcsp-kern/CREDITS 2008-01-27 17:03:31.000000000 +0300
@@ -403,6 +403,8 @@
N: Erik Inge Bolsø
E: knan@xxxxxxxxxxxxx
D: Misc kernel hacks
+D: Updated PC speaker driver for 2.3
+S: Norway

N: Andreas E. Bombe
E: andreas.bombe@xxxxxxxxxxxxxxxxx
@@ -3109,6 +3111,12 @@
S: Sunnyvale, California 94088-4132
S: USA

+N: Stas Sergeev
+E: stsp@xxxxxxxxxxxxxxxxxxxxx
+D: PCM PC-Speaker driver
+D: misc fixes
+S: Russia
+
N: Simon Shapiro
E: shimon@xxxxxxxxxxxxx
W: http://www.-i-Connect.Net/~shimon
diff -urN linux-2.6.24/drivers/input/misc/Kconfig linux-2.6.24-pcsp-kern/drivers/input/misc/Kconfig
--- linux-2.6.24/drivers/input/misc/Kconfig 2008-01-27 16:13:43.000000000 +0300
+++ linux-2.6.24-pcsp-kern/drivers/input/misc/Kconfig 2008-01-27 17:03:31.000000000 +0300
@@ -14,7 +14,8 @@

config INPUT_PCSPKR
tristate "PC Speaker support"
- depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES
+ depends on (ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || \
+ PPC_PSERIES) && SND_PCSP=n
help
Say Y here if you want the standard PC Speaker to be used for
bells and whistles.