audio codec : add support compile all audio codec
authorqjb <qjb@rock-chips.com>
Thu, 6 Mar 2014 02:57:14 +0000 (10:57 +0800)
committerqjb <qjb@rock-chips.com>
Thu, 6 Mar 2014 02:57:14 +0000 (10:57 +0800)
12 files changed:
drivers/video/rockchip/hdmi/rk_hdmi_task.c
sound/soc/codecs/Makefile [changed mode: 0644->0755]
sound/soc/codecs/rk610_codec.c
sound/soc/codecs/rt3261.c
sound/soc/codecs/rt3261_ioctl.c [changed mode: 0644->0755]
sound/soc/codecs/rt5623.c [changed mode: 0644->0755]
sound/soc/codecs/rt5631_phone.c
sound/soc/codecs/rt5639.c
sound/soc/codecs/rt5639_ioctl.c
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5640_ioctl.c
sound/soc/rockchip/rk_rt5621.c [changed mode: 0644->0755]

index 6b4bb599146e17bf8cea7fb81f803f841f5b96a0..1963fb893ecc420763dd41280ba9d18eca65cd61 100755 (executable)
@@ -5,15 +5,21 @@
 
 #ifdef CONFIG_RK_HDMI_CTL_CODEC
 #ifdef CONFIG_MACH_RK_FAC
-       #ifdef CONFIG_SND_RK29_SOC_ES8323
+       #ifdef CONFIG_SND_RK_SOC_ES8323
                extern void es8323_codec_set_spk(bool on);
        #endif
-       #ifdef CONFIG_SND_RK29_SOC_RT5616
+       #ifdef CONFIG_SND_RK_SOC_RT5616
                extern void rt5616_codec_set_spk(bool on);
        #endif
        #ifdef CONFIG_SND_RK_SOC_RK616
                extern void rk616_codec_set_spk(bool on);
        #endif
+       #ifdef CONFIG_SND_RK_SOC_RT5631
+               extern void rk610_codec_set_spk(bool on);
+       #endif
+       #ifdef CONFIG_SND_RK_SOC_RK610
+               extern void rk610_codec_set_spk(bool on);
+       #endif  
 #else
        extern void codec_set_spk(bool on);
 #endif  
@@ -108,15 +114,21 @@ void hdmi_sys_remove(struct hdmi *hdmi)
        #endif
        #ifdef CONFIG_RK_HDMI_CTL_CODEC
 #ifdef CONFIG_MACH_RK_FAC
-       #ifdef CONFIG_SND_RK29_SOC_ES8323
+       #ifdef CONFIG_SND_RK_SOC_ES8323
                es8323_codec_set_spk(1);
        #endif
-       #ifdef CONFIG_SND_RK29_SOC_RT5616
+       #ifdef CONFIG_SND_RK_SOC_RT5616
                 rt5616_codec_set_spk(1);
        #endif
        #ifdef CONFIG_SND_RK_SOC_RK616
                 rk616_codec_set_spk(1);
-       #endif 
+       #endif
+       #ifdef CONFIG_SND_RK_SOC_RK610
+                rk610_codec_set_spk(1);
+       #endif
+       #ifdef CONFIG_SND_RK_SOC_RT5631
+                rt5631_codec_set_spk(1);
+       #endif  
 #else
        codec_set_spk(1);
 #endif
@@ -273,7 +285,13 @@ void hdmi_work(struct work_struct *work)
                                                #endif          
                                                #if defined (CONFIG_SND_RK_SOC_RK616)
                                                        rk616_codec_set_spk(0);
-                                               #endif  
+                                               #endif
+                                               #ifdef CONFIG_SND_RK_SOC_RK610
+                                                        rk610_codec_set_spk(1);
+                                               #endif
+                                               #ifdef CONFIG_SND_RK_SOC_RT5631
+                                                        rt5631_codec_set_spk(1);
+                                               #endif
                                        #else
                                                codec_set_spk(0);
                                        #endif
old mode 100644 (file)
new mode 100755 (executable)
index 1cb2ea0..f02b0c1
@@ -128,10 +128,11 @@ snd-soc-rt5631-objs := rt5631.o
 snd-soc-rt5616-objs := rt5616.o
 snd-soc-rt5631-phone-objs := rt5631_phone.o
 snd-soc-rt5625-objs := rt5625.o
-snd-soc-rt5639-objs := rt5639.o rt5639_ioctl.o rt56xx_ioctl.o
-snd-soc-rt5640-objs := rt5640.o rt5640-dsp.o rt5640_ioctl.o rt56xx_ioctl.o
-snd-soc-rt3261-objs := rt3261.o rt3261-dsp.o rt3261_ioctl.o rt_codec_ioctl.o
+obj-y := rt56xx_ioctl.o
+snd-soc-rt5639-objs := rt5639.o rt5639_ioctl.o 
+snd-soc-rt5640-objs := rt5640.o rt5640-dsp.o rt5640_ioctl.o
 snd-soc-rt3224-objs := rt3261.o rt3261_ioctl.o rt_codec_ioctl.o
+snd-soc-rt3261-objs := rt3261-dsp.o
 snd-soc-cs42l52-objs := cs42l52.o
 snd-soc-rk1000-objs := rk1000_codec.o
 snd-soc-rk610-objs := rk610_codec.o
index c92a9030633afc5f0c5f3dbe3429d50171923a34..5b9ba870aa5e78062773ce3bb345a1fa33f77131 100755 (executable)
@@ -135,7 +135,7 @@ static void spk_ctrl_fun(int status)
        }
 }
 
-void codec_set_spk(bool on)
+void rk610_codec_set_spk(bool on)
 {
        struct rk610_codec_priv *rk610_codec;
        if(!rk610_codec_codec)
@@ -151,7 +151,7 @@ void codec_set_spk(bool on)
        else
                gpio_set_value(rk610_codec->spk_ctrl_io, GPIO_LOW);                     
 }
-EXPORT_SYMBOL(codec_set_spk);
+EXPORT_SYMBOL(rk610_codec_set_spk);
 
 /*
  * read rk610 register cache
index fa8566d497b3fead5ad542f914029de160166f20..d01b43a0ae6fff65b0ae9dc647798ec3777574be 100755 (executable)
@@ -3371,7 +3371,7 @@ static int rt3261_probe(struct snd_soc_codec *codec)
        }
        codec->write = rt3261_write;
 
-       #if defined (CONFIG_SND_SOC_RT5623)
+       #if 0//defined (CONFIG_SND_SOC_RT5623)
        struct clk *iis_clk;
        //for rt5623 MCLK use
        iis_clk = clk_get_sys("rk_i2s.2", "i2s");
old mode 100644 (file)
new mode 100755 (executable)
index 7408647..e2865dc
@@ -18,7 +18,7 @@
 #include "rt3261-dsp.h"
 #endif
 
-hweq_t hweq_param[] = {
+static hweq_t hweq_param[] = {
        {/* NORMAL */
                {0},
                {0},
@@ -68,7 +68,7 @@ int rt3261_update_eqmode(
        return 0;
 }
 
-void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
+static void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
 {
        snd_soc_update_bits(codec, RT3261_DRC_AGC_1, RT3261_DRC_AGC_P_MASK |
                RT3261_DRC_AGC_MASK | RT3261_DRC_AGC_UPD,
@@ -76,7 +76,7 @@ void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
                1 << RT3261_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
+static void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                        int sample_rate, int recovery_rate, int limit_level)
 {
        snd_soc_update_bits(codec, RT3261_DRC_AGC_3, RT3261_DRC_AGC_TAR_MASK,
@@ -89,7 +89,7 @@ void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                0x1 << RT3261_DRC_AGC_UPD_BIT);
 }
 
-void set_digital_boost_gain(struct snd_soc_codec *codec,
+static void set_digital_boost_gain(struct snd_soc_codec *codec,
                        int post_gain, int pre_gain)
 {
        snd_soc_update_bits(codec, RT3261_DRC_AGC_2,
@@ -100,7 +100,7 @@ void set_digital_boost_gain(struct snd_soc_codec *codec,
                RT3261_DRC_AGC_UPD, 1 << RT3261_DRC_AGC_UPD_BIT);
 }
 
-void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
+static void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
        int noise_gate_hold_en, int compression_gain, int noise_gate_th)
 {
        snd_soc_update_bits(codec, RT3261_DRC_AGC_3,
@@ -114,7 +114,7 @@ void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
                RT3261_DRC_AGC_UPD, 1 << RT3261_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_compression(struct snd_soc_codec *codec,
+static void set_drc_agc_compression(struct snd_soc_codec *codec,
                int compression_en, int compression_ratio)
 {
        snd_soc_update_bits(codec, RT3261_DRC_AGC_2,
@@ -125,7 +125,7 @@ void set_drc_agc_compression(struct snd_soc_codec *codec,
                RT3261_DRC_AGC_UPD, 1 << RT3261_DRC_AGC_UPD_BIT);
 }
 
-void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
+static void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
 {
        unsigned int reg = snd_soc_read(codec, RT3261_DRC_AGC_1);
 
@@ -147,7 +147,7 @@ void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
                                RT3261_DRC_AGC_RC_SFT;
 }
 
-void get_digital_boost_gain(struct snd_soc_codec *codec,
+static void get_digital_boost_gain(struct snd_soc_codec *codec,
                        int *post_gain, int *pre_gain)
 {
        unsigned int reg = snd_soc_read(codec, RT3261_DRC_AGC_2);
@@ -156,7 +156,7 @@ void get_digital_boost_gain(struct snd_soc_codec *codec,
        *pre_gain = (reg & RT3261_DRC_AGC_PRB_MASK) >> RT3261_DRC_AGC_PRB_SFT;
 }
 
-void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
+static void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
        int *noise_gate_hold_en, int *compression_gain, int *noise_gate_th)
 {
        unsigned int reg = snd_soc_read(codec, RT3261_DRC_AGC_3);
@@ -172,7 +172,7 @@ void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
                                RT3261_DRC_AGC_NGT_SFT;
 }
 
-void get_drc_agc_compression(struct snd_soc_codec *codec,
+static void get_drc_agc_compression(struct snd_soc_codec *codec,
                int *compression_en, int *compression_ratio)
 {
        unsigned int reg = snd_soc_read(codec, RT3261_DRC_AGC_2);
old mode 100644 (file)
new mode 100755 (executable)
index 9ea32e1..899a2be
 
 #include "rt5623.h"
 
-#define RT5623_PROC
-#ifdef RT5623_PROC
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/vmalloc.h>
-#endif
-
 #define MODEM_ON 1
 #define MODEM_OFF 0
 
@@ -162,17 +155,12 @@ static const struct i2c_device_id rt5623_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt5623_i2c_id);
 
-static int rt5623_proc_init(void);
 
 static int rt5623_i2c_probe(struct i2c_client *i2c,
                    const struct i2c_device_id *id)
 {
        pr_info("%s(%d)\n", __func__, __LINE__);
 
-       #ifdef RT5623_PROC      
-       rt5623_proc_init();
-       #endif
-
        i2c_client = i2c;
        rt5623_reset(i2c);
        status = MODEM_ON;
@@ -180,7 +168,7 @@ static int rt5623_i2c_probe(struct i2c_client *i2c,
        return 0;
 }
 
-static int __devexit rt5623_i2c_remove(struct i2c_client *i2c)
+static int rt5623_i2c_remove(struct i2c_client *i2c)
 {
        return 0;
 }
@@ -191,7 +179,7 @@ struct i2c_driver rt5623_i2c_driver = {
                .owner = THIS_MODULE,
        },
        .probe = rt5623_i2c_probe,
-       .remove   = __devexit_p(rt5623_i2c_remove),
+       .remove   = rt5623_i2c_remove,
        .id_table = rt5623_i2c_id,
 };
 
@@ -212,113 +200,6 @@ MODULE_AUTHOR("Johnny Hsu <johnnyhsu@realtek.com>");
 MODULE_LICENSE("GPL");
 
 
-#ifdef RT5623_PROC
-
-static ssize_t rt5623_proc_write(struct file *file, const char __user *buffer,
-               unsigned long len, void *data)
-{
-       char *cookie_pot; 
-       char *p;
-       int reg;
-       int value;
-
-       cookie_pot = (char *)vmalloc( len );
-       if (!cookie_pot) 
-       {
-               return -ENOMEM;
-       } 
-       else 
-       {
-               if (copy_from_user( cookie_pot, buffer, len )) 
-                       return -EFAULT;
-       }
-
-       switch(cookie_pot[0])
-       {
-               case 'r':
-               case 'R':
-                       printk("Read reg debug\n");             
-                       if(cookie_pot[1] ==':')
-                       {
-                               strsep(&cookie_pot,":");
-                               while((p=strsep(&cookie_pot,",")))
-                               {
-                                       reg = simple_strtol(p,NULL,16);
-                                       value = codec_read(i2c_client,reg);
-                                       printk("codec_read:0x%04x = 0x%04x\n",reg,value);
-                               }
-                               printk("\n");
-                       }
-                       else
-                       {
-                               printk("Error Read reg debug.\n");
-                               printk("For example: echo r:22,23,24,25>rt5623_ts\n");
-                       }
-                       break;
-               case 'w':
-               case 'W':
-                       printk("Write reg debug\n");            
-                       if(cookie_pot[1] ==':')
-                       {
-                               strsep(&cookie_pot,":");
-                               while((p=strsep(&cookie_pot,"=")))
-                               {
-                                       reg = simple_strtol(p,NULL,16);
-                                       p=strsep(&cookie_pot,",");
-                                       value = simple_strtol(p,NULL,16);
-                                       codec_write(i2c_client,reg,value);
-                                       printk("codec_write:0x%04x = 0x%04x\n",reg,value);
-                               }
-                               printk("\n");
-                       }
-                       else
-                       {
-                               printk("Error Write reg debug.\n");
-                               printk("For example: w:22=0,23=0,24=0,25=0>rt5623_ts\n");
-                       }
-                       break;
-               case 'a':
-                       printk("Dump reg \n");          
-
-                       for(reg = 0; reg < 0x6e; reg+=2)
-                       {
-                               value = codec_read(i2c_client,reg);
-                               printk("codec_read:0x%04x = 0x%04x\n",reg,value);
-                       }
-
-                       break;          
-               default:
-                       printk("Help for rt5623_ts .\n-->The Cmd list: \n");
-                       printk("-->'d&&D' Open or Off the debug\n");
-                       printk("-->'r&&R' Read reg debug,Example: echo 'r:22,23,24,25'>rt5623_ts\n");
-                       printk("-->'w&&W' Write reg debug,Example: echo 'w:22=0,23=0,24=0,25=0'>rt5623_ts\n");
-                       break;
-       }
-
-       return len;
-}
-
-static const struct file_operations rt5623_proc_fops = {
-       .owner          = THIS_MODULE,
-};
-
-static int rt5623_proc_init(void)
-{
-       struct proc_dir_entry *rt5623_proc_entry;
-       rt5623_proc_entry = create_proc_entry("driver/rt5623_ts", 0777, NULL);
-       if(rt5623_proc_entry != NULL)
-       {
-               rt5623_proc_entry->write_proc = rt5623_proc_write;
-               return 0;
-       }
-       else
-       {
-               printk("create proc error !\n");
-               return -1;
-       }
-}
-#endif
-
 
 
 
index 53a8ab856d13d439e482dafeebdf93ec2cf81ba1..c9f1906a46fcb936cc6cd6d253e7957cfc7f7aef 100755 (executable)
@@ -121,7 +121,7 @@ static const u16 rt5631_reg[RT5631_VENDOR_ID2 + 1] = {
        [RT5631_PSEUDO_SPATL_CTRL] = 0x0553,
 };
 
-void rt5631_codec_set_spk(bool on)
+void rt5631_phone_set_spk(bool on)
 {
        struct snd_soc_codec *codec = rt5631_codec;
 
@@ -1736,7 +1736,7 @@ static const struct pll_div codec_slave_pll_div[] = {
        {3072000,  12288000,  0x0a90},
 };
 
-struct coeff_clk_div coeff_div[] = {
+static struct coeff_clk_div coeff_div[] = {
        /* sysclk is 256fs */
        {2048000,  8000 * 32,  8000, 0x1000},
        {2048000,  8000 * 64,  8000, 0x0000},
@@ -2269,14 +2269,14 @@ static int rt5631_resume(struct snd_soc_codec *codec)
                        SNDRV_PCM_FMTBIT_S24_LE | \
                        SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt5631_ops = {
+static struct snd_soc_dai_ops rt5631_ops = {
        .hw_params = rt5631_hifi_pcm_params,
        .set_fmt = rt5631_hifi_codec_set_dai_fmt,
        .set_sysclk = rt5631_hifi_codec_set_dai_sysclk,
        .set_pll = rt5631_codec_set_dai_pll,
 };
 
-struct snd_soc_dai_driver rt5631_dai[] = {
+static struct snd_soc_dai_driver rt5631_dai[] = {
        {
                .name = "RT5631 HiFi",
                .id = RT5631_AIF1,
@@ -2347,12 +2347,23 @@ static int rt5631_i2c_probe(struct i2c_client *i2c,
                    const struct i2c_device_id *id)
 {
        struct rt5631_priv *rt5631;
+       struct device_node *rt5631_np = i2c->dev.of_node;       
        int ret;
+       int val = 0;
 
        rt5631 = kzalloc(sizeof(struct rt5631_priv), GFP_KERNEL);
        if (NULL == rt5631)
                return -ENOMEM;
-
+       if(!of_property_read_u32(rt5631_np, "rt5631-phone", &val)){
+               if(val)
+               {
+                       printk("rt5631 use for phone\n");
+               }
+               else
+                       return -1;
+       }
+       else
+               return -1;
        i2c_set_clientdata(i2c, rt5631);
 
        ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt5631,
@@ -2381,7 +2392,7 @@ static void rt5631_i2c_shutdown(struct i2c_client *client)
 //     return 0;
 }
 
-struct i2c_driver rt5631_i2c_driver = {
+static struct i2c_driver rt5631_i2c_driver = {
        .driver = {
                .name = "RT5631",
                .owner = THIS_MODULE,
index cf17e7fcbc6cfe33c6e4eb48fa68c10f0ec985ae..b06804f4a6ad46b035dfb94b93a7b420f45053ed 100755 (executable)
@@ -443,7 +443,7 @@ static int rt5639_readable_register(
        }
 }
 
-void DC_Calibrate(struct snd_soc_codec *codec)
+static void DC_Calibrate(struct snd_soc_codec *codec)
 {
        unsigned int sclk_src;
 
index 7726cac1c57575dc5d98caa12ee311398120c8b6..3719954e689b1a277fb57c8bb8b53f49520d72f5 100755 (executable)
@@ -18,7 +18,7 @@
 #include "rt5639-dsp.h"
 #endif
 
-hweq_t hweq_param[] = {
+static hweq_t hweq_param[] = {
        {/* NORMAL */
                {0},
                {0},
@@ -69,7 +69,7 @@ int rt5639_update_eqmode(
        return 0;
 }
 
-void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
+static void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
 {
        snd_soc_update_bits(codec, RT5639_DRC_AGC_1, RT5639_DRC_AGC_P_MASK |
                RT5639_DRC_AGC_MASK | RT5639_DRC_AGC_UPD,
@@ -77,7 +77,7 @@ void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
                1 << RT5639_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
+static void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                        int sample_rate, int recovery_rate, int limit_level)
 {
        snd_soc_update_bits(codec, RT5639_DRC_AGC_3, RT5639_DRC_AGC_TAR_MASK,
@@ -90,7 +90,7 @@ void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                0x1 << RT5639_DRC_AGC_UPD_BIT);
 }
 
-void set_digital_boost_gain(struct snd_soc_codec *codec,
+static void set_digital_boost_gain(struct snd_soc_codec *codec,
                        int post_gain, int pre_gain)
 {
        snd_soc_update_bits(codec, RT5639_DRC_AGC_2,
@@ -101,7 +101,7 @@ void set_digital_boost_gain(struct snd_soc_codec *codec,
                RT5639_DRC_AGC_UPD, 1 << RT5639_DRC_AGC_UPD_BIT);
 }
 
-void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
+static void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
        int noise_gate_hold_en, int compression_gain, int noise_gate_th)
 {
        snd_soc_update_bits(codec, RT5639_DRC_AGC_3,
@@ -115,7 +115,7 @@ void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
                RT5639_DRC_AGC_UPD, 1 << RT5639_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_compression(struct snd_soc_codec *codec,
+static void set_drc_agc_compression(struct snd_soc_codec *codec,
                int compression_en, int compression_ratio)
 {
        snd_soc_update_bits(codec, RT5639_DRC_AGC_2,
@@ -126,7 +126,7 @@ void set_drc_agc_compression(struct snd_soc_codec *codec,
                RT5639_DRC_AGC_UPD, 1 << RT5639_DRC_AGC_UPD_BIT);
 }
 
-void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
+static void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_1);
 
@@ -134,7 +134,7 @@ void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
        *path = (reg & RT5639_DRC_AGC_P_MASK) >> RT5639_DRC_AGC_P_SFT;
 }
 
-void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
+static void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
                int *sample_rate, int *recovery_rate, int *limit_level)
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_3);
@@ -148,7 +148,7 @@ void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
                                RT5639_DRC_AGC_RC_SFT;
 }
 
-void get_digital_boost_gain(struct snd_soc_codec *codec,
+static void get_digital_boost_gain(struct snd_soc_codec *codec,
                        int *post_gain, int *pre_gain)
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_2);
@@ -157,7 +157,7 @@ void get_digital_boost_gain(struct snd_soc_codec *codec,
        *pre_gain = (reg & RT5639_DRC_AGC_PRB_MASK) >> RT5639_DRC_AGC_PRB_SFT;
 }
 
-void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
+static void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
        int *noise_gate_hold_en, int *compression_gain, int *noise_gate_th)
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_3);
@@ -173,7 +173,7 @@ void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
                                RT5639_DRC_AGC_NGT_SFT;
 }
 
-void get_drc_agc_compression(struct snd_soc_codec *codec,
+static void get_drc_agc_compression(struct snd_soc_codec *codec,
                int *compression_en, int *compression_ratio)
 {
        unsigned int reg = snd_soc_read(codec, RT5639_DRC_AGC_2);
index 929e8c7a865ec2a60a74c27d9427d28b66e91063..f49e1b54f720df7c06e007b911c023ffb244eb17 100755 (executable)
@@ -451,7 +451,7 @@ static int rt5640_readable_register(
        }
 }
 
-void DC_Calibrate(struct snd_soc_codec *codec)
+static void DC_Calibrate(struct snd_soc_codec *codec)
 {
        unsigned int sclk_src;
 
index ef51f224ed125f04c1cbf2e3db838ae4858f3a43..62e7efcf2d0667a1f205f5f4706f8c6f21f6b223 100755 (executable)
@@ -18,7 +18,7 @@
 #include "rt5640-dsp.h"
 #endif
 
-hweq_t hweq_param[] = {
+static hweq_t hweq_param[] = {
        {/* NORMAL */
                {0},
                {0},
@@ -69,7 +69,7 @@ int rt5640_update_eqmode(
        return 0;
 }
 
-void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
+static void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
 {
        snd_soc_update_bits(codec, RT5640_DRC_AGC_1, RT5640_DRC_AGC_P_MASK |
                RT5640_DRC_AGC_MASK | RT5640_DRC_AGC_UPD,
@@ -77,7 +77,7 @@ void set_drc_agc_enable(struct snd_soc_codec *codec, int enable, int path)
                1 << RT5640_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
+static void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                        int sample_rate, int recovery_rate, int limit_level)
 {
        snd_soc_update_bits(codec, RT5640_DRC_AGC_3, RT5640_DRC_AGC_TAR_MASK,
@@ -90,7 +90,7 @@ void set_drc_agc_parameters(struct snd_soc_codec *codec, int attack_rate,
                0x1 << RT5640_DRC_AGC_UPD_BIT);
 }
 
-void set_digital_boost_gain(struct snd_soc_codec *codec,
+static void set_digital_boost_gain(struct snd_soc_codec *codec,
                        int post_gain, int pre_gain)
 {
        snd_soc_update_bits(codec, RT5640_DRC_AGC_2,
@@ -101,7 +101,7 @@ void set_digital_boost_gain(struct snd_soc_codec *codec,
                RT5640_DRC_AGC_UPD, 1 << RT5640_DRC_AGC_UPD_BIT);
 }
 
-void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
+static void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
        int noise_gate_hold_en, int compression_gain, int noise_gate_th)
 {
        snd_soc_update_bits(codec, RT5640_DRC_AGC_3,
@@ -115,7 +115,7 @@ void set_noise_gate(struct snd_soc_codec *codec, int noise_gate_en,
                RT5640_DRC_AGC_UPD, 1 << RT5640_DRC_AGC_UPD_BIT);
 }
 
-void set_drc_agc_compression(struct snd_soc_codec *codec,
+static void set_drc_agc_compression(struct snd_soc_codec *codec,
                int compression_en, int compression_ratio)
 {
        snd_soc_update_bits(codec, RT5640_DRC_AGC_2,
@@ -126,7 +126,7 @@ void set_drc_agc_compression(struct snd_soc_codec *codec,
                RT5640_DRC_AGC_UPD, 1 << RT5640_DRC_AGC_UPD_BIT);
 }
 
-void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
+static void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
 {
        unsigned int reg = snd_soc_read(codec, RT5640_DRC_AGC_1);
 
@@ -134,7 +134,7 @@ void get_drc_agc_enable(struct snd_soc_codec *codec, int *enable, int *path)
        *path = (reg & RT5640_DRC_AGC_P_MASK) >> RT5640_DRC_AGC_P_SFT;
 }
 
-void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
+static void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
                int *sample_rate, int *recovery_rate, int *limit_level)
 {
        unsigned int reg = snd_soc_read(codec, RT5640_DRC_AGC_3);
@@ -148,7 +148,7 @@ void get_drc_agc_parameters(struct snd_soc_codec *codec, int *attack_rate,
                                RT5640_DRC_AGC_RC_SFT;
 }
 
-void get_digital_boost_gain(struct snd_soc_codec *codec,
+static void get_digital_boost_gain(struct snd_soc_codec *codec,
                        int *post_gain, int *pre_gain)
 {
        unsigned int reg = snd_soc_read(codec, RT5640_DRC_AGC_2);
@@ -157,7 +157,7 @@ void get_digital_boost_gain(struct snd_soc_codec *codec,
        *pre_gain = (reg & RT5640_DRC_AGC_PRB_MASK) >> RT5640_DRC_AGC_PRB_SFT;
 }
 
-void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
+static void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
        int *noise_gate_hold_en, int *compression_gain, int *noise_gate_th)
 {
        unsigned int reg = snd_soc_read(codec, RT5640_DRC_AGC_3);
@@ -173,7 +173,7 @@ void get_noise_gate(struct snd_soc_codec *codec, int *noise_gate_en,
                                RT5640_DRC_AGC_NGT_SFT;
 }
 
-void get_drc_agc_compression(struct snd_soc_codec *codec,
+static void get_drc_agc_compression(struct snd_soc_codec *codec,
                int *compression_en, int *compression_ratio)
 {
        unsigned int reg = snd_soc_read(codec, RT5640_DRC_AGC_2);
old mode 100644 (file)
new mode 100755 (executable)
index 17e5fec..0598567
@@ -67,12 +67,12 @@ static int rk29_hw_params(struct snd_pcm_substream *substream,
 
                if((24576000%params_rate(params))==0)   //for 8k,16k,32k,48k
                {
-                       snd_soc_dai_set_pll(codec_dai,RT5621_PLL_FR_MCLK,pll_out, 24576000);
+                       snd_soc_dai_set_pll(codec_dai,0,RT5621_PLL_FR_MCLK,pll_out, 24576000);
                        snd_soc_dai_set_sysclk(codec_dai,0, 24576000, SND_SOC_CLOCK_IN);
                }
                else if((22579200%params_rate(params))==0)      //for 11k,22k,44k
                {
-                       snd_soc_dai_set_pll(codec_dai,RT5621_PLL_FR_MCLK,pll_out, 22579200);
+                       snd_soc_dai_set_pll(codec_dai,0,RT5621_PLL_FR_MCLK,pll_out, 22579200);
                        snd_soc_dai_set_sysclk(codec_dai,0, 22579200, SND_SOC_CLOCK_IN);
                }
        }