From: 宋秀杰 Date: Sun, 16 Sep 2012 08:12:14 +0000 (+0800) Subject: phonepad: divide rt3224 and rt3261 from config, want to add dsp function later. X-Git-Tag: firefly_0821_release~8629 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce9e0c36ba7acf70ec930f8b3a357a463e35720b;p=firefly-linux-kernel-4.4.55.git phonepad: divide rt3224 and rt3261 from config, want to add dsp function later. --- diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 59596335c256..4a6be745b189 100755 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -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 diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 18d1fd604a67..f09bb7a88565 100755 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -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 diff --git a/sound/soc/codecs/rt3261.c b/sound/soc/codecs/rt3261.c index 63c3ba7caaa6..70402ecc3d7f 100644 --- a/sound/soc/codecs/rt3261.c +++ b/sound/soc/codecs/rt3261.c @@ -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; } diff --git a/sound/soc/rk29/Kconfig b/sound/soc/rk29/Kconfig index 70a860662eb0..eab95963a98b 100755 --- a/sound/soc/rk29/Kconfig +++ b/sound/soc/rk29/Kconfig @@ -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 diff --git a/sound/soc/rk29/Makefile b/sound/soc/rk29/Makefile index e20e36607497..494a7cbc6b52 100755 --- a/sound/soc/rk29/Makefile +++ b/sound/soc/rk29/Makefile @@ -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 diff --git a/sound/soc/rk29/rk29_rt3261.c b/sound/soc/rk29/rk29_rt3261.c index c10c97db7744..d4c157bc7b83 100644 --- a/sound/soc/rk29/rk29_rt3261.c +++ b/sound/soc/rk29/rk29_rt3261.c @@ -24,7 +24,7 @@ #include "rk29_pcm.h" #include "rk29_i2s.h" -#if 1 +#if 0 #define DBG(x...) printk(KERN_INFO x) #else #define DBG(x...)