CONFIG_DISPLAY_SUPPORT=y
CONFIG_LCD_B101EW05=y
CONFIG_FB_ROCKCHIP=y
-CONFIG_ONE_LCDC_DUAL_OUTPUT_INF=y
+CONFIG_DUAL_LCDC_DUAL_DISP_IN_KERNEL=y
CONFIG_LCDC_RK3188=y
CONFIG_LCDC0_RK3188=y
+CONFIG_LCDC1_RK3188=y
+CONFIG_RK_HDMI=y
+CONFIG_HDMI_CAT66121=y
+CONFIG_HDMI_SOURCE_LCDC1=y
+CONFIG_RK_HDMI_CTL_CODEC=y
CONFIG_RGA_RK30=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
#endif
+#ifdef CONFIG_RK_HDMI
+#define RK_HDMI_RST_PIN RK30_PIN3_PB2
+static int rk_hdmi_power_init(void)
+{
+ int ret;
+
+ if(RK_HDMI_RST_PIN != INVALID_GPIO)
+ {
+ if (gpio_request(RK_HDMI_RST_PIN, NULL)) {
+ printk("func %s, line %d: request gpio fail\n", __FUNCTION__, __LINE__);
+ return -1;
+ }
+ gpio_direction_output(RK_HDMI_RST_PIN, GPIO_LOW);
+ gpio_set_value(RK_HDMI_RST_PIN, GPIO_LOW);
+ msleep(100);
+ gpio_set_value(RK_HDMI_RST_PIN, GPIO_HIGH);
+ msleep(50);
+ }
+ return 0;
+}
+static struct rk_hdmi_platform_data rk_hdmi_pdata = {
+ .io_init = rk_hdmi_power_init,
+};
+#endif
+
+
#ifdef CONFIG_FB_ROCKCHIP
#define LCD_CS_PIN INVALID_GPIO
.platform_data = &cm3217_info,
},
#endif
+#if defined(CONFIG_HDMI_CAT66121)
+ {
+ .type = "cat66121_hdmi",
+ .addr = 0x4c,
+ .flags = 0,
+ .irq = RK30_PIN2_PD6,
+ .platform_data = &rk_hdmi_pdata,
+ },
+#endif
+
};
#endif
};
#define RT5616_INIT_REG_LEN ARRAY_SIZE(init_list)
+static struct snd_soc_codec *rt5616_codec;
+
static int rt5616_reg_init(struct snd_soc_codec *codec)
{
int i;
return 0;
}
+void codec_set_spk(bool on)
+{
+
+ struct snd_soc_codec *codec = rt5616_codec;
+ printk("%s: %d\n", __func__, on);
+
+ if(!codec)
+ return;
+
+ mutex_lock(&codec->mutex);
+ if(on){
+ printk(">>>> snd_soc_dapm_enable_pin\n");
+ snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack");
+ snd_soc_dapm_enable_pin(&codec->dapm, "Ext Spk");
+ }else{
+ printk(">>>> snd_soc_dapm_disable_pin\n");
+ snd_soc_dapm_disable_pin(&codec->dapm, "Headphone Jack");
+ snd_soc_dapm_disable_pin(&codec->dapm, "Ext Spk");
+ }
+ snd_soc_dapm_sync(&codec->dapm);
+ mutex_unlock(&codec->mutex);
+}
static int rt5616_probe(struct snd_soc_codec *codec)
{
struct rt5616_priv *rt5616 = snd_soc_codec_get_drvdata(codec);
codec->dapm.bias_level = SND_SOC_BIAS_STANDBY;
rt5616->codec = codec;
+ rt5616_codec = codec;
+
snd_soc_add_controls(codec, rt5616_snd_controls,
ARRAY_SIZE(rt5616_snd_controls));
snd_soc_dapm_new_controls(&codec->dapm, rt5616_dapm_widgets,