Re: [staging-next V2] staging/easycap: fix build when SND is not enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun,  6 Feb 2011 23:50:42 +0200 Tomas Winkler wrote:

> Fix easycap build when CONFIG_SOUND is enabled but CONFIG_SND is
> not enabled.
> 
> use choice construct to select between ALSA and OSS API binding
> 
> drivers/built-in.o: In function `easycap_usb_disconnect':
> easycap_main.c:(.text+0x2aba20): undefined reference to `snd_card_free'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b784b): undefined reference to `snd_card_create'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b78fb): undefined reference to `snd_pcm_new'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b7916): undefined reference to `snd_pcm_set_ops'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b795b): undefined reference to `snd_card_register'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b79d8): undefined reference to `snd_card_free'
> drivers/built-in.o: In function `easycap_alsa_probe':
> (.text+0x2b7a78): undefined reference to `snd_card_free'
> drivers/built-in.o: In function `easycap_alsa_complete':
> (.text+0x2b7e68): undefined reference to `snd_pcm_period_elapsed'
> drivers/built-in.o:(.data+0x2cae8): undefined reference to `snd_pcm_lib_ioctl'
> 
> Reported-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Cc: R.M. Thomas <rmthomas@xxxxxxxxxxx>
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> ---
>  drivers/staging/easycap/Kconfig |   20 ++++++++++++++++++--
>  1 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/easycap/Kconfig b/drivers/staging/easycap/Kconfig
> index 5072cf8..f31940d 100644
> --- a/drivers/staging/easycap/Kconfig
> +++ b/drivers/staging/easycap/Kconfig
> @@ -1,6 +1,6 @@
>  config EASYCAP
>  	tristate "EasyCAP USB ID 05e1:0408 support"
> -	depends on USB && VIDEO_DEV && SOUND
> +	depends on USB && VIDEO_DEV && (SND || SOUND_OSS_CORE)
>  
>  	---help---
>  	  This is an integrated audio/video driver for EasyCAP cards with
> @@ -15,9 +15,24 @@ config EASYCAP
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called easycap
>  
> +choice
> +        prompt "Sound Interface"
> +        depends on EASYCAP
> +        default EASYCAP_SND
> +	---help---
> +
> +config EASYCAP_SND
> +        bool "ALSA"
> +	depends on SND
> +
> +        ---help---
> +          Say 'Y' if you want to use ALSA interface
> +
> +	  This will disable Open Sound System (OSS) binding.
> +
>  config EASYCAP_OSS
>  	bool "OSS (DEPRECATED)"
> -	depends on EASYCAP && SOUND_OSS_CORE
> +	depends on SOUND_OSS_CORE
>  
>  	---help---
>  	  Say 'Y' if you prefer Open Sound System (OSS) interface
> @@ -26,6 +41,7 @@ config EASYCAP_OSS
>  
>  	  Once binding to ALSA interface will be stable this option will be
>            removed.
> +endchoice
>  
>  config EASYCAP_DEBUG
>  	bool "Enable EasyCAP driver debugging"
> -- 

Hi,

This patch works for having only OSS enabled, but when I only have SND
enabled and answer No to kconfig options under SND, there are still some
build errors.  Looks like the driver requires SND_PCM, which is selected
by SND_PCM_OSS.  I.e., part of the ALSA interfacing in this driver requires
SND_PCM (or SND_PCM_OSS), not just SND.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux