At Mon, 16 Feb 2009 07:43:51 +0100, Krzysztof Helt wrote:
From: Krzysztof Helt krzysztof.h1@wp.pl
Also, the patch adds recognition if the chip is cs4236b+ or earlier part. This unifies drivers for both cs4232 and cs4236+ chips. It allows to use the PnP BIOS detection for the cs4236+ chips. Previously, only the snd-cs4232 could be detected by the PnP BIOS.
The cs4232+ cards reports two separate PnP BIOS ids.
The patch adds search for the second id to find out resources assigned to a control port.
Signed-off-by: Krzysztof Helt krzysztof.h1@wp.pl
Thanks for the patch. Unfortunately the patch can't be applied to the latest sound git tree. Could you rebase?
More comments below.
The cs4232 and cs4236 are the same now and one can be removed.
Stanley tested this patch and it worked for him (cs4232 chip in Tecra 500).
I have tested it on Dell Latitude CP (cs4237b chip) which is now correctly recognized. Previously, it was recognized as a basic cs4236 chip. Also, I have tested it with Maxi Sound 32 PnP card (ISA PnP cs4236b) with success.
A side effect of this approach is that on ISA PnP cards the driver reports an error of PnP BIOS detection everytime it is loaded. This is due to driver rejecting the PnP BIOS initialization for ISA PnP cards. Probably, the earlier cs4232 driver worked the same way.
Fair enough. I think it's a good idea to merge them anyway.
diff --git a/include/sound/wss.h b/include/sound/wss.h index fd01f22..6d65f32 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h @@ -154,6 +154,7 @@ int snd_wss_create(struct snd_card *card, unsigned short hardware, unsigned short hwshare, struct snd_wss **rchip); +int snd_wss_free(struct snd_wss *chip); int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); int snd_wss_mixer(struct snd_wss *chip); diff --git a/sound/isa/cs423x/Makefile b/sound/isa/cs423x/Makefile index 5870ca2..dfdd96d 100644 --- a/sound/isa/cs423x/Makefile +++ b/sound/isa/cs423x/Makefile @@ -10,6 +10,6 @@ snd-cs4236-objs := cs4236.o
# Toplevel Module Dependency obj-$(CONFIG_SND_CS4231) += snd-cs4231.o -obj-$(CONFIG_SND_CS4232) += snd-cs4232.o +obj-$(CONFIG_SND_CS4232) += snd-cs4232.o snd-cs4236-lib.o obj-$(CONFIG_SND_CS4236) += snd-cs4236.o snd-cs4236-lib.o
Let's remove cs4232 completely, then. Otherwise this will give the duplicated symbols errors. It's fine to rename to cs423x, for example, if you'd like. (And don't forget to change Kconfig entries.)
In anyway, we can provide module aliases for old module names.
- if (chip->hardware & WSS_HW_CS4236B_MASK) {
snd_wss_free(chip);
It's not so nice, but acceptable as a first step for integration.
- /* prepare second id */
- strcpy(cid, pdev->id[0].id);
- cid[5] = '1';
- cdev = NULL;
- list_for_each(pos, &(pdev->protocol->devices)) {
Better to use list_for_each_entry().
Takashi