phonepad: divide rt3224 and rt3261 from config, want to add dsp function later.
author宋秀杰 <sxj@rock-chips.com>
Sun, 16 Sep 2012 08:12:14 +0000 (16:12 +0800)
committer宋秀杰 <sxj@rock-chips.com>
Sun, 16 Sep 2012 08:12:14 +0000 (16:12 +0800)
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/rt3261.c
sound/soc/rk29/Kconfig
sound/soc/rk29/Makefile
sound/soc/rk29/rk29_rt3261.c

index 59596335c256706334391eb3e78681998467d616..4a6be745b1891d839f6f1ce8aaa0bcbe22f1e350 100755 (executable)
@@ -79,6 +79,7 @@ config SND_SOC_ALL_CODECS
        select SND_SOC_RT5631 if I2C
        select SND_SOC_RT5625 if I2C
        select SND_SOC_RT3261 if I2C
+       select SND_SOC_RT3224 if I2C
        select SND_SOC_RT5623 if I2C
        select SND_SOC_RK610 if I2C
        select SND_SOC_WM8903 if I2C
@@ -334,6 +335,9 @@ config SND_SOC_RT5631
 config SND_SOC_RT5625
        tristate
 
+config SND_SOC_RT3224
+       tristate
+
 config SND_SOC_RT3261
        tristate
 
index 18d1fd604a6758fdbab2ca8c7ec7c3a78fcdc3be..f09bb7a885657af6fb758579f24948a499d16a62 100755 (executable)
@@ -91,6 +91,7 @@ snd-soc-rk1000-objs := rk1000_codec.o
 snd-soc-jz4740-codec-objs := jz4740.o
 snd-soc-rk610-objs := rk610_codec.o
 snd-soc-rt3261-objs := rt3261.o rt3261-dsp.o rt3261_ioctl.o rt_codec_ioctl.o
+snd-soc-rt3224-objs := rt3261.o rt3261_ioctl.o rt_codec_ioctl.o
 snd-soc-rk2928-objs := rk2928_codec.o
 
 # Amp
@@ -100,6 +101,7 @@ snd-soc-tpa6130a2-objs := tpa6130a2.o
 snd-soc-wm2000-objs := wm2000.o
 snd-soc-wm9090-objs := wm9090.o
 obj-$(CONFIG_SND_SOC_RT3261)    += snd-soc-rt3261.o
+obj-$(CONFIG_SND_SOC_RT3224)    += snd-soc-rt3224.o
 obj-$(CONFIG_SND_SOC_88PM860X) += snd-soc-88pm860x.o
 obj-$(CONFIG_SND_SOC_AC97_CODEC)       += snd-soc-ac97.o
 obj-$(CONFIG_SND_SOC_AD1836)   += snd-soc-ad1836.o
index 63c3ba7caaa62280616b88ab9e2512314cfd983a..70402ecc3d7f9f0f8a1e7626de65177519e52318 100644 (file)
@@ -38,7 +38,7 @@ char debug_write_read = 0;
 
 static struct snd_soc_codec *rt3261_codec;
 
-#if 1
+#if 0
 #define DBG(x...)      printk(KERN_INFO x)
 #else
 #define DBG(x...)
@@ -3010,7 +3010,7 @@ static int rt3261_probe(struct snd_soc_codec *codec)
        snd_soc_dapm_add_routes(&codec->dapm, rt3261_dapm_routes,
                        ARRAY_SIZE(rt3261_dapm_routes));
 
-#if 0
+
 #if defined (CONFIG_SND_SOC_RT3261)
        rt3261->dsp_sw = RT3261_DSP_AEC_NS_FENS;
        rt3261_dsp_probe(codec);
@@ -3026,7 +3026,7 @@ static int rt3261_probe(struct snd_soc_codec *codec)
        realtek_ce_init_hwdep(codec);
 #endif
 #endif
-#endif
+
 
        ret = device_create_file(codec->dev, &dev_attr_index_reg);
        if (ret != 0) {
@@ -3054,7 +3054,7 @@ static int rt3261_suspend(struct snd_soc_codec *codec, pm_message_t state)
         * (3) DSP IIS interface power off
         * (4) Toggle pin of codec LDO1 to power off
         */
-       //rt3261_dsp_suspend(codec, state);
+       rt3261_dsp_suspend(codec, state);
 #endif
        rt3261_set_bias_level(codec, SND_SOC_BIAS_OFF);
        return 0;
@@ -3065,7 +3065,7 @@ static int rt3261_resume(struct snd_soc_codec *codec)
        rt3261_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 #if defined (CONFIG_SND_SOC_RT3261)
        /* After opening LDO of codec, then close LDO of DSP. */
-       //rt3261_dsp_resume(codec);
+       rt3261_dsp_resume(codec);
 #endif
        return 0;
 }
