[alsa-devel] [PATCH v6] media: Add stk1160 new driver

Takashi Iwai tiwai at suse.de
Fri Jul 27 10:03:03 CEST 2012

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 at redhat.com>
> Cc: Takashi Iwai <tiwai at suse.de>
> Cc: Hans Verkuil <hverkuil at xs4all.nl>
> Cc: Sylwester Nawrocki <sylvester.nawrocki at gmail.com>
> Signed-off-by: Ezequiel Garcia <elezegarcia at 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);
static inline int stk1160_ac97_register(struct stk1160 *dev) { return 0; }
static inline int stk1160_ac97_unregister(struct stk1160 *dev) { return 0; }



More information about the Alsa-devel mailing list