At Thu, 26 Jul 2012 21:15:22 -0300, Ezequiel Garcia wrote:
This driver adds support for stk1160 usb bridge as used in some video/audio usb capture devices. It is a complete rewrite of staging/media/easycap driver and it's expected as a future replacement.
Cc: Mauro Carvalho Chehab mchehab@redhat.com Cc: Takashi Iwai tiwai@suse.de Cc: Hans Verkuil hverkuil@xs4all.nl Cc: Sylwester Nawrocki sylvester.nawrocki@gmail.com Signed-off-by: Ezequiel Garcia elezegarcia@gmail.com
Here we are once again,
As stk1160 allows communication with an ac97 codec chip, this driver registers a control-only sound card to allow the user to access ac97 controls.
This is achieved through snd_ac97_codec/ac97_bus drivers. Mauro suggested that this ac97 handling should be put inside -alsa tree, but I'm still not sure about it. This approach is working well in practice, but I'm not 100% confident so feedback is welcome (in particular from you alsa guys).
Well, it's a pretty small stuff and ac97 isn't developed so much any longer, so I'm fine to put your code in the video tree.
Looking through your patch, a remaining problem is that the dependency on the sound core is missing. The "select" in Kconfig doesn't fulfill the dependencies automatically but forcibly sets the value.
Selecting CONFIG_SND_AC97_CODEC will select most of other components but CONFIG_SND itself must be enabled beforehand. Thus, you need to wrap CONFIG_VIDEO_STK1160 with "depends on SND". Or split the ac97 codec part and makes it depending on SND, and define dummy functions if not defined, e.g.
#ifdef CONFIG_VIDEO_STK1160_AC97 int stk1160_ac97_register(struct stk1160 *dev); int stk1160_ac97_unregister(struct stk1160 *dev); #else static inline int stk1160_ac97_register(struct stk1160 *dev) { return 0; } static inline int stk1160_ac97_unregister(struct stk1160 *dev) { return 0; } #endif
thanks,
Takashi