From cf104014bd0a04d4b8e8fccce88b761cfd7056e0 Mon Sep 17 00:00:00 2001 From: jmj Date: Tue, 27 Nov 2012 17:01:38 +0800 Subject: [PATCH] Add Mirroring function --- drivers/video/rockchip/Kconfig | 9 +++------ drivers/video/rockchip/Makefile | 1 - drivers/video/rockchip/rk_fb.c | 14 ++++++++------ sound/core/pcm_native.c | 12 ++++++------ 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig index 4bcb84ba6783..1c66e0eacc03 100755 --- a/drivers/video/rockchip/Kconfig +++ b/drivers/video/rockchip/Kconfig @@ -7,6 +7,9 @@ menuconfig FB_ROCKCHIP ---help--- Framebuffer driver for rockchip based platform +config FB_MIRRORING + bool "Mirroring support" + depends on FB_ROCKCHIP choice bool "Dual display ploy select" depends on FB_ROCKCHIP @@ -40,12 +43,6 @@ config THREE_FB_BUFFER help select y if android support three buffer,like Jelly Bean -config FB_WIMO - bool "WiMO support" - depends on FB_ROCKCHIP - default n - help - Support wimo config LCDC_RK2928 tristate "rk2928 lcdc support" diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index 4c70ad1e4176..0a2b769e0736 100755 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -1,5 +1,4 @@ obj-$(CONFIG_FB_ROCKCHIP) += rk_fb.o rkfb_sysfs.o -obj-$(CONFIG_FB_WIMO) +=wimo.o obj-$(CONFIG_LCDC_RK30) += lcdc/rk30_lcdc.o obj-$(CONFIG_LCDC_RK2928) += lcdc/rk2928_lcdc.o obj-$(CONFIG_LCDC_RK3066B) += lcdc/rk3066b_lcdc.o diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 5e4822f6e5bb..306b30cbb140 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -36,9 +36,11 @@ void rk29_backlight_set(bool on); bool rk29_get_backlight_status(void); -#ifdef FB_WIMO_FLAG -int (*video_data_to_wimo)(struct fb_info *info,u32 yuv_phy[2]) = NULL; -EXPORT_SYMBOL(video_data_to_wimo); +#ifdef CONFIG_FB_MIRRORING + + +int (*video_data_to_mirroring)(struct fb_info *info,u32 yuv_phy[2]) = NULL; +EXPORT_SYMBOL(video_data_to_mirroring); #endif static struct platform_device *g_fb_pdev; @@ -219,9 +221,9 @@ static int rk_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) #endif #endif dev_drv->pan_display(dev_drv,layer_id); - #ifdef FB_WIMO_FLAG - if(video_data_to_wimo!=NULL) - video_data_to_wimo(info,NULL); + #ifdef CONFIG_FB_MIRRORING + if(video_data_to_mirroring!=NULL) + video_data_to_mirroring(info,NULL); #endif return 0; } diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index ecf8be32168e..58a86fcf4e19 100755 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2587,9 +2587,9 @@ static int snd_pcm_common_ioctl1(struct file *file, snd_printd("unknown ioctl = 0x%x\n", cmd); return -ENOTTY; } -#ifdef CONFIG_FB_WIMO -int (*audio_data_to_wimo)(void* data,int size,int channel) = NULL; -EXPORT_SYMBOL(audio_data_to_wimo); +#ifdef CONFIG_FB_MIRRORING +int (*audio_data_to_mirroring)(void* data,int size,int channel) = NULL; +EXPORT_SYMBOL(audio_data_to_mirroring); #endif static int snd_pcm_playback_ioctl1(struct file *file, @@ -2613,10 +2613,10 @@ static int snd_pcm_playback_ioctl1(struct file *file, return -EFAULT; if (copy_from_user(&xferi, _xferi, sizeof(xferi))) return -EFAULT; - #ifdef CONFIG_FB_WIMO + #ifdef CONFIG_FB_MIRRORING - if(audio_data_to_wimo!=NULL) - audio_data_to_wimo(xferi.buf, xferi.frames*4,2); + if(audio_data_to_mirroring!=NULL) + audio_data_to_mirroring(xferi.buf, xferi.frames*4,2); #endif -- 2.34.1