audio:fix last audio commit
authorzyh <zyh@rock-chips.com>
Mon, 16 Jun 2014 01:49:49 +0000 (09:49 +0800)
committerzyh <zyh@rock-chips.com>
Mon, 16 Jun 2014 01:50:49 +0000 (09:50 +0800)
sound/soc/codecs/rt3261-dsp.c

index 1233f58033122746db87088a0e7e31f21817be23..875c402be3cecab696d556726a13ad172f63e1e4 100644 (file)
@@ -34,22 +34,19 @@ static const u16 rt3261_dsp_init[][2] = {
 #define RT3261_DSP_INIT_NUM \
        (sizeof(rt3261_dsp_init) / sizeof(rt3261_dsp_init[0]))
 
-//static const u16 rt3261_dsp_48[][2] = {
-unsigned short rt3261_dsp_48[][2] = {
+static const u16 rt3261_dsp_48[][2] = {
        {0x22c8, 0x0026}, {0x22fe, 0x0fa0}, {0x22ff, 0x3893}, {0x22fa, 0x2487},
        {0x2301, 0x0002},
 };
 #define RT3261_DSP_48_NUM (sizeof(rt3261_dsp_48) / sizeof(rt3261_dsp_48[0]))
 
-//static const u16 rt3261_dsp_441[][2] = {
-unsigned short rt3261_dsp_441[][2] = {
+static const u16 rt3261_dsp_441[][2] = {
        {0x22c6, 0x0031}, {0x22c7, 0x0050}, {0x22c8, 0x0009}, {0x22fe, 0x0e5b},
        {0x22ff, 0x3883}, {0x22fa, 0x2484}, {0x2301, 0x0001},
 };
 #define RT3261_DSP_441_NUM (sizeof(rt3261_dsp_441) / sizeof(rt3261_dsp_441[0]))
 
-//static const u16 rt3261_dsp_16[][2] = {
-unsigned short rt3261_dsp_16[][2] = {
+static const u16 rt3261_dsp_16[][2] = {
        {0x22c8, 0x0026}, {0x22fa, 0x2484}, {0x2301, 0x0002},
 };
 #define RT3261_DSP_16_NUM (sizeof(rt3261_dsp_16) / sizeof(rt3261_dsp_16[0]))
@@ -59,7 +56,7 @@ static const u16 rt3261_dsp_rate_tab[] = {
 };
 #define RT3261_DSP_RATE_NUM (sizeof(rt3261_dsp_rate_tab) / sizeof(rt3261_dsp_rate_tab[0]))
 
-unsigned short rt3261_dsp_aec_ns_fens[][2] = {
+static const u16 rt3261_dsp_aec_ns_fens[][2] = {
        {0x22F8, 0x8005},
        {0x2309, 0x0400},
        {0x2310, 0x0824},
@@ -119,8 +116,7 @@ unsigned short rt3261_dsp_aec_ns_fens[][2] = {
 
 #define RT3261_DSP_AEC_NUM \
        (sizeof(rt3261_dsp_aec_ns_fens) / sizeof(rt3261_dsp_aec_ns_fens[0]))
-
-unsigned short rt3261_dsp_hfbf[][2] = {
+static const u16 rt3261_dsp_hfbf[][2] = {
        {0x22f8, 0x8004}, {0x22a0, 0x1205}, {0x22a1, 0x0f00}, {0x22a2, 0x1000},
        {0x22a3, 0x1000}, {0x22a4, 0x1000}, {0x22aa, 0x0006}, {0x22ad, 0x0060},
        {0x22ae, 0x0080}, {0x22af, 0x0000}, {0x22b0, 0x000e}, {0x22b1, 0x0010},
@@ -142,7 +138,7 @@ unsigned short rt3261_dsp_hfbf[][2] = {
 #define RT3261_DSP_HFBF_NUM \
        (sizeof(rt3261_dsp_hfbf) / sizeof(rt3261_dsp_hfbf[0]))
 
-unsigned short rt3261_dsp_ffp[][2] = {
+static const u16 rt3261_dsp_ffp[][2] = {
        {0x22f8, 0x8005}, {0x2303, 0x1971}, {0x2304, 0x8312}, {0x2305, 0x0005},
        {0x2309, 0x0200}, {0x230a, 0x1b00}, {0x230c, 0x0800}, {0x230d, 0x0400},
        {0x2325, 0x5000}, {0x2326, 0x0040}, {0x232f, 0x0080}, {0x2332, 0x0100},
@@ -756,7 +752,7 @@ static int rt3261_dsp_rate(struct snd_soc_codec *codec, int rate)
 {
        struct rt3261_dsp_param param;
        int ret, i, tab_num;
-       unsigned short (*rate_tab)[2];
+       static const unsigned short (*rate_tab)[2];
 
        if (rate != 48000 &&  rate != 44100 && rate != 16000)
                return -EINVAL;
@@ -1002,7 +998,7 @@ static ssize_t rt3261_dsp_show(struct device *dev,
        struct i2c_client *client = to_i2c_client(dev);
        struct rt3261_priv *rt3261 = i2c_get_clientdata(client);
        struct snd_soc_codec *codec = rt3261->codec;
-       unsigned short (*rt3261_dsp_tab)[2];
+       static const unsigned short (*rt3261_dsp_tab)[2];
        unsigned int val;
        int cnt = 0, i, tab_num;