codec: mod compile error && useless log
authoryj <yangjie@rock-chips.com>
Tue, 1 Apr 2014 09:55:46 +0000 (17:55 +0800)
committeryj <yangjie@rock-chips.com>
Tue, 1 Apr 2014 09:55:46 +0000 (17:55 +0800)
sound/soc/codecs/rk616_codec.c
sound/soc/codecs/rt3261.c
sound/soc/codecs/rt5616.c

index bde655b2fad1d352e4b1ba7270ca8b8e9003f115..7689b24419b9bb4ed97d191a98b97dad9e2928b5 100755 (executable)
@@ -986,7 +986,7 @@ int snd_soc_put_step_volsw(struct snd_kcontrol *kcontrol,
        return err;
 }
 
-int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
+static int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
@@ -1016,7 +1016,7 @@ int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol,
+static int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
index ea5f1ceac7ddc3e49067821c0508171855a6bfb7..a159ca1adae5a26576bb250158b014c9978c5675 100755 (executable)
@@ -732,7 +732,7 @@ static int rt3261_asrc_get(struct snd_kcontrol *kcontrol,
        struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
        struct rt3261_priv *rt3261 = snd_soc_codec_get_drvdata(codec);
 
-       printk("%s\n", __FUNCTION__);
+       DBG("%s\n", __FUNCTION__);
        ucontrol->value.integer.value[0] = rt3261->asrc_en;
 
        return 0;
@@ -744,14 +744,14 @@ static int rt3261_asrc_put(struct snd_kcontrol *kcontrol,
        struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
        struct rt3261_priv *rt3261 = snd_soc_codec_get_drvdata(codec);
 
-       printk("%s\n", __FUNCTION__);
+       DBG("%s\n", __FUNCTION__);
        if (rt3261->asrc_en == ucontrol->value.integer.value[0])
                return 0;
 
        rt3261->asrc_en = ucontrol->value.integer.value[0];
        switch (rt3261->asrc_en) {
        case RT3261_ASRC_DIS://disable ASRC
-               printk("%s disable\n", __FUNCTION__);
+               DBG("%s disable\n", __FUNCTION__);
                snd_soc_write(codec, RT3261_ASRC_1, 0x0);                       
                snd_soc_write(codec, RT3261_ASRC_2, 0x0);
                snd_soc_update_bits(codec, RT3261_GEN_CTRL1, 0x70, 0x0); //bard 8-29
@@ -763,7 +763,7 @@ static int rt3261_asrc_put(struct snd_kcontrol *kcontrol,
                break;
 
        case RT3261_ASRC_EN://enable ASRC
-               printk("%s enable\n", __FUNCTION__);
+               DBG("%s enable\n", __FUNCTION__);
                snd_soc_write(codec, RT3261_ASRC_1, 0x9800);                    
                snd_soc_write(codec, RT3261_ASRC_2, 0xF800);
                snd_soc_update_bits(codec, RT3261_GEN_CTRL1, 0x70, 0x70); //bard 8-29
@@ -852,7 +852,7 @@ static int rt3261_mic2_put(struct snd_kcontrol *kcontrol,
 void rt3261_hp_amp_power(struct snd_soc_codec *codec, int on)
 {
        static int hp_amp_power_count;
-       printk("rt3261_hp_amp_power on=%d hp_amp_power_count=%d\n",on,hp_amp_power_count);
+       DBG("rt3261_hp_amp_power on=%d hp_amp_power_count=%d\n",on,hp_amp_power_count);
 //     dump_reg(codec);
        if(on) {
                if(hp_amp_power_count <= 0) {
index 60a1224d769247ac8c12d00661856bd0b40eb095..84e63e886d93acef05503bcfd6720b16e213d15a 100755 (executable)
@@ -419,7 +419,7 @@ static unsigned int bst_tlv[] = {
        8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0),
 };
 
-int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
+static int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
@@ -441,7 +441,7 @@ int snd_soc_get_gpio_enum_double(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol,
+static int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
@@ -1578,14 +1578,17 @@ static int rt5616_probe(struct snd_soc_codec *codec)
 {
        struct rt5616_priv *rt5616 = snd_soc_codec_get_drvdata(codec);
        int ret;
-       printk("enter %s\n",__func__);
+
        ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
        if (ret != 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
                return ret;
        }
 
-       rt5616_reset(codec);
+       ret = rt5616_reset(codec);      
+       if (ret < 0)
+                       return ret;
+
        snd_soc_update_bits(codec, RT5616_PWR_ANLG1,
                RT5616_PWR_VREF1 | RT5616_PWR_MB |
                RT5616_PWR_BG | RT5616_PWR_VREF2,