sb_card.c cleanup
Quoted 5 lines · Paul Laufer
Overview: After Alex's last patch the various sb_init_* functions were quite redundant, so I've written a generic
sb_initfunction. I also reorganizedsb_isapnp_list. I raided the ALSA drivers for all the ISAPnP codes for CTL and ESS chips and added them to the table (as I believe Alan suggested). Also returns the 2.3.99pre2dev->activebehavior, which was
[...] Well done Paul, but i have some comments...
first, now that we use find_card instead of find_dev we loose some automagic compatibility .. i.e. any sb "compatible" card not listed in the table but with a know logical device id will not work as before.
second, the "already active thing". This was done to allow the user to setup manually it's card via the /proc/isapnp interface.
Obviously the second instance of the driver will get in the same card. There's no easy solution to this, but you perfectly know how to solve this:
:-)
Do you remember your patch for multiple detection in a round? I think it's time to merge it in.
Then you could also take in account
if the card has been initialized by the driver
or not.
There's still the problem with ALS007 type card which obviously won't work....
btw the card was no more in my -pre3 kernel.. maybe i've removed it by a mistake.. :-/
I also sent a patch to Linus a few hours ago..
but it should apply with some fuzz...sorry.
Signature · 3 lines
- *Alex* - http://freepage.logicom.it/azummo/
Quoted 11 lines · Alessandro Zummo
Quoted 5 lines · Paul Laufer
Overview: After Alex's last patch the various sb_init_* functions were quite redundant, so I've written a generic
sb_initfunction. I also reorganizedsb_isapnp_list. I raided the ALSA drivers for all the ISAPnP codes for CTL and ESS chips and added them to the table (as I believe Alan suggested). Also returns the 2.3.99pre2dev->activebehavior, which was[...] Well done Paul, but i have some comments...
Thanks :) Feedback is very helpful.
Quoted 4 lines
first, now that we use
find_cardinstead offind_devwe loose some automagic compatibility .. i.e. any sb "compatible" card not listed in the table but with a know logical device id will not work as before.
Hrm. The only cards that would automagically match the logical device ids there were Creative Labs cards. No other vendors have CTL as their ISAPnP vendor id. And we know what all the ISAPnP ids are for these Creative Labs and ESS cards, so I don't see the problem. Besides, I am willing to handle a few "My card isn't autodetected anymore, what happened?" bug reports to l-k for a code cleanup. Fixing these is a simple matter of adding entries to sb_isapnp_list.
Quoted 8 lines
second, the "already active thing". This was done to allow the user to setup manually it's card via the
/proc/isapnpinterface.Obviously the second instance of the driver will get in the same card. There's no easy solution to this, but you perfectly know how to solve this:
Quoted 8 lines
:-)
Do you remember your patch for multiple detection in a round? I think it's time to merge it in.
Then you could also take in account
if the card has been initialized by the driver
or not.
I thought that if the user went through all the trouble of messing with /proc/isapnp that he could use isapnp=0 and enter in the paramaters with module options, as before. But I also like the multiple detection scheme. I had stopped working on it after not hearing back from Alan about the idea.
Quoted 5 lines
There's still the problem with ALS007 type card which obviously won't work....
btw the card was no more in my -pre3 kernel.. maybe i've removed it by a mistake.. :-/
Quoted 9 lines
I also sent a patch to Linus a few hours ago..
but it should apply with some fuzz...sorry.Signature · 3 lines
- *Alex* - http://freepage.logicom.it/azummo/
Ok, I'll rework the multiple card detection back in, and leave your "already active" behavior alone. Then I'll repost and have another round of comments and testing.
Paul Laufer
Quoted 5 lines · Paul Laufer
Quoted 2 lines
sb "compatible" card not listed in the table but with a know logical device id will not work as before.
vendor id. And we know what all the ISAPnP ids are for these Creative Labs and ESS cards, so I don't see the problem. Besides, I am willing to handle
if we have (quite) all of them this is no more a problem.
Quoted 7 lines
Quoted 3 lines
Then you could also take in account
if the card has been initialized by the driver
or not.module options, as before. But I also like the multiple detection scheme. I had stopped working on it after not hearing back from Alan about the idea.
Alan is quite busy..but i'm sure he likes it.. also
because it defaults to multiple=0 (isn't it? :-) , so nothing is changed for the normal user.
Here is the latest patch i sent to Linus.. it's against pre3 Eventually you can patch against pre3+thispatch.
Signature · 3 lines
- *Alex* - http://freepage.logicom.it/azummo/