index 70a860662eb01bb03f5f53b2003a1fd5350ffff7..eab95963a98ba5ca47d5290fc42ede5f1b186780 100755 (executable)
@@ -115,6 +115,14 @@ choice
          if your codec output hardware connect is spk from spkout, choose it
 endchoice
 
+config SND_RK29_SOC_RT3224
+       tristate "SoC I2S Audio support for rockchip - RT3224"
+       depends on SND_RK29_SOC
+       select SND_RK29_SOC_I2S
+       select SND_SOC_RT3224
+       help
+         RT3224 is pin to pin as RT3261, but not have dsp function.
+
 config SND_RK29_SOC_RT3261
        tristate "SoC I2S Audio support for rockchip - RT3261"
        depends on SND_RK29_SOC
@@ -196,7 +204,7 @@ config SND_RK_SOC_RK2928
          Say Y if you want to add support for SoC audio on rockchip
          with the RK2928 internal codec.
 
-if SND_RK29_SOC_WM8988 || SND_RK29_SOC_RK1000 || SND_RK29_SOC_WM8994 || SND_RK29_SOC_WM8900 || SND_RK29_SOC_RT5621 || SND_RK29_SOC_RT5631 || SND_RK29_SOC_RT5625 || SND_RK29_SOC_RT3261 || SND_RK29_SOC_CS42L52 || SND_RK29_SOC_AIC3111 || SND_RK29_SOC_HDMI || SND_RK29_SOC_RK610 || SND_RK29_SOC_AIC3262 || SND_RK_SOC_RK2928
+if SND_RK29_SOC_WM8988 || SND_RK29_SOC_RK1000 || SND_RK29_SOC_WM8994 || SND_RK29_SOC_WM8900 || SND_RK29_SOC_RT5621 || SND_RK29_SOC_RT5631 || SND_RK29_SOC_RT5625 || SND_RK29_SOC_RT3261 || SND_RK29_SOC_RT3224 || SND_RK29_SOC_CS42L52 || SND_RK29_SOC_AIC3111 || SND_RK29_SOC_HDMI || SND_RK29_SOC_RK610 || SND_RK29_SOC_AIC3262 || SND_RK_SOC_RK2928
 choice
   bool "Set i2s type"
   default SND_RK29_CODEC_SOC_SLAVE
index e20e36607497de624747d39805138cf9400277e7..494a7cbc6b52f81b2407f73b560f656ebcf3ee9d 100755 (executable)
@@ -21,6 +21,7 @@ snd-soc-rt5621-objs := rk29_rt5621.o
 snd-soc-rt5631-objs := rk29_rt5631.o
 snd-soc-rt5625-objs := rk29_rt5625.o
 snd-soc-rt3261-objs := rk29_rt3261.o
+snd-soc-rt3224-objs := rk29_rt3261.o
 snd-soc-cs42l52-objs := rk29_cs42l52.o
 snd-soc-aic3111-objs := rk29_aic3111.o
 snd-soc-wm8988-objs := rk29_wm8988.o
@@ -38,6 +39,7 @@ obj-$(CONFIG_SND_RK29_SOC_RT5621) += snd-soc-rt5621.o
 obj-$(CONFIG_SND_RK29_SOC_RT5631) += snd-soc-rt5631.o
 obj-$(CONFIG_SND_RK29_SOC_RT5625) += snd-soc-rt5625.o
 obj-$(CONFIG_SND_RK29_SOC_RT3261) += snd-soc-rt3261.o
+obj-$(CONFIG_SND_RK29_SOC_RT3224) += snd-soc-rt3224.o
 obj-$(CONFIG_SND_RK29_SOC_RK1000) += snd-soc-rk1000.o
 obj-$(CONFIG_SND_RK29_SOC_CS42L52) += snd-soc-cs42l52.o
 obj-$(CONFIG_SND_RK29_SOC_AIC3111) += snd-soc-aic3111.o
index c10c97db7744bb26e7da54bc7b342f85d23160c7..d4c157bc7b83d45c02b0a6aa269c3a6d368323c6 100644 (file)
@@ -24,7 +24,7 @@
 #include "rk29_pcm.h"\r
 #include "rk29_i2s.h"\r
 \r
-#if 1\r
+#if 0\r
 #define        DBG(x...)       printk(KERN_INFO x)\r
 #else\r
 #define        DBG(x...)\r