From: yj Date: Tue, 20 Aug 2013 12:03:16 +0000 (+0800) Subject: codec:k3026 & rk3028a disable alsa register && AMP delaytime X-Git-Tag: firefly_0821_release~6713 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1389ca5dd4281b64ec0bdc3948a5a9e4f95ea574;p=firefly-linux-kernel-4.4.55.git codec:k3026 & rk3028a disable alsa register && AMP delaytime --- diff --git a/sound/soc/codecs/rk3026_codec.c b/sound/soc/codecs/rk3026_codec.c index a526e055df3e..de52e932175a 100644 --- a/sound/soc/codecs/rk3026_codec.c +++ b/sound/soc/codecs/rk3026_codec.c @@ -1,7 +1,7 @@ /* * rk3026.c -- RK3026 CODEC ALSA SoC audio driver * - * Copyright 2013 Rockship + * Copyright 2013 Rockchip * Author: chenjq */ @@ -1558,7 +1558,7 @@ static int rk3026_digital_mute(struct snd_soc_dai *dai, int mute) is_hp_pd) { DBG("%s : set hp ctl gpio LOW\n", __func__); gpio_set_value(rk3026_priv->hp_ctl_gpio, GPIO_LOW); - msleep(rk3026_priv->delay_time); + msleep(200);//rk3026_priv->delay_time); } } else { @@ -1566,7 +1566,7 @@ static int rk3026_digital_mute(struct snd_soc_dai *dai, int mute) is_hp_pd) { DBG("%s : set hp ctl gpio HIGH\n", __func__); gpio_set_value(rk3026_priv->hp_ctl_gpio, GPIO_HIGH); - msleep(rk3026_priv->delay_time); + msleep(100);//rk3026_priv->delay_time); } } return 0; @@ -2073,6 +2073,20 @@ static int rk3026_probe(struct snd_soc_codec *codec) writel(val | 0x04000400,RK2928_GRF_BASE+GRF_SOC_CON0); val = readl(RK2928_GRF_BASE+GRF_SOC_CON0); printk("%s : i2s sdi from acodec val=0x%x,soc_con[0] bit 10 =1 is correct\n",__func__,val); + + + if (!rk3026_for_mid) { + codec->dapm.bias_level = SND_SOC_BIAS_OFF; + rk3026_set_bias_level(codec, SND_SOC_BIAS_STANDBY); + + snd_soc_add_controls(codec, rk3026_snd_controls, + ARRAY_SIZE(rk3026_snd_controls)); + snd_soc_dapm_new_controls(&codec->dapm, rk3026_dapm_widgets, + ARRAY_SIZE(rk3026_dapm_widgets)); + snd_soc_dapm_add_routes(&codec->dapm, rk3026_dapm_routes, + ARRAY_SIZE(rk3026_dapm_routes)); + + } return 0; err__: @@ -2134,12 +2148,6 @@ static struct snd_soc_codec_driver soc_codec_dev_rk3026 = { .volatile_register = rk3026_volatile_register, .readable_register = rk3026_codec_register, .reg_cache_step = sizeof(unsigned int), - .controls = rk3026_snd_controls, - .num_controls = ARRAY_SIZE(rk3026_snd_controls), - .dapm_widgets = rk3026_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(rk3026_dapm_widgets), - .dapm_routes = rk3026_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(rk3026_dapm_routes), }; static __devinit int rk3026_platform_probe(struct platform_device *pdev)