On Tue, 4 Sep 2007, Takashi Iwai wrote:
At Tue, 04 Sep 2007 14:54:39 +0100, Mauro Carvalho Chehab wrote:
SND_BT87X_BOARD_HAUPPAUGE878,
SND_BT87X_BOARD_OSPREY2x0,
SND_BT87X_BOARD_OSPREY440,
SND_BT87X_BOARD_ATI_TVWONDER,
SND_BT87X_BOARD_WINFAST2000,
SND_BT87X_BOARD_VOODOOTV_200,
SND_BT87X_BOARD_AVPHONE98,
Hmm... Maybe it would be a good idea to move the board numbers from linux/drivers/media/video/bt8xx/bttv.h to a separate header (maybe something like /include/media/bt8xx-cards.h) and use the same board IDs for both -alsa and -v4l drivers.
This will make easier to associate the audio and video parts for troubleshooting and newer developments.
Yes, it sounds like a good idea.
There are few drawbacks.
First, there are like 20x more cards supported by the bttv driver than by the bt87x driver. It's going to produce a very sparse card database in the ALSA driver. Note that for the most part, __initdata doesn't work, so you can't say "it'll just be dropped after the driver loads."
Secondly, before this patch there was virtually no difference in the configuration for the different supported cards. After it, most of the cards are still exactly the same. It possible to re-use the same generic configuration entry for most of the supported cards. If you use the bttv IDs, it's not.
And finally, bt87x is under ALSA but bttv is under linuxtv. What would include/media/bt8xx-cards.h be under, alsa or linuxtv? Will people have to submit patches to both projects (which use different repository formats locally, so you can't just CC the same patch)? I did one patch that touched both linuxtv and alsa files, and it was a PITA, for a very simple patch. Took a month. Emails to different people. Merge conflicts.
And if both linuxtv and alsa use the same header, what happens if they don't push the changes to GIT at the exact same time? You'll have patches in one subsystem that are dependant on the other subsystem. How will they make the same merge window?