stk1160: Remove stk1160-mixer and setup AC97 codec automatically.
Subsystems (2)
PATCH 1/2 stk1160: Remove stk1160-mixer and setup AC97 codec automatically.
Exposing the device's internal AC97 codec to userspace seems rather pointless. Instead the driver should setup the codec with proper values. This patch removes the mixer and sets up the codec using optimal values, i.e. the same values set by the Windows driver. This also makes the device work out-of-the-box, without the need for the user to reconfigure the device every time it's plugged in.
--- drivers/media/usb/stk1160/Kconfig | 7 -- drivers/media/usb/stk1160/stk1160-ac97.c | 121 +++++++++++-------------------- drivers/media/usb/stk1160/stk1160-core.c | 5 +- drivers/media/usb/stk1160/stk1160.h | 9 +-- 4 files changed, 45 insertions(+), 97 deletions(-)
drivers/media/usb/stk1160/Kconfig +0 -7
@@ -8,13 +8,6 @@ config VIDEO_STK1160_COMMON To compile this driver as a module, choose M here: the module will be called stk1160 -config VIDEO_STK1160_AC97 - bool "STK1160 AC97 codec support" - depends on VIDEO_STK1160_COMMON && SND - - ---help--- - Enables AC97 codec support for stk1160 driver. - config VIDEO_STK1160 tristate depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && VIDEO_STK1160_COMMON
drivers/media/usb/stk1160/stk1160-ac97.c +43 -78
152 lines not on this page · raw message
drivers/media/usb/stk1160/stk1160-core.c +1 -4
@@ -373,7 +373,7 @@ static int stk1160_probe(struct usb_interface *interface,/* select default input */ stk1160_select_input (dev); -stk1160_ac97_register (dev); +stk1160_ac97_setup (dev); rc =stk1160_video_register (dev);if (rc <0 )
@@ -411,9 +411,6 @@ static void stk1160_disconnect(struct usb_interface *interface)/* Here is the only place where isoc get released */ stk1160_uninit_isoc (dev); -/* ac97 unregister needs to be done before usb_device is cleared */ -stk1160_ac97_unregister (dev); -stk1160_clear_queue (dev);video_unregister_device (&dev->vdev);
drivers/media/usb/stk1160/stk1160.h +1 -8
@@ -197,11 +197,4 @@ int stk1160_read_reg_req_len(struct stk1160 *dev, u8 req, u16 reg,void stk1160_select_input (struct stk1160 *dev);/* Provided by stk1160-ac97.c */ -#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 - +void stk1160_ac97_setup (struct stk1160 *dev);
Signature · 1 line
2.10.1
kbuild test robot
build botreproduce:
Hi Marcel,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.9-rc2 next-20161027]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Marcel-Hasler/stk1160-Remove-stk1160-mixer-and-setup-AC97-codec-automatically/20161028-001626 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-s0-201643 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
drivers/built-in.o: In function `stk1160_probe':
>> stk1160-core.c:(.text+0x2a4b92): undefined reference to `stk1160_ac97_setup'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botreproduce:
Hi Marcel,
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.9-rc2 next-20161027]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Marcel-Hasler/stk1160-Remove-stk1160-mixer-and-setup-AC97-codec-automatically/20161028-001626 base: git://linuxtv.org/media_tree.git master config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386
All errors (new ones prefixed by >>):
>> ERROR: "stk1160_ac97_setup" [drivers/media/usb/stk1160/stk1160.ko] undefined!
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation