From 53d00cb8c38af426565fa5618a57fba1f43064a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E9=87=91=E6=B3=89?= Date: Tue, 21 Jan 2014 17:24:35 +0800 Subject: [PATCH] update codec driver --- sound/soc/codecs/Kconfig | 98 ++++++++- sound/soc/codecs/Makefile | 51 ++++- sound/soc/codecs/cx2070x.c | 4 +- sound/soc/codecs/es8323.c | 14 +- sound/soc/codecs/es8323_pcm.c | 6 +- sound/soc/codecs/rk1000_codec.c | 10 +- sound/soc/codecs/rk2928_codec.c | 2 +- sound/soc/codecs/rk3026_codec.c | 8 +- sound/soc/codecs/rk610_codec.c | 2 +- sound/soc/codecs/rk616_codec.c | 114 +++++----- sound/soc/codecs/rt3261-dsp.c | 2 +- sound/soc/codecs/rt3261.c | 12 +- sound/soc/codecs/rt5512.c | 8 +- sound/soc/codecs/rt5616.c | 8 +- sound/soc/codecs/rt5623.c | 2 +- sound/soc/codecs/rt5631_phone.c | 6 +- sound/soc/codecs/rt5639.c | 8 +- sound/soc/codecs/rt5640-dsp.c | 2 +- sound/soc/codecs/rt5640.c | 8 +- sound/soc/codecs/tlv320aic326x.c | 4 +- sound/soc/{rk29 => rk}/Kconfig | 196 +++++++++--------- sound/soc/rk/Makefile | 67 ++++++ sound/soc/{rk29 => rk}/rk2928-card.c | 14 +- sound/soc/{rk29 => rk}/rk29_i2s.c | 16 +- sound/soc/{rk29 => rk}/rk29_i2s.h | 0 sound/soc/{rk29 => rk}/rk30_i2s.c | 20 +- .../{rk29/rk29_aic3111.c => rk/rk_aic3111.c} | 14 +- .../{rk29/rk29_aic3262.c => rk/rk_aic3262.c} | 46 ++-- .../{rk29/rk29_ak4396.c => rk/rk_ak4396.c} | 18 +- .../{rk29/rk29_cs42l52.c => rk/rk_cs42l52.c} | 16 +- .../{rk29/rk29_cx2070x.c => rk/rk_cx2070x.c} | 18 +- .../{rk29/rk29_es8323.c => rk/rk_es8323.c} | 24 +-- sound/soc/{rk29 => rk}/rk_hdmi_i2s.c | 14 +- sound/soc/{rk29 => rk}/rk_hdmi_spdif.c | 0 .../rk_jetta_codec.c} | 26 +-- sound/soc/{rk29/rk29_pcm.c => rk/rk_pcm.c} | 4 +- sound/soc/{rk29/rk29_pcm.h => rk/rk_pcm.h} | 0 .../rk_rk1000codec.c} | 20 +- sound/soc/{rk29 => rk}/rk_rk3026.c | 28 +-- sound/soc/{rk29 => rk}/rk_rk616.c | 28 +-- .../{rk29/rk29_rt3261.c => rk/rk_rt3261.c} | 30 +-- .../{rk29/rk29_rt5512.c => rk/rk_rt5512.c} | 18 +- .../{rk29/rk29_rt5616.c => rk/rk_rt5616.c} | 28 +-- .../{rk29/rk29_rt5621.c => rk/rk_rt5621.c} | 20 +- .../{rk29/rk29_rt5625.c => rk/rk_rt5625.c} | 16 +- .../{rk29/rk29_rt5631.c => rk/rk_rt5631.c} | 26 +-- .../rk_rt5631_phone.c} | 52 ++--- .../{rk29/rk29_rt5639.c => rk/rk_rt5639.c} | 16 +- .../{rk29/rk29_rt5640.c => rk/rk_rt5640.c} | 30 +-- sound/soc/{rk29 => rk}/rk_spdif.c | 2 +- .../{rk29/rk29_wm8900.c => rk/rk_wm8900.c} | 20 +- .../{rk29/rk29_wm8988.c => rk/rk_wm8988.c} | 14 +- .../{rk29/rk29_wm8994.c => rk/rk_wm8994.c} | 28 +-- sound/soc/rk29/Makefile | 67 ------ 54 files changed, 711 insertions(+), 594 deletions(-) rename sound/soc/{rk29 => rk}/Kconfig (69%) create mode 100755 sound/soc/rk/Makefile rename sound/soc/{rk29 => rk}/rk2928-card.c (92%) rename sound/soc/{rk29 => rk}/rk29_i2s.c (98%) rename sound/soc/{rk29 => rk}/rk29_i2s.h (100%) rename sound/soc/{rk29 => rk}/rk30_i2s.c (98%) rename sound/soc/{rk29/rk29_aic3111.c => rk/rk_aic3111.c} (95%) rename sound/soc/{rk29/rk29_aic3262.c => rk/rk_aic3262.c} (93%) rename sound/soc/{rk29/rk29_ak4396.c => rk/rk_ak4396.c} (92%) rename sound/soc/{rk29/rk29_cs42l52.c => rk/rk_cs42l52.c} (94%) rename sound/soc/{rk29/rk29_cx2070x.c => rk/rk_cx2070x.c} (94%) rename sound/soc/{rk29/rk29_es8323.c => rk/rk_es8323.c} (92%) rename sound/soc/{rk29 => rk}/rk_hdmi_i2s.c (92%) rename sound/soc/{rk29 => rk}/rk_hdmi_spdif.c (100%) rename sound/soc/{rk29/rk29_jetta_codec.c => rk/rk_jetta_codec.c} (90%) rename sound/soc/{rk29/rk29_pcm.c => rk/rk_pcm.c} (99%) rename sound/soc/{rk29/rk29_pcm.h => rk/rk_pcm.h} (100%) rename sound/soc/{rk29/rk29_rk1000codec.c => rk/rk_rk1000codec.c} (88%) rename sound/soc/{rk29 => rk}/rk_rk3026.c (92%) rename sound/soc/{rk29 => rk}/rk_rk616.c (93%) rename sound/soc/{rk29/rk29_rt3261.c => rk/rk_rt3261.c} (93%) rename sound/soc/{rk29/rk29_rt5512.c => rk/rk_rt5512.c} (95%) rename sound/soc/{rk29/rk29_rt5616.c => rk/rk_rt5616.c} (91%) rename sound/soc/{rk29/rk29_rt5621.c => rk/rk_rt5621.c} (93%) rename sound/soc/{rk29/rk29_rt5625.c => rk/rk_rt5625.c} (91%) rename sound/soc/{rk29/rk29_rt5631.c => rk/rk_rt5631.c} (92%) rename sound/soc/{rk29/rk29_rt5631_phone.c => rk/rk_rt5631_phone.c} (88%) rename sound/soc/{rk29/rk29_rt5639.c => rk/rk_rt5639.c} (91%) rename sound/soc/{rk29/rk29_rt5640.c => rk/rk_rt5640.c} (93%) rename sound/soc/{rk29 => rk}/rk_spdif.c (99%) rename sound/soc/{rk29/rk29_wm8900.c => rk/rk_wm8900.c} (95%) rename sound/soc/{rk29/rk29_wm8988.c => rk/rk_wm8988.c} (94%) rename sound/soc/{rk29/rk29_wm8994.c => rk/rk_wm8994.c} (95%) delete mode 100755 sound/soc/rk29/Makefile diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 2f45f00e31b0..998c628c479d 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -42,6 +42,8 @@ config SND_SOC_ALL_CODECS select SND_SOC_DA9055 if I2C select SND_SOC_DFBMCS320 select SND_SOC_ISABELLE if I2C + select SND_SOC_ES8323 if SND_SOC_I2C_AND_SPI + select SND_SOC_ES8323_PCM if SND_SOC_I2C_AND_SPI select SND_SOC_JZ4740_CODEC select SND_SOC_LM4857 if I2C select SND_SOC_LM49453 if I2C @@ -55,11 +57,12 @@ config SND_SOC_ALL_CODECS select SND_SOC_ML26124 if I2C select SND_SOC_OMAP_HDMI_CODEC if OMAP4_DSS_HDMI select SND_SOC_PCM3008 - select SND_SOC_RT5631 if I2C select SND_SOC_SGTL5000 if I2C select SND_SOC_SI476X if MFD_SI476X_CORE select SND_SOC_SN95031 if INTEL_SCU_IPC - select SND_SOC_SPDIF + select SND_SOC_HDMI_I2S + select SND_SOC_HDMI_SPDIF + select SND_SOC_SSM2602 if SND_SOC_I2C_AND_SPI select SND_SOC_STA32X if I2C select SND_SOC_STA529 if I2C @@ -71,6 +74,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_TLV320AIC3X if I2C select SND_SOC_TPA6130A2 if I2C select SND_SOC_TLV320DAC33 if I2C + select SND_SOC_TLV320AIC3111 if I2C select SND_SOC_TWL4030 if TWL4030_CORE select SND_SOC_TWL6040 if TWL6040_CORE select SND_SOC_UDA134X @@ -101,6 +105,20 @@ config SND_SOC_ALL_CODECS select SND_SOC_WM8782 select SND_SOC_WM8804 if SND_SOC_I2C_AND_SPI select SND_SOC_WM8900 if I2C + select SND_SOC_RT5621 if I2C + select SND_SOC_RT5631 if I2C + select SND_SOC_AK4396 if SPI_MASTER + select SND_SOC_RT5631_PHONE if I2C + select SND_SOC_RT5625 if I2C + select SND_SOC_RT5640 if I2C + select SND_SOC_RT3261 if I2C + select SND_SOC_RT3224 if I2C + select SND_SOC_RT5623 if I2C + select SND_SOC_RT5639 if I2C + select SND_SOC_RT5616 if I2C + select SND_SOC_RT5512 if I2C + select SND_SOC_RK610 if I2C + select SND_SOC_RK616 if I2C select SND_SOC_WM8903 if I2C && GENERIC_HARDIRQS select SND_SOC_WM8904 if I2C select SND_SOC_WM8940 if I2C @@ -269,6 +287,9 @@ config SND_SOC_DFBMCS320 config SND_SOC_DMIC tristate +config SND_SOC_ES8323 + tristate + config SND_SOC_ISABELLE tristate @@ -293,9 +314,6 @@ config SND_SOC_OMAP_HDMI_CODEC config SND_SOC_PCM3008 tristate -config SND_SOC_RT5631 - tristate - #Freescale sgtl5000 codec config SND_SOC_SGTL5000 tristate @@ -310,9 +328,13 @@ config SND_SOC_SIGMADSP config SND_SOC_SN95031 tristate -config SND_SOC_SPDIF +config SND_SOC_HDMI_I2S + tristate + +config SND_SOC_HDMI_SPDIF tristate + config SND_SOC_SSM2602 tristate @@ -344,6 +366,9 @@ config SND_SOC_TLV320AIC3X config SND_SOC_TLV320DAC33 tristate +config SND_SOC_TLV320AIC3111 + tristate + config SND_SOC_TWL4030 select MFD_TWL4030_AUDIO tristate @@ -435,6 +460,42 @@ config SND_SOC_WM8804 config SND_SOC_WM8900 tristate +config SND_SOC_RT5621 + tristate + +config SND_SOC_RT5623 + tristate + +config SND_SOC_RT5639 + tristate + +config SND_SOC_RT5616 + tristate + +config SND_SOC_AK4396 + tristate + +config SND_SOC_RT5631 + tristate + +config SND_SOC_RT5631_PHONE + tristate + +config SND_SOC_RT5625 + tristate + +config SND_SOC_RT5640 + select SND_HWDEP + tristate + +config SND_SOC_RT3224 + select SND_HWDEP + tristate + +config SND_SOC_RT3261 + select SND_HWDEP + tristate + config SND_SOC_WM8903 tristate @@ -507,6 +568,31 @@ config SND_SOC_WM9712 config SND_SOC_WM9713 tristate +config SND_SOC_RK1000 + tristate +# depends on RK1000_CONTROL + +config SND_SOC_RK610 + tristate + depends on MFD_RK610 + +config SND_SOC_RK616 + tristate + depends on MFD_RK616 + +config SND_SOC_RK2928 + tristate + depends on ARCH_RK2928 + +config SND_SOC_RK3026 + tristate + depends on ARCH_RK3026 + +config SND_SOC_RK3190 + tristate + #depends on ARCH_RK3190 + + # Amp config SND_SOC_LM4857 tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index b9e41c9a1f4c..4cbe4959ae2b 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -29,6 +29,8 @@ snd-soc-da732x-objs := da732x.o snd-soc-da9055-objs := da9055.o snd-soc-dfbmcs320-objs := dfbmcs320.o snd-soc-dmic-objs := dmic.o +snd-soc-es8323-objs := es8323.o +snd-soc-es8323-pcm-objs := es8323_pcm.o snd-soc-isabelle-objs := isabelle.o snd-soc-jz4740-codec-objs := jz4740.o snd-soc-l3-objs := l3.o @@ -50,8 +52,8 @@ snd-soc-alc5632-objs := alc5632.o snd-soc-sigmadsp-objs := sigmadsp.o snd-soc-si476x-objs := si476x.o snd-soc-sn95031-objs := sn95031.o -snd-soc-spdif-tx-objs := spdif_transciever.o -snd-soc-spdif-rx-objs := spdif_receiver.o +snd-soc-hdmi-i2s-objs := hdmi_i2s.o +snd-soc-hdmi-spdif-objs := hdmi_spdif.o snd-soc-ssm2602-objs := ssm2602.o snd-soc-sta32x-objs := sta32x.o snd-soc-sta529-objs := sta529.o @@ -61,6 +63,7 @@ snd-soc-tlv320aic23-objs := tlv320aic23.o snd-soc-tlv320aic26-objs := tlv320aic26.o snd-soc-tlv320aic3x-objs := tlv320aic3x.o snd-soc-tlv320aic32x4-objs := tlv320aic32x4.o +snd-soc-tlv320aic3111-objs := tlv320aic3111.o snd-soc-tlv320dac33-objs := tlv320dac33.o snd-soc-twl4030-objs := twl4030.o snd-soc-twl6040-objs := twl6040.o @@ -93,6 +96,14 @@ snd-soc-wm8776-objs := wm8776.o snd-soc-wm8782-objs := wm8782.o snd-soc-wm8804-objs := wm8804.o snd-soc-wm8900-objs := wm8900.o +snd-soc-rt5621-objs := rt5621.o +snd-soc-rt5623-objs := rt5623.o +snd-soc-rt5631-objs := rt5631.o +snd-soc-ak4396-objs := ak4396.o +snd-soc-rt5616-objs := rt5616.o +snd-soc-rt5631-phone-objs := rt5631_phone.o +snd-soc-rt5625-objs := rt5625.o +snd-soc-cs42l52-objs := cs42l52.o snd-soc-wm8903-objs := wm8903.o snd-soc-wm8904-objs := wm8904.o snd-soc-wm8996-objs := wm8996.o @@ -118,11 +129,26 @@ snd-soc-wm9705-objs := wm9705.o snd-soc-wm9712-objs := wm9712.o snd-soc-wm9713-objs := wm9713.o snd-soc-wm-hubs-objs := wm_hubs.o +snd-soc-rk1000-objs := rk1000_codec.o +snd-soc-jz4740-codec-objs := jz4740.o +snd-soc-rk610-objs := rk610_codec.o +snd-soc-rk616-objs := rk616_codec.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 +snd-soc-rt3224-objs := rt3261.o rt3261_ioctl.o rt_codec_ioctl.o +snd-soc-rk2928-objs := rk2928_codec.o +snd-soc-rk3026-objs := rk3026_codec.o +snd-soc-rk3190-objs := rk3190_codec.o +snd-soc-rt5639-objs := rt5639.o rt5639_ioctl.o rt56xx_ioctl.o # Amp snd-soc-max9877-objs := max9877.o snd-soc-tpa6130a2-objs := tpa6130a2.o +obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o +obj-$(CONFIG_SND_SOC_RT3261) += snd-soc-rt3261.o +obj-$(CONFIG_SND_SOC_RT3224) += snd-soc-rt3224.o +obj-$(CONFIG_SND_SOC_RT5639) += snd-soc-rt5639.o obj-$(CONFIG_SND_SOC_88PM860X) += snd-soc-88pm860x.o obj-$(CONFIG_SND_SOC_AB8500_CODEC) += snd-soc-ab8500-codec.o obj-$(CONFIG_SND_SOC_AC97_CODEC) += snd-soc-ac97.o @@ -156,6 +182,8 @@ obj-$(CONFIG_SND_SOC_DA732X) += snd-soc-da732x.o obj-$(CONFIG_SND_SOC_DA9055) += snd-soc-da9055.o obj-$(CONFIG_SND_SOC_DFBMCS320) += snd-soc-dfbmcs320.o obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o +obj-$(CONFIG_SND_SOC_ES8323) += snd-soc-es8323.o +obj-$(CONFIG_SND_SOC_ES8323_PCM) += snd-soc-es8323-pcm.o obj-$(CONFIG_SND_SOC_ISABELLE) += snd-soc-isabelle.o obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o @@ -175,7 +203,8 @@ obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o -obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o +obj-$(CONFIG_SND_SOC_HDMI_I2S) += snd-soc-hdmi-i2s.o +obj-$(CONFIG_SND_SOC_HDMI_SPDIF) += snd-soc-hdmi-spdif.o obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o obj-$(CONFIG_SND_SOC_STA32X) += snd-soc-sta32x.o obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o @@ -185,6 +214,7 @@ obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o obj-$(CONFIG_SND_SOC_TLV320AIC26) += snd-soc-tlv320aic26.o obj-$(CONFIG_SND_SOC_TLV320AIC3X) += snd-soc-tlv320aic3x.o obj-$(CONFIG_SND_SOC_TLV320AIC32X4) += snd-soc-tlv320aic32x4.o +obj-$(CONFIG_SND_SOC_TLV320AIC3111) += snd-soc-tlv320aic3111.o obj-$(CONFIG_SND_SOC_TLV320DAC33) += snd-soc-tlv320dac33.o obj-$(CONFIG_SND_SOC_TWL4030) += snd-soc-twl4030.o obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o @@ -216,6 +246,14 @@ obj-$(CONFIG_SND_SOC_WM8776) += snd-soc-wm8776.o obj-$(CONFIG_SND_SOC_WM8782) += snd-soc-wm8782.o obj-$(CONFIG_SND_SOC_WM8804) += snd-soc-wm8804.o obj-$(CONFIG_SND_SOC_WM8900) += snd-soc-wm8900.o +obj-$(CONFIG_SND_SOC_RT5621) += snd-soc-rt5621.o +obj-$(CONFIG_SND_SOC_RT5623) += snd-soc-rt5623.o +obj-$(CONFIG_SND_SOC_AK4396) += snd-soc-ak4396.o +obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o +obj-$(CONFIG_SND_SOC_RT5616) += snd-soc-rt5616.o +obj-$(CONFIG_SND_SOC_RT5631_PHONE) += snd-soc-rt5631-phone.o +obj-$(CONFIG_SND_SOC_RT5625) += snd-soc-rt5625.o +obj-$(CONFIG_SND_SOC_CS42L52) += snd-soc-cs42l52.o obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o obj-$(CONFIG_SND_SOC_WM8904) += snd-soc-wm8904.o obj-$(CONFIG_SND_SOC_WM8996) += snd-soc-wm8996.o @@ -242,6 +280,13 @@ obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o obj-$(CONFIG_SND_SOC_WM_ADSP) += snd-soc-wm-adsp.o obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o +obj-$(CONFIG_SND_SOC_RK1000) += snd-soc-rk1000.o +obj-$(CONFIG_SND_SOC_RK610) += snd-soc-rk610.o +obj-$(CONFIG_SND_SOC_RK616) += snd-soc-rk616.o +obj-$(CONFIG_SND_SOC_RK2928) += snd-soc-rk2928.o +obj-$(CONFIG_SND_SOC_RK3026) += snd-soc-rk3026.o +obj-$(CONFIG_SND_SOC_RK3190) += snd-soc-rk3190.o +obj-$(CONFIG_SND_SOC_RT5512) += snd-soc-rt5512.o # Amp obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o diff --git a/sound/soc/codecs/cx2070x.c b/sound/soc/codecs/cx2070x.c index 3fe2141fb713..47e6dfd9aab1 100755 --- a/sound/soc/codecs/cx2070x.c +++ b/sound/soc/codecs/cx2070x.c @@ -902,7 +902,7 @@ static int cx2070x_add_controls(struct snd_soc_codec *codec) { INFO("%lu: %s() called\n",jiffies,__func__); - return (snd_soc_add_controls(codec, cx2070x_snd_controls, ARRAY_SIZE(cx2070x_snd_controls))); + return (snd_soc_add_codec_controls(codec, cx2070x_snd_controls, ARRAY_SIZE(cx2070x_snd_controls))); } static int hpportpga_event(struct snd_soc_dapm_widget *w, @@ -1785,7 +1785,7 @@ static int NOINLINE cx2070x_init(struct snd_soc_codec* codec) //cx2070x_add_controls(codec); //cx2070x_add_widgets(codec); - snd_soc_add_controls(codec, cx2070x_snd_path_controls, + snd_soc_add_codec_controls(codec, cx2070x_snd_path_controls, ARRAY_SIZE(cx2070x_snd_path_controls)); //snd_soc_dapm_nc_pin(&codec->dapm, "LINE IN"); diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c index cbbe3a911160..344796e6a70a 100755 --- a/sound/soc/codecs/es8323.c +++ b/sound/soc/codecs/es8323.c @@ -1126,7 +1126,7 @@ snd_soc_write(codec, 0x04,0x2c); //pdn_ana=0,ibiasgen_pdn=0 //s8323_set_bias_level(codec, SND_SOC_BIAS_STANDBY); //codec->dapm.bias_level = SND_SOC_BIAS_STANDBY; - snd_soc_add_controls(codec, es8323_snd_controls, + snd_soc_add_codec_controls(codec, es8323_snd_controls, ARRAY_SIZE(es8323_snd_controls)); snd_soc_dapm_new_controls(dapm, es8323_dapm_widgets, ARRAY_SIZE(es8323_dapm_widgets)); @@ -1191,7 +1191,7 @@ static struct snd_soc_codec_driver soc_codec_dev_es8323 = { }; #if defined(CONFIG_SPI_MASTER) -static int __devinit es8323_spi_probe(struct spi_device *spi) +static int es8323_spi_probe(struct spi_device *spi) { struct es8323_priv *es8323; int ret; @@ -1210,7 +1210,7 @@ static int __devinit es8323_spi_probe(struct spi_device *spi) return ret; } -static int __devexit es8323_spi_remove(struct spi_device *spi) +static int es8323_spi_remove(struct spi_device *spi) { snd_soc_unregister_codec(&spi->dev); kfree(spi_get_drvdata(spi)); @@ -1223,7 +1223,7 @@ static struct spi_driver es8323_spi_driver = { .owner = THIS_MODULE, }, .probe = es8323_spi_probe, - .remove = __devexit_p(es8323_spi_remove), + .remove = es8323_spi_remove, }; #endif /* CONFIG_SPI_MASTER */ @@ -1306,7 +1306,7 @@ static ssize_t es8323_store(struct device *dev, static struct device *es8323_dev = NULL; static struct class *es8323_class = NULL; static DEVICE_ATTR(es8323, 0664, es8323_show, es8323_store); -static __devinit int es8323_i2c_probe(struct i2c_client *i2c, +static int es8323_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -1363,7 +1363,7 @@ static __devinit int es8323_i2c_probe(struct i2c_client *i2c, return ret; } -static __devexit int es8323_i2c_remove(struct i2c_client *client) +static int es8323_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); kfree(i2c_get_clientdata(client)); @@ -1475,7 +1475,7 @@ static struct i2c_driver es8323_i2c_driver = { .owner = THIS_MODULE, }, .probe = es8323_i2c_probe, - .remove = __devexit_p(es8323_i2c_remove), + .remove = es8323_i2c_remove, .shutdown = es8323_i2c_shutdown, .suspend = es8323_i2c_suspend, .resume = es8323_i2c_resume, diff --git a/sound/soc/codecs/es8323_pcm.c b/sound/soc/codecs/es8323_pcm.c index a318f0a41128..8000d51c4206 100755 --- a/sound/soc/codecs/es8323_pcm.c +++ b/sound/soc/codecs/es8323_pcm.c @@ -211,7 +211,7 @@ MODULE_DEVICE_TABLE(i2c, es8323_i2c_id); static int es8323_proc_init(void); #endif -static int __devinit es8323_i2c_probe(struct i2c_client *i2c, +static int es8323_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { DBG("%s\n", __func__); @@ -226,7 +226,7 @@ static int __devinit es8323_i2c_probe(struct i2c_client *i2c, return 0; } -static int __devexit es8323_i2c_remove(struct i2c_client *i2c) +static int es8323_i2c_remove(struct i2c_client *i2c) { return 0; } @@ -237,7 +237,7 @@ struct i2c_driver es8323_i2c_driver = { .owner = THIS_MODULE, }, .probe = es8323_i2c_probe, - .remove = __devexit_p(es8323_i2c_remove), + .remove = es8323_i2c_remove, .id_table = es8323_i2c_id, }; diff --git a/sound/soc/codecs/rk1000_codec.c b/sound/soc/codecs/rk1000_codec.c index d6b796a9acaf..5ac8f15ed0c3 100755 --- a/sound/soc/codecs/rk1000_codec.c +++ b/sound/soc/codecs/rk1000_codec.c @@ -834,7 +834,7 @@ static int rk1000_codec_probe(struct snd_soc_codec *codec) return -ENOMEM; rk1000_reg_init(codec); -// snd_soc_add_controls(codec, rk1000_codec_snd_controls, +// snd_soc_add_codec_controls(codec, rk1000_codec_snd_controls, // ARRAY_SIZE(rk1000_codec_snd_controls)); // snd_soc_dapm_new_controls(codec, rk1000_codec_dapm_widgets, // ARRAY_SIZE(rk1000_codec_dapm_widgets)); @@ -873,7 +873,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rk1000_codec = { static int rk1000_codec_proc_init(void); #endif -static __devinit int rk1000_codec_i2c_probe(struct i2c_client *i2c, +static int rk1000_codec_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rk1000_codec_priv *rk1000_codec; @@ -899,7 +899,7 @@ static __devinit int rk1000_codec_i2c_probe(struct i2c_client *i2c, return ret; } -static __devexit int rk1000_codec_i2c_remove(struct i2c_client *client) +static int rk1000_codec_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); kfree(i2c_get_clientdata(client)); @@ -919,7 +919,7 @@ static struct i2c_driver rk1000_codec_i2c_driver = { .owner = THIS_MODULE, }, .probe = rk1000_codec_i2c_probe, - .remove = __devexit_p(rk1000_codec_i2c_remove), + .remove = rk1000_codec_i2c_remove, .id_table = rk1000_codec_i2c_id, }; @@ -1162,4 +1162,4 @@ module_exit(rk1000_control_exit); MODULE_DESCRIPTION("ASoC RK1000 CODEC driver"); MODULE_AUTHOR("lhh lhh@rock-chips.com"); MODULE_LICENSE("GPL"); -#endif \ No newline at end of file +#endif diff --git a/sound/soc/codecs/rk2928_codec.c b/sound/soc/codecs/rk2928_codec.c index db03786f1340..17ea4849e4c6 100755 --- a/sound/soc/codecs/rk2928_codec.c +++ b/sound/soc/codecs/rk2928_codec.c @@ -632,7 +632,7 @@ static struct snd_soc_dai_driver rk2928_codec_dai = { .ops = &rk2928_audio_codec_ops, }; -static __devinit int rk2928_codec_probe(struct platform_device *pdev) +static int rk2928_codec_probe(struct platform_device *pdev) { int r; diff --git a/sound/soc/codecs/rk3026_codec.c b/sound/soc/codecs/rk3026_codec.c index 2d3ee646eb07..42cfec90f2b3 100755 --- a/sound/soc/codecs/rk3026_codec.c +++ b/sound/soc/codecs/rk3026_codec.c @@ -2087,7 +2087,7 @@ static int rk3026_probe(struct snd_soc_codec *codec) codec->dapm.bias_level = SND_SOC_BIAS_OFF; rk3026_set_bias_level(codec, SND_SOC_BIAS_STANDBY); - snd_soc_add_controls(codec, rk3026_snd_controls, + snd_soc_add_codec_controls(codec, rk3026_snd_controls, ARRAY_SIZE(rk3026_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rk3026_dapm_widgets, ARRAY_SIZE(rk3026_dapm_widgets)); @@ -2163,7 +2163,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rk3026 = { .reg_cache_step = sizeof(unsigned int), }; -static __devinit int rk3026_platform_probe(struct platform_device *pdev) +static int rk3026_platform_probe(struct platform_device *pdev) { DBG("%s\n", __func__); @@ -2171,7 +2171,7 @@ static __devinit int rk3026_platform_probe(struct platform_device *pdev) &soc_codec_dev_rk3026, rk3026_dai, ARRAY_SIZE(rk3026_dai)); } -static __devexit int rk3026_platform_remove(struct platform_device *pdev) +static int rk3026_platform_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); return 0; @@ -2217,7 +2217,7 @@ static struct platform_driver rk3026_codec_driver = { .owner = THIS_MODULE, }, .probe = rk3026_platform_probe, - .remove = __devexit_p(rk3026_platform_remove), + .remove = rk3026_platform_remove, .shutdown = rk3026_platform_shutdown, }; diff --git a/sound/soc/codecs/rk610_codec.c b/sound/soc/codecs/rk610_codec.c index 92b94e403de9..0ea4b8214d6b 100755 --- a/sound/soc/codecs/rk610_codec.c +++ b/sound/soc/codecs/rk610_codec.c @@ -631,7 +631,7 @@ static int rk610_codec_pcm_hw_params(struct snd_pcm_substream *substream, rk610_codec_write(codec,ACCELCODEC_R0B, ASC_DEC_DISABLE|ASC_INT_DISABLE); //0x00 /* set iface & srate */ - #ifdef CONFIG_SND_RK29_CODEC_SOC_MASTER + #ifdef CONFIG_SND_RK_CODEC_SOC_MASTER iface |= ASC_INVERT_BCLK;//·­×ªBCLK master״̬ËͳöµÄÉÙÁË°ë¸öʱÖÓ£¬µ¼ÖÂδµ½×î´óÒôÁ¿µÄʱºòÆÆÒô¡¢ #endif rk610_codec_write(codec, ACCELCODEC_R09, iface); diff --git a/sound/soc/codecs/rk616_codec.c b/sound/soc/codecs/rk616_codec.c index a531fe9b2856..166527baa052 100755 --- a/sound/soc/codecs/rk616_codec.c +++ b/sound/soc/codecs/rk616_codec.c @@ -33,6 +33,8 @@ //#define RK616_HPMIC_FROM_LINEIN +//#define RK616_HPMIC_FROM_MIC2IN + //#define VIRTUAL_HPGND /* volume setting @@ -628,8 +630,11 @@ void codec_set_spk(bool on) } else { + mutex_lock(&codec->mutex); snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack"); snd_soc_dapm_enable_pin(&codec->dapm, "Ext Spk"); + snd_soc_dapm_sync(&codec->dapm); + mutex_unlock(&codec->mutex); } } else { rk616_set_gpio(RK616_CODEC_SET_SPK | RK616_CODEC_SET_HP, GPIO_LOW); @@ -647,11 +652,13 @@ void codec_set_spk(bool on) } else { + mutex_lock(&codec->mutex); snd_soc_dapm_disable_pin(&codec->dapm, "Headphone Jack"); snd_soc_dapm_disable_pin(&codec->dapm, "Ext Spk"); + snd_soc_dapm_sync(&codec->dapm); + mutex_unlock(&codec->mutex); } } - snd_soc_dapm_sync(&codec->dapm); is_hdmi_in = on ? 0 : 1; } @@ -1130,6 +1137,17 @@ int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol, return 0; } +#define SOC_DOUBLE_R_STEP_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ + .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ + SNDRV_CTL_ELEM_ACCESS_READWRITE,\ + .tlv.p = (tlv_array), \ + .info = snd_soc_info_volsw_2r, \ + .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ + .private_value = (unsigned long)&(struct soc_mixer_control) \ + {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ + .max = xmax, .platform_max = xmax, .invert = xinvert} } + #define SOC_GPIO_ENUM(xname, xenum) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ .info = snd_soc_info_enum_double, \ @@ -1139,41 +1157,12 @@ int snd_soc_put_gpio_enum_double(struct snd_kcontrol *kcontrol, static const struct snd_kcontrol_new rk616_snd_controls[] = { //add for incall volume setting - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = ("Speaker Playback Volume"),\ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (out_vol_tlv), \ - .info = snd_soc_info_volsw_2r, \ - .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ - .private_value = (unsigned long)&(struct soc_mixer_control) \ - {.reg = RK616_SPKL_CTL, .rreg = RK616_SPKR_CTL, .shift = RK616_VOL_SFT, \ - .max = SPKOUT_VOLUME, .platform_max = SPKOUT_VOLUME, .invert = 0} - }, - - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = ("Headphone Playback Volume"),\ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (out_vol_tlv), \ - .info = snd_soc_info_volsw_2r, \ - .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ - .private_value = (unsigned long)&(struct soc_mixer_control) \ - {.reg = RK616_HPL_CTL, .rreg = RK616_HPR_CTL, .shift = RK616_VOL_SFT, \ - .max = HPOUT_VOLUME, .platform_max = HPOUT_VOLUME, .invert = 0} - }, - - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = ("Earpiece Playback Volume"),\ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (out_vol_tlv), \ - .info = snd_soc_info_volsw_2r, \ - .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ - .private_value = (unsigned long)&(struct soc_mixer_control) \ - {.reg = RK616_SPKL_CTL, .rreg = RK616_SPKR_CTL, .shift = RK616_VOL_SFT, \ - .max = SPKOUT_VOLUME, .platform_max = SPKOUT_VOLUME, .invert = 0} - }, + SOC_DOUBLE_R_STEP_TLV("Speaker Playback Volume", RK616_SPKL_CTL, + RK616_SPKR_CTL, RK616_VOL_SFT, SPKOUT_VOLUME, 0, out_vol_tlv), + SOC_DOUBLE_R_STEP_TLV("Headphone Playback Volume", RK616_HPL_CTL, + RK616_HPR_CTL, RK616_VOL_SFT, HPOUT_VOLUME, 0, out_vol_tlv), + SOC_DOUBLE_R_STEP_TLV("Earpiece Playback Volume", RK616_SPKL_CTL, + RK616_SPKR_CTL, RK616_VOL_SFT, SPKOUT_VOLUME, 0, out_vol_tlv), SOC_DOUBLE_R("Speaker Playback Switch", RK616_SPKL_CTL, RK616_SPKR_CTL, RK616_MUTE_SFT, 1, 1), @@ -1476,6 +1465,9 @@ static int rk616_capture_path_put(struct snd_kcontrol *kcontrol, { struct rk616_codec_priv *rk616 = rk616_priv; long int pre_path; +#if (defined RK616_HPMIC_FROM_LINEIN) || (defined RK616_HPMIC_FROM_MIC2IN) + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); +#endif if (!rk616) { printk("%s : rk616_priv is NULL\n", __func__); @@ -1505,6 +1497,11 @@ static int rk616_capture_path_put(struct snd_kcontrol *kcontrol, #ifdef RK616_HPMIC_FROM_LINEIN snd_soc_write(codec, 0x848, 0x06); //MIXINL power up and unmute, MININL from MICMUX, MICMUX from BST_L #endif + +#ifdef RK616_HPMIC_FROM_MIC2IN + snd_soc_write(codec, 0x848, 0x06); //MIXINL power up and unmute, MININL from MICMUX, MICMUX from BST_L + snd_soc_write(codec, 0x840, 0x69); //BST_L power up, unmute, and Single-Ended(bit 6), volume 0-20dB(bit 5) +#endif rk616_set_gpio(RK616_CODEC_SET_MIC, GPIO_HIGH); break; case Hands_Free_Mic: @@ -1514,6 +1511,11 @@ static int rk616_capture_path_put(struct snd_kcontrol *kcontrol, #ifdef RK616_HPMIC_FROM_LINEIN snd_soc_write(codec, 0x848, 0x03); //MIXINL power up and unmute, MININL from MICMUX, MICMUX from IN3L #endif + +#ifdef RK616_HPMIC_FROM_MIC2IN + snd_soc_write(codec, 0x848, 0x26); //MIXINL power up and unmute, MININL from MICMUX, MICMUX from BST_R + snd_soc_write(codec, 0x840, 0x96); //BST_R power up, unmute, and Single-Ended(bit 2), volume 0-20dB(bit 1) +#endif rk616_set_gpio(RK616_CODEC_SET_MIC, GPIO_LOW); break; case BT_Sco_Mic: @@ -1875,29 +1877,13 @@ static const struct snd_kcontrol_new rk616_snd_path_controls[] = { rk616_voip_path_get, rk616_voip_path_put), //add for incall volume setting - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = ("Speaker Playback Volume"),\ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (out_vol_tlv), \ - .info = snd_soc_info_volsw_2r, \ - .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ - .private_value = (unsigned long)&(struct soc_mixer_control) \ - {.reg = RK616_SPKL_CTL, .rreg = RK616_SPKR_CTL, .shift = RK616_VOL_SFT, \ - .max = SPKOUT_VOLUME, .platform_max = SPKOUT_VOLUME, .invert = 0} - }, - - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = ("Headphone Playback Volume"),\ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (out_vol_tlv), \ - .info = snd_soc_info_volsw_2r, \ - .get = snd_soc_get_volsw_2r, .put = snd_soc_put_step_volsw_2r, \ - .private_value = (unsigned long)&(struct soc_mixer_control) \ - {.reg = RK616_SPKL_CTL, .rreg = RK616_SPKR_CTL, .shift = RK616_VOL_SFT, \ - .max = SPKOUT_VOLUME, .platform_max = SPKOUT_VOLUME, .invert = 0} - }, + SOC_DOUBLE_R_STEP_TLV("Speaker Playback Volume", RK616_SPKL_CTL, + RK616_SPKR_CTL, RK616_VOL_SFT, SPKOUT_VOLUME, 0, out_vol_tlv), + SOC_DOUBLE_R_STEP_TLV("Headphone Playback Volume", RK616_SPKL_CTL, + RK616_SPKR_CTL, RK616_VOL_SFT, HPOUT_VOLUME, 0, out_vol_tlv), + //Earpiece incall volume is setting by modem + //SOC_DOUBLE_R_STEP_TLV("Earpiece Playback Volume", RK616_SPKL_CTL, + //RK616_SPKR_CTL, RK616_VOL_SFT, SPKOUT_VOLUME, 0, out_vol_tlv), /* * When modem connecting, it will make some pop noise. @@ -2830,7 +2816,7 @@ static int rk616_probe(struct snd_soc_codec *codec) rk616_reset(codec); if (rk616_for_mid) { - snd_soc_add_controls(codec, rk616_snd_path_controls, + snd_soc_add_codec_controls(codec, rk616_snd_path_controls, ARRAY_SIZE(rk616_snd_path_controls)); snd_soc_write(codec, RK616_MICBIAS_CTL, RK616_MICBIAS2_PWRD | RK616_MICBIAS1_V_1_7); @@ -2838,7 +2824,7 @@ static int rk616_probe(struct snd_soc_codec *codec) codec->dapm.bias_level = SND_SOC_BIAS_OFF; rk616_set_bias_level(codec, SND_SOC_BIAS_STANDBY); - snd_soc_add_controls(codec, rk616_snd_controls, + snd_soc_add_codec_controls(codec, rk616_snd_controls, ARRAY_SIZE(rk616_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rk616_dapm_widgets, ARRAY_SIZE(rk616_dapm_widgets)); @@ -2896,7 +2882,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rk616 = { .readable_register = rk616_codec_register, }; -static __devinit int rk616_platform_probe(struct platform_device *pdev) +static int rk616_platform_probe(struct platform_device *pdev) { struct mfd_rk616 *rk616 = dev_get_drvdata(pdev->dev.parent); @@ -2913,7 +2899,7 @@ static __devinit int rk616_platform_probe(struct platform_device *pdev) &soc_codec_dev_rk616, rk616_dai, ARRAY_SIZE(rk616_dai)); } -static __devexit int rk616_platform_remove(struct platform_device *pdev) +static int rk616_platform_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); return 0; @@ -2951,7 +2937,7 @@ static struct platform_driver rk616_codec_driver = { .owner = THIS_MODULE, }, .probe = rk616_platform_probe, - .remove = __devexit_p(rk616_platform_remove), + .remove = rk616_platform_remove, .shutdown = rk616_platform_shutdown, }; diff --git a/sound/soc/codecs/rt3261-dsp.c b/sound/soc/codecs/rt3261-dsp.c index 3618fcc788b2..c425c94e9455 100644 --- a/sound/soc/codecs/rt3261-dsp.c +++ b/sound/soc/codecs/rt3261-dsp.c @@ -1156,7 +1156,7 @@ int rt3261_dsp_probe(struct snd_soc_codec *codec) if (codec == NULL) return -EINVAL; - snd_soc_add_controls(codec, rt3261_dsp_snd_controls, + snd_soc_add_codec_controls(codec, rt3261_dsp_snd_controls, ARRAY_SIZE(rt3261_dsp_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt3261_dsp_dapm_widgets, ARRAY_SIZE(rt3261_dsp_dapm_widgets)); diff --git a/sound/soc/codecs/rt3261.c b/sound/soc/codecs/rt3261.c index 71aae73386a8..ee38eec20ba0 100755 --- a/sound/soc/codecs/rt3261.c +++ b/sound/soc/codecs/rt3261.c @@ -28,7 +28,7 @@ #include #include -#define RT3261_PROC +//#define RT3261_PROC #ifdef RT3261_PROC #include #include @@ -3378,7 +3378,7 @@ static int rt3261_probe(struct snd_soc_codec *codec) #if defined (CONFIG_SND_SOC_RT5623) struct clk *iis_clk; //for rt5623 MCLK use - iis_clk = clk_get_sys("rk29_i2s.2", "i2s"); + iis_clk = clk_get_sys("rk_i2s.2", "i2s"); if (IS_ERR(iis_clk)) { DBG("failed to get i2s clk\n"); ret = PTR_ERR(iis_clk); @@ -3436,7 +3436,7 @@ static int rt3261_probe(struct snd_soc_codec *codec) codec->dapm.bias_level = SND_SOC_BIAS_STANDBY; rt3261->codec = codec; - snd_soc_add_controls(codec, rt3261_snd_controls, + snd_soc_add_codec_controls(codec, rt3261_snd_controls, ARRAY_SIZE(rt3261_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt3261_dapm_widgets, ARRAY_SIZE(rt3261_dapm_widgets)); @@ -3581,7 +3581,7 @@ static const struct i2c_device_id rt3261_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt3261_i2c_id); -static int __devinit rt3261_i2c_probe(struct i2c_client *i2c, +static int rt3261_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rt3261_priv *rt3261; @@ -3618,7 +3618,7 @@ static int __devinit rt3261_i2c_probe(struct i2c_client *i2c, return ret; } -static int __devexit rt3261_i2c_remove(struct i2c_client *i2c) +static int rt3261_i2c_remove(struct i2c_client *i2c) { snd_soc_unregister_codec(&i2c->dev); kfree(i2c_get_clientdata(i2c)); @@ -3640,7 +3640,7 @@ struct i2c_driver rt3261_i2c_driver = { .owner = THIS_MODULE, }, .probe = rt3261_i2c_probe, - .remove = __devexit_p(rt3261_i2c_remove), + .remove = rt3261_i2c_remove, .shutdown = rt3261_i2c_shutdown, .id_table = rt3261_i2c_id, }; diff --git a/sound/soc/codecs/rt5512.c b/sound/soc/codecs/rt5512.c index 90b036082d9f..fc62e50ed22f 100755 --- a/sound/soc/codecs/rt5512.c +++ b/sound/soc/codecs/rt5512.c @@ -1480,7 +1480,7 @@ static int rt5512_codec_probe(struct snd_soc_codec *codec) - snd_soc_add_controls(codec, rt5512_snd_controls, + snd_soc_add_codec_controls(codec, rt5512_snd_controls, ARRAY_SIZE(rt5512_snd_controls)); return 0; } @@ -1753,7 +1753,7 @@ static const struct file_operations codec_debug_ops = { }; #endif -static int __devinit rt5512_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) +static int rt5512_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { int ret; struct rt5512_codec_chip *chip; @@ -1807,7 +1807,7 @@ codec_reg_fail: return ret; } -static int __devexit rt5512_i2c_remove(struct i2c_client *client) +static int rt5512_i2c_remove(struct i2c_client *client) { struct rt5512_codec_chip *chip = i2c_get_clientdata(client); @@ -1831,7 +1831,7 @@ struct i2c_driver rt5512_i2c_driver = .owner = THIS_MODULE, }, .probe = rt5512_i2c_probe, - .remove = __devexit_p(rt5512_i2c_remove), + .remove = rt5512_i2c_remove, .id_table = rt5512_i2c_id, }; diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index 6472a9e93c7b..7e68ce5dcf95 100755 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1533,7 +1533,7 @@ static int rt5616_probe(struct snd_soc_codec *codec) rt5616_codec = codec; - snd_soc_add_controls(codec, rt5616_snd_controls, + snd_soc_add_codec_controls(codec, rt5616_snd_controls, ARRAY_SIZE(rt5616_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt5616_dapm_widgets, ARRAY_SIZE(rt5616_dapm_widgets)); @@ -1628,7 +1628,7 @@ static const struct i2c_device_id rt5616_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id); -static int __devinit rt5616_i2c_probe(struct i2c_client *i2c, +static int rt5616_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rt5616_priv *rt5616; @@ -1649,7 +1649,7 @@ static int __devinit rt5616_i2c_probe(struct i2c_client *i2c, return ret; } -static int __devexit rt5616_i2c_remove(struct i2c_client *i2c) +static int rt5616_i2c_remove(struct i2c_client *i2c) { snd_soc_unregister_codec(&i2c->dev); kfree(i2c_get_clientdata(i2c)); @@ -1676,7 +1676,7 @@ struct i2c_driver rt5616_i2c_driver = { .owner = THIS_MODULE, }, .probe = rt5616_i2c_probe, - .remove = __devexit_p(rt5616_i2c_remove), + .remove = rt5616_i2c_remove, .shutdown = rt5616_i2c_shutdown, .id_table = rt5616_i2c_id, }; diff --git a/sound/soc/codecs/rt5623.c b/sound/soc/codecs/rt5623.c index f4ac82c7e532..9ea32e120a70 100644 --- a/sound/soc/codecs/rt5623.c +++ b/sound/soc/codecs/rt5623.c @@ -164,7 +164,7 @@ MODULE_DEVICE_TABLE(i2c, rt5623_i2c_id); static int rt5623_proc_init(void); -static int __devinit rt5623_i2c_probe(struct i2c_client *i2c, +static int rt5623_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { pr_info("%s(%d)\n", __func__, __LINE__); diff --git a/sound/soc/codecs/rt5631_phone.c b/sound/soc/codecs/rt5631_phone.c index 6409a170ea6b..df48a5fcee6f 100755 --- a/sound/soc/codecs/rt5631_phone.c +++ b/sound/soc/codecs/rt5631_phone.c @@ -2222,7 +2222,7 @@ static int rt5631_probe(struct snd_soc_codec *codec) codec->dapm.bias_level = SND_SOC_BIAS_STANDBY; rt5631->codec = codec; rt5631_codec = codec; - snd_soc_add_controls(codec, rt5631_snd_controls, + snd_soc_add_codec_controls(codec, rt5631_snd_controls, ARRAY_SIZE(rt5631_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt5631_dapm_widgets, ARRAY_SIZE(rt5631_dapm_widgets)); @@ -2363,7 +2363,7 @@ static int rt5631_i2c_probe(struct i2c_client *i2c, return ret; } -static __devexit int rt5631_i2c_remove(struct i2c_client *client) +static int rt5631_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); kfree(i2c_get_clientdata(client)); @@ -2387,7 +2387,7 @@ struct i2c_driver rt5631_i2c_driver = { .owner = THIS_MODULE, }, .probe = rt5631_i2c_probe, - .remove = __devexit_p(rt5631_i2c_remove), + .remove = rt5631_i2c_remove, .shutdown = rt5631_i2c_shutdown, .id_table = rt5631_i2c_id, }; diff --git a/sound/soc/codecs/rt5639.c b/sound/soc/codecs/rt5639.c index a35aeb05cb93..da86fb7a299b 100755 --- a/sound/soc/codecs/rt5639.c +++ b/sound/soc/codecs/rt5639.c @@ -3057,7 +3057,7 @@ static int rt5639_probe(struct snd_soc_codec *codec) codec->dapm.bias_level = SND_SOC_BIAS_STANDBY; rt5639->codec = codec; - snd_soc_add_controls(codec, rt5639_snd_controls, + snd_soc_add_codec_controls(codec, rt5639_snd_controls, ARRAY_SIZE(rt5639_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt5639_dapm_widgets, ARRAY_SIZE(rt5639_dapm_widgets)); @@ -3190,7 +3190,7 @@ static const struct i2c_device_id rt5639_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5639_i2c_id); -static int __devinit rt5639_i2c_probe(struct i2c_client *i2c, +static int rt5639_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rt5639_priv *rt5639; @@ -3210,7 +3210,7 @@ printk("rt5639 i2c probe initial\n"); return ret; } -static int __devexit rt5639_i2c_remove(struct i2c_client *i2c) +static int rt5639_i2c_remove(struct i2c_client *i2c) { snd_soc_unregister_codec(&i2c->dev); kfree(i2c_get_clientdata(i2c)); @@ -3233,7 +3233,7 @@ struct i2c_driver rt5639_i2c_driver = { .owner = THIS_MODULE, }, .probe = rt5639_i2c_probe, - .remove = __devexit_p(rt5639_i2c_remove), + .remove = rt5639_i2c_remove, .shutdown = rt5639_i2c_shutdown, .id_table = rt5639_i2c_id, }; diff --git a/sound/soc/codecs/rt5640-dsp.c b/sound/soc/codecs/rt5640-dsp.c index d5cb99966bcf..e5f2515014f0 100755 --- a/sound/soc/codecs/rt5640-dsp.c +++ b/sound/soc/codecs/rt5640-dsp.c @@ -1251,7 +1251,7 @@ int rt5640_dsp_probe(struct snd_soc_codec *codec) if (codec == NULL) return -EINVAL; - snd_soc_add_controls(codec, rt5640_dsp_snd_controls, + snd_soc_add_codec_controls(codec, rt5640_dsp_snd_controls, ARRAY_SIZE(rt5640_dsp_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt5640_dsp_dapm_widgets, ARRAY_SIZE(rt5640_dsp_dapm_widgets)); diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 33a49cec392a..545c043d5604 100755 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -3210,7 +3210,7 @@ static int rt5640_probe(struct snd_soc_codec *codec) /* by magf for codec_set_spk */ rt5640_codec = codec; - snd_soc_add_controls(codec, rt5640_snd_controls, + snd_soc_add_codec_controls(codec, rt5640_snd_controls, ARRAY_SIZE(rt5640_snd_controls)); snd_soc_dapm_new_controls(&codec->dapm, rt5640_dapm_widgets, ARRAY_SIZE(rt5640_dapm_widgets)); @@ -3381,7 +3381,7 @@ static const struct i2c_device_id rt5640_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id); -static int __devinit rt5640_i2c_probe(struct i2c_client *i2c, +static int rt5640_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct rt5640_priv *rt5640; @@ -3401,7 +3401,7 @@ static int __devinit rt5640_i2c_probe(struct i2c_client *i2c, return ret; } -static int __devexit rt5640_i2c_remove(struct i2c_client *i2c) +static int rt5640_i2c_remove(struct i2c_client *i2c) { snd_soc_unregister_codec(&i2c->dev); kfree(i2c_get_clientdata(i2c)); @@ -3424,7 +3424,7 @@ struct i2c_driver rt5640_i2c_driver = { .owner = THIS_MODULE, }, .probe = rt5640_i2c_probe, - .remove = __devexit_p(rt5640_i2c_remove), + .remove = rt5640_i2c_remove, .shutdown = rt5640_i2c_shutdown, .id_table = rt5640_i2c_id, }; diff --git a/sound/soc/codecs/tlv320aic326x.c b/sound/soc/codecs/tlv320aic326x.c index ce91b343a992..a6c324d4477f 100755 --- a/sound/soc/codecs/tlv320aic326x.c +++ b/sound/soc/codecs/tlv320aic326x.c @@ -2404,7 +2404,7 @@ static int aic3262_codec_probe(struct snd_soc_codec *codec) aic3262->mute_asi = 0; - snd_soc_add_controls(codec, aic3262_snd_controls, + snd_soc_add_codec_controls(codec, aic3262_snd_controls, ARRAY_SIZE(aic3262_snd_controls)); mutex_init(&codec->mutex); @@ -2499,7 +2499,7 @@ static struct platform_driver aic326x_codec_driver = { .owner = THIS_MODULE, }, .probe = aic326x_probe, - .remove = __devexit_p(aic326x_remove), + .remove = aic326x_remove, }; /* *---------------------------------------------------------------------------- diff --git a/sound/soc/rk29/Kconfig b/sound/soc/rk/Kconfig similarity index 69% rename from sound/soc/rk29/Kconfig rename to sound/soc/rk/Kconfig index 8a5ce5fd32e4..4cc3afb43f3b 100755 --- a/sound/soc/rk29/Kconfig +++ b/sound/soc/rk/Kconfig @@ -1,25 +1,25 @@ -config SND_RK29_SOC +config SND_RK_SOC tristate "SoC Audio for the Rockchip System-on-Chip" - depends on PLAT_RK && SND_SOC + depends on SND_SOC#PLAT_RK && SND_SOC help Say Y or M if you want to add support for codecs attached to the ROCKCHIP IIS interface. You will also need to select the audio interfaces to support below. -config SND_RK29_SOC_I2S +config SND_RK_SOC_I2S tristate config SND_RK_SOC_SPDIF tristate -config SND_RK29_SOC_I2S_8CH - bool "Soc RK29 I2S 8 Channel support(I2S0)" +config SND_RK_SOC_I2S_8CH + bool "Soc RK I2S 8 Channel support(I2S0)" default y - depends on SND_RK29_SOC_I2S && !ARCH_RK3066B && !ARCH_RK3188 && !ARCH_RK319X + depends on SND_RK_SOC_I2S && !ARCH_RK3066B && !ARCH_RK3188 && !ARCH_RK319X help - This supports the use of the 8 Channel I2S interface on rk29 processors. + This supports the use of the 8 Channel I2S interface on rk processors. -if SND_RK29_SOC_I2S_8CH +if SND_RK_SOC_I2S_8CH choice bool "Set I2S0 using the number of channels" default SND_I2SO_USE_DOUBLE_CHANNELS @@ -31,16 +31,16 @@ choice endchoice endif -config SND_RK29_SOC_I2S_2CH - bool "Soc RK29 I2S 2 Channel support(I2S1)" - depends on SND_RK29_SOC_I2S && !ARCH_RK2928 && !ARCH_RK3026 +config SND_RK_SOC_I2S_2CH + bool "Soc RK I2S 2 Channel support(I2S1)" + depends on SND_RK_SOC_I2S && !ARCH_RK2928 && !ARCH_RK3026 default y if (ARCH_RK3066B || ARCH_RK3188) help - This supports the use of the 2 Channel I2S interface on rk29 processors. + This supports the use of the 2 Channel I2S interface on rk processors. choice bool "Set I2S GRF Output Voltage" - depends on (ARCH_RK3066B || ARCH_RK3188) && SND_RK29_SOC_I2S_2CH + depends on (ARCH_RK3066B || ARCH_RK3188) && SND_RK_SOC_I2S_2CH default SND_I2S_USE_33V config SND_I2S_USE_33V @@ -51,13 +51,13 @@ choice endchoice config SND_RK_SOC_I2S2_2CH - bool "Soc RK29 I2S 2 Channel support(I2S2)" + bool "Soc RK I2S 2 Channel support(I2S2)" default n - depends on SND_RK29_SOC_I2S && ARCH_RK30 && !ARCH_RK2928 && !ARCH_RK3066B && !ARCH_RK3026 + depends on SND_RK_SOC_I2S && ARCH_RK30 && !ARCH_RK2928 && !ARCH_RK3066B && !ARCH_RK3026 help This supports the use of the 2 Channel I2S2 interface on rk30 processors. -if SND_RK29_SOC_I2S_2CH || SND_RK29_SOC_I2S_8CH || SND_RK_SOC_I2S2_2CH +if SND_RK_SOC_I2S_2CH || SND_RK_SOC_I2S_8CH || SND_RK_SOC_I2S2_2CH choice bool "Set i2s on DMA event mode" default SND_I2S_DMA_EVENT_STATIC @@ -69,13 +69,13 @@ choice endchoice endif -if SND_RK29_SOC && RK_HDMI +if SND_RK_SOC && RK_HDMI choice bool "Set audio support for HDMI" default SND_RK_SOC_HDMI_I2S config SND_RK_SOC_HDMI_I2S depends on !RK616_USE_MCLK_12M || !SND_RK_SOC_RK616 - select SND_RK29_SOC_I2S + select SND_RK_SOC_I2S select SND_SOC_HDMI_I2S tristate "HDMI use I2S" @@ -87,19 +87,19 @@ choice endchoice endif -config SND_RK29_SOC_AK4396 +config SND_RK_SOC_AK4396 tristate "SoC I2S Audio support for rockchip - AK4396" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_AK4396 help Say Y if you want to add support for SoC audio on rockchip with the AK4396. -config SND_RK29_SOC_ES8323 +config SND_RK_SOC_ES8323 tristate "SoC I2S Audio support for rockchip - ES8323" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_ES8323 help Say Y if you want to add support for SoC audio on rockchip @@ -107,91 +107,91 @@ config SND_RK29_SOC_ES8323 config SND_SOC_ES8323_PCM tristate "SoC I2S Audio support for rockchip - ES8323 for PCM modem" - depends on SND_RK29_SOC + depends on SND_RK_SOC help Say Y if you want to add support for SoC audio on rockchip with the ES8323 for PCM modem. -config SND_RK29_SOC_WM8988 +config SND_RK_SOC_WM8988 tristate "SoC I2S Audio support for rockchip - WM8988" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_WM8988 help Say Y if you want to add support for SoC audio on rockchip with the WM8988. -config SND_RK29_SOC_WM8900 +config SND_RK_SOC_WM8900 tristate "SoC I2S Audio support for rockchip - WM8900" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_WM8900 help Say Y if you want to add support for SoC audio on rockchip with the WM8900. -config SND_RK29_SOC_RT5512 +config SND_RK_SOC_RT5512 tristate "SoC I2S Audio support for rockchip - RICHTEK5512" - depends on SND_RK29_SOC + depends on SND_RK_SOC select SND_SOC_RT5512 - select SND_RK29_SOC_I2S + select SND_RK_SOC_I2S help Say Y if you want to add support for SoC audio on the rockchip. -config SND_RK29_SOC_CX2070X +config SND_RK_SOC_CX2070X tristate "SoC I2S Audio support for rockchip - CX2070X" - depends on SND_RK29_SOC + depends on SND_RK_SOC select SND_SOC_CX2070X - select SND_RK29_SOC_I2S + select SND_RK_SOC_I2S help Say Y if you want to add support for SoC audio on the rockchip. -config SND_RK29_SOC_RT5621 +config SND_RK_SOC_RT5621 tristate "SoC I2S Audio support for rockchip - rt5621" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5621 help Say Y if you want to add support for SoC audio on rockchip with the rt5621. -config SND_RK29_SOC_RT5623 +config SND_RK_SOC_RT5623 tristate "SoC I2S Audio support for rockchip - rt5623" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5623 help Say Y if you want to add support for SoC audio on rockchip with the rt5623. -config SND_RK29_SOC_RT5631 +config SND_RK_SOC_RT5631 tristate "SoC I2S Audio support for rockchip - RT5631" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5631 help Say Y if you want to add support for SoC audio on rockchip with the RT5631. -config SND_RK29_SOC_RT5631_PHONE +config SND_RK_SOC_RT5631_PHONE tristate "SoC I2S Audio support for rockchip(phone) - RT5631" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5631_PHONE help Say Y if you want to add support for SoC audio on rockchip with the RT5631. Driver code to use on the phone or voice Tablet. -config SND_RK29_SOC_RT5625 +config SND_RK_SOC_RT5625 tristate "SoC I2S Audio support for rockchip - RT5625" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S help Say Y if you want to add support for SoC audio on rockchip with the RT5625. choice - depends on SND_RK29_SOC_RT5625 + depends on SND_RK_SOC_RT5625 prompt "RT5625 hardware select" config SND_SOC_RT5625_SPK_FORM_SPKOUT @@ -207,97 +207,97 @@ choice if your codec output hardware connect is spk from spkout, choose it endchoice -config SND_RK29_SOC_RT5640 +config SND_RK_SOC_RT5640 tristate "SoC I2S Audio support for rockchip - RT5640(RT5642)" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5640 help RT5640 is pin to pin as RT5642, but not have dsp function. -config SND_RK29_SOC_RT3224 +config SND_RK_SOC_RT3224 tristate "SoC I2S Audio support for rockchip - RT3224" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT3224 help RT3224 is pin to pin as RT3261, but not have dsp function. -config SND_RK29_SOC_RT5639 +config SND_RK_SOC_RT5639 tristate "SoC I2S Audio support for rockchip - RT5639" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5639 help rt5639 -config SND_RK29_SOC_RT5616 +config SND_RK_SOC_RT5616 tristate "SoC I2S Audio support for rockchip - RT5616" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT5616 help Say Y if you want to add support for SoC audio on rockchip with the RT5616. -config SND_RK29_SOC_RT3261 +config SND_RK_SOC_RT3261 tristate "SoC I2S Audio support for rockchip - RT3261" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RT3261 help Say Y if you want to add support for SoC audio on rockchip with the RT3261. -config SND_RK29_SOC_WM8994 +config SND_RK_SOC_WM8994 tristate "SoC I2S Audio support for rockchip - WM8994" - depends on SND_RK29_SOC && MFD_WM8994 - select SND_RK29_SOC_I2S + depends on SND_RK_SOC && MFD_WM8994 + select SND_RK_SOC_I2S select SND_SOC_WM8994 help Say Y if you want to add support for SoC audio on rockchip with the WM8994. -config SND_RK29_SOC_CS42L52 +config SND_RK_SOC_CS42L52 tristate "SoC I2S Audio support for rockchip - CS42L52" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_CS42L52 help Say Y if you want to add support for SoC audio on rockchip with the CS42L52. -config SND_RK29_SOC_AIC3111 +config SND_RK_SOC_AIC3111 tristate "SoC I2S Audio support for rockchip - AIC3111" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_TLV320AIC3111 help Say Y if you want to add support for SoC audio on rockchip with the AIC3111. -config SND_RK29_SOC_AIC3262 +config SND_RK_SOC_AIC3262 tristate "SoC I2S Audio support for rockchip - AIC3262" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_TLV320AIC326X help Say Y if you want to add support for SoC audio on rockchip with the AIC3262. -config SND_RK29_SOC_RK1000 +config SND_RK_SOC_RK1000 tristate "SoC I2S Audio support for rockchip - RK1000" - depends on SND_RK29_SOC - select SND_RK29_SOC_I2S + depends on SND_RK_SOC + select SND_RK_SOC_I2S select SND_SOC_RK1000 help Say Y if you want to add support for SoC audio on rockchip with the RK1000. -config SND_RK29_SOC_RK610 +config SND_RK_SOC_RK610 tristate "SoC I2S Audio support for rockchip - RK610" - depends on SND_RK29_SOC && MFD_RK610 - select SND_RK29_SOC_I2S + depends on SND_RK_SOC && MFD_RK610 + select SND_RK_SOC_I2S select SND_SOC_RK610 help Say Y if you want to add support for SoC audio on rockchip @@ -305,8 +305,8 @@ config SND_RK29_SOC_RK610 config SND_RK_SOC_RK616 tristate "SoC I2S Audio support for rockchip - RK616" - depends on SND_RK29_SOC && MFD_RK616 - select SND_RK29_SOC_I2S + depends on SND_RK_SOC && MFD_RK616 + select SND_RK_SOC_I2S select SND_SOC_RK616 help Say Y if you want to add support for SoC audio on rockchip @@ -314,32 +314,32 @@ config SND_RK_SOC_RK616 config SND_RK_SOC_RK2928 tristate "SoC I2S Audio support for rockchip - RK2928" - depends on SND_RK29_SOC && ARCH_RK2928 - select SND_RK29_SOC_I2S + depends on SND_RK_SOC && ARCH_RK2928 + select SND_RK_SOC_I2S select SND_SOC_RK2928 - select SND_RK29_CODEC_SOC_SLAVE + select SND_RK_CODEC_SOC_SLAVE help Say Y if you want to add support for SoC audio on rockchip with the RK2928 internal codec. config SND_RK_SOC_RK3026 tristate "SoC I2S Audio support for rockchip - RK3026&R3028A" - depends on SND_RK29_SOC && ARCH_RK3026 - select SND_RK29_SOC_I2S + depends on SND_RK_SOC && ARCH_RK3026 + select SND_RK_SOC_I2S select SND_SOC_RK3026 - select SND_RK29_CODEC_SOC_SLAVE + select SND_RK_CODEC_SOC_SLAVE help Say Y if you want to add support for SoC audio on rockchip with the RK3026 internal codec. -if SND_RK29_SOC_I2S_2CH || SND_RK29_SOC_I2S_8CH || SND_RK_SOC_I2S2_2CH +if SND_RK_SOC_I2S_2CH || SND_RK_SOC_I2S_8CH || SND_RK_SOC_I2S2_2CH choice bool "Set i2s type" - default SND_RK29_CODEC_SOC_SLAVE - config SND_RK29_CODEC_SOC_MASTER + default SND_RK_CODEC_SOC_SLAVE + config SND_RK_CODEC_SOC_MASTER tristate "Codec run in Master" - config SND_RK29_CODEC_SOC_SLAVE + config SND_RK_CODEC_SOC_SLAVE tristate "Codec run in Slave" endchoice diff --git a/sound/soc/rk/Makefile b/sound/soc/rk/Makefile new file mode 100755 index 000000000000..1542f472dd83 --- /dev/null +++ b/sound/soc/rk/Makefile @@ -0,0 +1,67 @@ +# ROCKCHIP Platform Support +snd-soc-rockchip-objs := rk_pcm.o +ifdef CONFIG_ARCH_RK29 +snd-soc-rockchip-i2s-objs := rk29_i2s.o +else +snd-soc-rockchip-i2s-objs := rk30_i2s.o +endif +snd-soc-rockchip-spdif-objs := rk_spdif.o + +obj-$(CONFIG_SND_RK_SOC) += snd-soc-rockchip.o +obj-$(CONFIG_SND_RK_SOC_I2S) += snd-soc-rockchip-i2s.o +obj-$(CONFIG_SND_RK_SOC_SPDIF) += snd-soc-rockchip-spdif.o + +# ROCKCHIP Machine Support +snd-soc-wm8900-objs := rk_wm8900.o +snd-soc-rt5621-objs := rk_rt5621.o +snd-soc-rt5631-objs := rk_rt5631.o +snd-soc-ak4396-objs := rk_ak4396.o +snd-soc-rt5616-objs := rk_rt5616.o +snd-soc-rt5631-phone-objs := rk_rt5631_phone.o +snd-soc-rt5625-objs := rk_rt5625.o +snd-soc-rt5640-objs := rk_rt5640.o +snd-soc-rt3261-objs := rk_rt3261.o +snd-soc-rt3224-objs := rk_rt3261.o +snd-soc-rt5639-objs := rk_rt5639.o +snd-soc-cs42l52-objs := rk_cs42l52.o +snd-soc-aic3111-objs := rk_aic3111.o +snd-soc-wm8988-objs := rk_wm8988.o +snd-soc-rk1000-objs := rk_rk1000codec.o +snd-soc-wm8994-objs := rk_wm8994.o +snd-soc-rk610-objs := rk_jetta_codec.o +snd-soc-rk616-objs := rk_rk616.o +snd-soc-aic3262-objs := rk_aic3262.o +snd-soc-rk2928-objs := rk2928-card.o +snd-soc-es8323-objs := rk_es8323.o +snd-soc-rk3026-objs := rk_rk3026.o +snd-soc-hdmi-i2s-objs := rk_hdmi_i2s.o +snd-soc-hdmi-spdif-objs := rk_hdmi_spdif.o +snd-soc-rt5512-objs := rk_rt5512.o +snd-soc-cx2070x-objs := rk_cx2070x.o + +obj-$(CONFIG_SND_RK_SOC_WM8994) += snd-soc-wm8994.o +obj-$(CONFIG_SND_RK_SOC_WM8988) += snd-soc-wm8988.o +obj-$(CONFIG_SND_RK_SOC_WM8900) += snd-soc-wm8900.o +obj-$(CONFIG_SND_RK_SOC_RT5621) += snd-soc-rt5621.o +obj-$(CONFIG_SND_RK_SOC_RT5631) += snd-soc-rt5631.o +obj-$(CONFIG_SND_RK_SOC_AK4396) += snd-soc-ak4396.o +obj-$(CONFIG_SND_RK_SOC_RT5631_PHONE) += snd-soc-rt5631-phone.o +obj-$(CONFIG_SND_RK_SOC_RT5625) += snd-soc-rt5625.o +obj-$(CONFIG_SND_RK_SOC_RT5640) += snd-soc-rt5640.o +obj-$(CONFIG_SND_RK_SOC_RT3261) += snd-soc-rt3261.o +obj-$(CONFIG_SND_RK_SOC_RT3224) += snd-soc-rt3224.o +obj-$(CONFIG_SND_RK_SOC_RT5639) += snd-soc-rt5639.o +obj-$(CONFIG_SND_RK_SOC_RT5616) += snd-soc-rt5616.o +obj-$(CONFIG_SND_RK_SOC_RK1000) += snd-soc-rk1000.o +obj-$(CONFIG_SND_RK_SOC_CS42L52) += snd-soc-cs42l52.o +obj-$(CONFIG_SND_RK_SOC_AIC3111) += snd-soc-aic3111.o +obj-$(CONFIG_SND_RK_SOC_AIC3262) += snd-soc-aic3262.o +obj-$(CONFIG_SND_RK_SOC_RK610) += snd-soc-rk610.o +obj-$(CONFIG_SND_RK_SOC_RK616) += snd-soc-rk616.o +obj-$(CONFIG_SND_RK_SOC_HDMI_I2S) += snd-soc-hdmi-i2s.o +obj-$(CONFIG_SND_RK_SOC_HDMI_SPDIF) += snd-soc-hdmi-spdif.o +obj-$(CONFIG_SND_RK_SOC_RK2928) += snd-soc-rk2928.o +obj-$(CONFIG_SND_RK_SOC_ES8323) += snd-soc-es8323.o +obj-$(CONFIG_SND_RK_SOC_RK3026) += snd-soc-rk3026.o +obj-$(CONFIG_SND_RK_SOC_RT5512) += snd-soc-rt5512.o +obj-$(CONFIG_SND_RK_SOC_CX2070X) += snd-soc-cx2070x.o diff --git a/sound/soc/rk29/rk2928-card.c b/sound/soc/rk/rk2928-card.c similarity index 92% rename from sound/soc/rk29/rk2928-card.c rename to sound/soc/rk/rk2928-card.c index 412460cb4cdf..4ccd2fadef12 100755 --- a/sound/soc/rk29/rk2928-card.c +++ b/sound/soc/rk/rk2928-card.c @@ -21,7 +21,7 @@ #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #ifdef DEBUG @@ -43,12 +43,12 @@ static int rk2928_dai_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) DBG("Set cpu_dai master\n"); ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); DBG("Set cpu_dai slave\n"); @@ -59,11 +59,11 @@ static int rk2928_dai_hw_params(struct snd_pcm_substream *substream, DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); pll_out = 256 * params_rate(params); - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) div_bclk = 63; div_mclk = pll_out/(params_rate(params)*64) - 1; @@ -83,7 +83,7 @@ static struct snd_soc_dai_link rk2928_dai[] = { { .name = "RK2928", .stream_name = "RK2928", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .platform_name = "rockchip-audio", .codec_name = "rk2928-codec", .codec_dai_name = "rk2928-codec", @@ -135,4 +135,4 @@ static void __exit rk2928_soc_exit(void) module_exit(rk2928_soc_exit); MODULE_DESCRIPTION("ALSA SoC RK2928"); -MODULE_LICENSE("GPL"); \ No newline at end of file +MODULE_LICENSE("GPL"); diff --git a/sound/soc/rk29/rk29_i2s.c b/sound/soc/rk/rk29_i2s.c similarity index 98% rename from sound/soc/rk29/rk29_i2s.c rename to sound/soc/rk/rk29_i2s.c index 923aa15acd3b..097fc22442cb 100755 --- a/sound/soc/rk29/rk29_i2s.c +++ b/sound/soc/rk/rk29_i2s.c @@ -34,7 +34,7 @@ #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" @@ -334,7 +334,7 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai, return -EINVAL; } I2S_DBG("Enter::%s----%d, I2S_TXCR=0x%X\n",__FUNCTION__,__LINE__,tx_ctl); -#if 0//defined(CONFIG_SND_RK29_SOC_alc5631) || defined(CONFIG_SND_RK29_SOC_alc5621) +#if 0//defined(CONFIG_SND_RK_SOC_alc5631) || defined(CONFIG_SND_RK_SOC_alc5621) rx_ctl = tx_ctl; rx_ctl &= ~I2S_MODE_MASK; rx_ctl |= I2S_SLAVE_MODE; // set tx slave, rx master @@ -406,11 +406,11 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, iismod |= I2S_DATA_WIDTH(31); break; } - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) iismod &= ~I2S_SLAVE_MODE; #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) iismod |= I2S_SLAVE_MODE; #endif @@ -424,7 +424,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, writel(dmarc, &(pheadi2s->I2S_DMACR)); I2S_DBG("Enter %s, %d I2S_TXCR=0x%08X\n", __func__, __LINE__, iismod); -#if 0//defined(CONFIG_SND_RK29_SOC_alc5631) || defined(CONFIG_SND_RK29_SOC_alc5621) +#if 0//defined(CONFIG_SND_RK_SOC_alc5631) || defined(CONFIG_SND_RK_SOC_alc5621) dmarc = iismod; dmarc &= ~I2S_MODE_MASK; dmarc |= I2S_SLAVE_MODE; // set tx slave, rx master @@ -560,7 +560,7 @@ int rockchip_i2s_resume(struct snd_soc_dai *cpu_dai) #define rockchip_i2s_resume NULL #endif -#if defined(CONFIG_SND_RK29_SOC_alc5631) || defined(CONFIG_SND_RK29_SOC_alc5621) +#if defined(CONFIG_SND_RK_SOC_alc5631) || defined(CONFIG_SND_RK_SOC_alc5621) #define ROCKCHIP_I2S_RATES (SNDRV_PCM_RATE_44100) //zyy 20110704, playback and record use same sample rate #else #define ROCKCHIP_I2S_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ @@ -702,11 +702,11 @@ static int __devinit rockchip_i2s_probe(struct platform_device *pdev) dai->id = pdev->id; dai->symmetric_rates = 1; if(pdev->id == 0) { - dai->name = "rk29_i2s.0"; + dai->name = "rk_i2s.0"; dai->playback.channels_min = 2; dai->playback.channels_max = 8; }else{ - dai->name = "rk29_i2s.1"; + dai->name = "rk_i2s.1"; dai->playback.channels_min = 2; dai->playback.channels_max = 2; } diff --git a/sound/soc/rk29/rk29_i2s.h b/sound/soc/rk/rk29_i2s.h similarity index 100% rename from sound/soc/rk29/rk29_i2s.h rename to sound/soc/rk/rk29_i2s.h diff --git a/sound/soc/rk29/rk30_i2s.c b/sound/soc/rk/rk30_i2s.c similarity index 98% rename from sound/soc/rk29/rk30_i2s.c rename to sound/soc/rk/rk30_i2s.c index 117aa5456f48..798bd770b52a 100755 --- a/sound/soc/rk29/rk30_i2s.c +++ b/sound/soc/rk/rk30_i2s.c @@ -35,7 +35,7 @@ #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #define ANDROID_REC @@ -301,10 +301,10 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, } iis_ckr_value = readl(&(pheadi2s->I2S_CKR)); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) iis_ckr_value &= ~I2S_SLAVE_MODE; #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) iis_ckr_value |= I2S_SLAVE_MODE; #endif writel(iis_ckr_value, &(pheadi2s->I2S_CKR)); @@ -666,17 +666,17 @@ static int __devinit rockchip_i2s_probe(struct platform_device *pdev) switch(pdev->id) { case 0: - dai->name = "rk29_i2s.0"; + dai->name = "rk_i2s.0"; dai->playback.channels_min = 2; dai->playback.channels_max = 8; break; case 1: - dai->name = "rk29_i2s.1"; + dai->name = "rk_i2s.1"; dai->playback.channels_min = 2; dai->playback.channels_max = 2; break; case 2: - dai->name = "rk29_i2s.2"; + dai->name = "rk_i2s.2"; dai->playback.channels_min = 2; dai->playback.channels_max = 2; break; @@ -842,10 +842,10 @@ MODULE_LICENSE("GPL"); #include static int proc_i2s_show(struct seq_file *s, void *v) { -#ifdef CONFIG_SND_RK29_SOC_I2S_8CH +#ifdef CONFIG_SND_RK_SOC_I2S_8CH struct rk29_i2s_info *i2s=&rk29_i2s[0]; #else -#ifdef CONFIG_SND_RK29_SOC_I2S_2CH +#ifdef CONFIG_SND_RK_SOC_I2S_2CH struct rk29_i2s_info *i2s=&rk29_i2s[1]; #else struct rk29_i2s_info *i2s=&rk29_i2s[2]; @@ -879,10 +879,10 @@ static int proc_i2s_show(struct seq_file *s, void *v) static ssize_t i2s_reg_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { -#ifdef CONFIG_SND_RK29_SOC_I2S_8CH +#ifdef CONFIG_SND_RK_SOC_I2S_8CH struct rk29_i2s_info *i2s=&rk29_i2s[0]; #else -#ifdef CONFIG_SND_RK29_SOC_I2S_2CH +#ifdef CONFIG_SND_RK_SOC_I2S_2CH struct rk29_i2s_info *i2s=&rk29_i2s[1]; #else struct rk29_i2s_info *i2s=&rk29_i2s[2]; diff --git a/sound/soc/rk29/rk29_aic3111.c b/sound/soc/rk/rk_aic3111.c similarity index 95% rename from sound/soc/rk29/rk29_aic3111.c rename to sound/soc/rk/rk_aic3111.c index 68311b117077..e6f11eb3951f 100644 --- a/sound/soc/rk29/rk29_aic3111.c +++ b/sound/soc/rk/rk_aic3111.c @@ -22,7 +22,7 @@ #include #include #include "../codecs/tlv320aic3111.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 0 @@ -59,14 +59,14 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | @@ -77,14 +77,14 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | @@ -172,14 +172,14 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "AIC3111 PCM", .codec_name = "AIC3111.0-0018", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "AIC3111 HiFi", .init = rk29_aic3111_init, .ops = &rk29_ops, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_AIC3111", + .name = "RK_AIC3111", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_aic3262.c b/sound/soc/rk/rk_aic3262.c similarity index 93% rename from sound/soc/rk29/rk29_aic3262.c rename to sound/soc/rk/rk_aic3262.c index 89f30b5f5e21..eb77229f0d2a 100644 --- a/sound/soc/rk29/rk29_aic3262.c +++ b/sound/soc/rk/rk_aic3262.c @@ -36,7 +36,7 @@ #include #include #include "../codecs/wm8994.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include #include @@ -161,11 +161,11 @@ static int rk29_aic3262_init(struct snd_soc_pcm_runtime *rtd) DBG_AIC3262("rk29_aic3262_init\n"); - ret = snd_soc_add_controls(codec, rk29_aic326x_controls, + ret = snd_soc_add_codec_controls(codec, rk29_aic326x_controls, ARRAY_SIZE(rk29_aic326x_controls)); if (ret < 0) { - printk("rk29_aic3262: Err snd_soc_add_controls ret: %d\n", ret ); + printk("rk29_aic3262: Err snd_soc_add_codec_controls ret: %d\n", ret ); return ret; } @@ -211,12 +211,12 @@ static int rk29_aif1_hw_params(struct snd_pcm_substream *substream, printk("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) DBG_AIC3262("Set codec_dai slave\n"); ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); DBG_AIC3262("Set codec_dai master\n"); @@ -225,12 +225,12 @@ static int rk29_aif1_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) DBG_AIC3262("Set cpu_dai master\n"); ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); DBG_AIC3262("Set cpu_dai slave\n"); @@ -444,12 +444,12 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "AIC3262 PCM", .codec_name = "tlv320aic3262-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "aic326x-asi1", .ops = &rk29_aif1_ops, @@ -461,12 +461,12 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "AIC3262 PCM", .codec_name = "tlv320aic3262-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "aic326x-asi2", .ops = &rk29_aif2_ops, @@ -478,12 +478,12 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "AIC3262 PCM", .codec_name = "tlv320aic3262-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "aic326x-asi3", .ops = &rk29_aif3_ops, @@ -493,7 +493,7 @@ static struct snd_soc_dai_link rk29_dai[] = { static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_AIC3262", + .name = "RK_AIC3262", .dai_link = rk29_dai, .num_links = ARRAY_SIZE(rk29_dai), }; diff --git a/sound/soc/rk29/rk29_ak4396.c b/sound/soc/rk/rk_ak4396.c similarity index 92% rename from sound/soc/rk29/rk29_ak4396.c rename to sound/soc/rk/rk_ak4396.c index c5a324014069..a266f5ec4cd6 100755 --- a/sound/soc/rk29/rk29_ak4396.c +++ b/sound/soc/rk/rk_ak4396.c @@ -19,7 +19,7 @@ #include #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include @@ -42,7 +42,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); if (ret < 0) return ret; @@ -80,7 +80,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, (2 * 32 )-1); //bclk = 2 * 32 * lrck @@ -121,12 +121,12 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "AK4396 PCM", .codec_name = "spi1.0", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "AK4396 HiFi", .init = rk29_ak4396_init, @@ -134,7 +134,7 @@ static struct snd_soc_dai_link rk29_dai = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_AK4396", + .name = "RK_AK4396", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_cs42l52.c b/sound/soc/rk/rk_cs42l52.c similarity index 94% rename from sound/soc/rk29/rk29_cs42l52.c rename to sound/soc/rk/rk_cs42l52.c index ee3d8c2409bf..a69b1ae3b363 100755 --- a/sound/soc/rk29/rk29_cs42l52.c +++ b/sound/soc/rk/rk_cs42l52.c @@ -22,7 +22,7 @@ #include #include #include "../codecs/cs42l52.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" @@ -64,20 +64,20 @@ static int rk29_cs42l52_hw_params(struct snd_pcm_substream *substream, else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif if (ret < 0) return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif if (ret < 0) @@ -102,7 +102,7 @@ static int rk29_cs42l52_hw_params(struct snd_pcm_substream *substream, break; } - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) general_pll=clk_get(NULL, "general_pll"); if(clk_get_rate(general_pll)>260000000) { @@ -164,7 +164,7 @@ static struct snd_soc_dai_link rk29_cs42l52_dai_link = { }; static struct snd_soc_card snd_soc_card_rk29_cs42l52 = { - .name = "RK29_CS42L52", + .name = "RK_CS42L52", .platform = &rk29_soc_platform, .dai_link = &rk29_cs42l52_dai_link, .num_links = 1, @@ -181,7 +181,7 @@ static struct platform_device *rk29_cs42l52_snd_device; static int rk29_cs42l52_probe(struct platform_device *pdev) { int ret =0; - printk("RK29 CS42L52 SoC Audio driver\n"); + printk("RK CS42L52 SoC Audio driver\n"); rk29_cs42l52_snd_device = platform_device_alloc("soc-audio", -1); if (!rk29_cs42l52_snd_device) { ret = -ENOMEM; diff --git a/sound/soc/rk29/rk29_cx2070x.c b/sound/soc/rk/rk_cx2070x.c similarity index 94% rename from sound/soc/rk29/rk29_cx2070x.c rename to sound/soc/rk/rk_cx2070x.c index 44013aceba89..254f88c175f8 100644 --- a/sound/soc/rk29/rk29_cx2070x.c +++ b/sound/soc/rk/rk_cx2070x.c @@ -16,7 +16,7 @@ #include #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 #define DBG(x...) printk(KERN_INFO x) @@ -42,11 +42,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -55,11 +55,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -92,7 +92,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return -EINVAL; break; } -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, 64-1);//bclk = 2*32*lrck; 2*32fs switch(params_rate(params)) { @@ -157,7 +157,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) //snd_soc_dai_set_pll(codec_dai,0,pll_out, 22579200); snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); #endif @@ -225,7 +225,7 @@ static struct snd_soc_dai_link rk29_dai[] = { { /* Primary DAI i/f */ .name = "CX2070X AIF1", .stream_name = "CX2070X PCM", - .cpu_dai_name = "rk29_i2s.1", + .cpu_dai_name = "rk_i2s.1", .codec_dai_name = "cx2070x-hifi", .platform_name = "rockchip-audio", .codec_name = "cx2070x.0-0014", @@ -235,7 +235,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_CX2070X", + .name = "RK_CX2070X", .dai_link = rk29_dai, /* If you want to use sec_fifo device, diff --git a/sound/soc/rk29/rk29_es8323.c b/sound/soc/rk/rk_es8323.c similarity index 92% rename from sound/soc/rk29/rk29_es8323.c rename to sound/soc/rk/rk_es8323.c index afc6241214ad..446977bf289e 100755 --- a/sound/soc/rk29/rk29_es8323.c +++ b/sound/soc/rk/rk_es8323.c @@ -22,7 +22,7 @@ //#include //#include #include "../codecs/es8323.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include @@ -60,22 +60,22 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif if (ret < 0) return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -102,7 +102,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, (pll_out/4)/params_rate(params)-1); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_MCLK, 3); @@ -171,12 +171,12 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "ES8323 PCM", .codec_name = "ES8323.4-0010", // ES8323.0-0010 .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", //Ó²¼þÉÏÊǽӵ½IIS0ÉÏ£¬µ«ÊÇÓÉÓÚxxÔ­Òò£¬Õâ±ß¶¨ÒåΪIIS1ÉÏ +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", //Ó²¼þÉÏÊǽӵ½IIS0ÉÏ£¬µ«ÊÇÓÉÓÚxxÔ­Òò£¬Õâ±ß¶¨ÒåΪIIS1ÉÏ #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "ES8323 HiFi", .init = rk29_es8323_init, @@ -184,7 +184,7 @@ static struct snd_soc_dai_link rk29_dai = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_ES8323", + .name = "RK_ES8323", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk_hdmi_i2s.c b/sound/soc/rk/rk_hdmi_i2s.c similarity index 92% rename from sound/soc/rk29/rk_hdmi_i2s.c rename to sound/soc/rk/rk_hdmi_i2s.c index 6665b2bacf8f..d1692f6e49e6 100644 --- a/sound/soc/rk29/rk_hdmi_i2s.c +++ b/sound/soc/rk/rk_hdmi_i2s.c @@ -9,7 +9,7 @@ #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 0 @@ -30,11 +30,11 @@ static int hdmi_i2s_hifi_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -82,10 +82,10 @@ static struct snd_soc_dai_link hdmi_i2s_dai = { .stream_name = "HDMI PCM", .codec_name = "hdmi-i2s", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rk-hdmi-i2s-hifi", .ops = &hdmi_i2s_hifi_ops, diff --git a/sound/soc/rk29/rk_hdmi_spdif.c b/sound/soc/rk/rk_hdmi_spdif.c similarity index 100% rename from sound/soc/rk29/rk_hdmi_spdif.c rename to sound/soc/rk/rk_hdmi_spdif.c diff --git a/sound/soc/rk29/rk29_jetta_codec.c b/sound/soc/rk/rk_jetta_codec.c similarity index 90% rename from sound/soc/rk29/rk29_jetta_codec.c rename to sound/soc/rk/rk_jetta_codec.c index 8f39dbaecf5f..b120959a1b1d 100755 --- a/sound/soc/rk29/rk29_jetta_codec.c +++ b/sound/soc/rk/rk_jetta_codec.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rk610_codec.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #ifdef CONFIG_MACH_RK_FAC #include @@ -56,10 +56,10 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, { /* set codec DAI configuration */ DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); - #elif defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #elif defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -67,10 +67,10 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); - #elif defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #elif defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -107,10 +107,10 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); snd_soc_dai_set_sysclk(codec_dai, 0, pll_out, SND_SOC_CLOCK_IN); -// #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +// #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) // snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); // #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) div_bclk = 63; div_mclk = pll_out/(params_rate(params)*64) - 1; @@ -137,18 +137,18 @@ static struct snd_soc_dai_link rk29_dai = { .codec_name = "RK610_CODEC.0-0060", #endif .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "rk610_codec", .ops = &rk29_ops, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RK610", + .name = "RK_RK610", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_pcm.c b/sound/soc/rk/rk_pcm.c similarity index 99% rename from sound/soc/rk29/rk29_pcm.c rename to sound/soc/rk/rk_pcm.c index 2b1f57bd5358..70b0e6b54c81 100755 --- a/sound/soc/rk29/rk29_pcm.c +++ b/sound/soc/rk/rk_pcm.c @@ -1,5 +1,5 @@ /* - * rk29_pcm.c -- ALSA SoC ROCKCHIP PCM Audio Layer Platform driver + * rk_pcm.c -- ALSA SoC ROCKCHIP PCM Audio Layer Platform driver * * Driver for rockchip pcm audio * @@ -26,7 +26,7 @@ #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #define PCM_DMA_DEBUG 0 diff --git a/sound/soc/rk29/rk29_pcm.h b/sound/soc/rk/rk_pcm.h similarity index 100% rename from sound/soc/rk29/rk29_pcm.h rename to sound/soc/rk/rk_pcm.h diff --git a/sound/soc/rk29/rk29_rk1000codec.c b/sound/soc/rk/rk_rk1000codec.c similarity index 88% rename from sound/soc/rk29/rk29_rk1000codec.c rename to sound/soc/rk/rk_rk1000codec.c index a65bfba54617..7825020431cd 100755 --- a/sound/soc/rk29/rk29_rk1000codec.c +++ b/sound/soc/rk/rk_rk1000codec.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rk1000_codec.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 @@ -40,22 +40,22 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif if (ret < 0) return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -85,10 +85,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .platform_name = "rockchip-audio", .codec_name = "RK1000_CODEC.0-0060", .codec_dai_name = "rk1000_codec", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .init = rk29_rk1000_codec_init, .ops = &rk29_ops, @@ -96,7 +96,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RK1000", + .name = "RK_RK1000", .dai_link = rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk_rk3026.c b/sound/soc/rk/rk_rk3026.c similarity index 92% rename from sound/soc/rk29/rk_rk3026.c rename to sound/soc/rk/rk_rk3026.c index 45fe8d7b9b5d..191aef64269c 100644 --- a/sound/soc/rk29/rk_rk3026.c +++ b/sound/soc/rk/rk_rk3026.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rk3026_codec.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 0 @@ -67,7 +67,7 @@ static int rk3026_init(struct snd_soc_pcm_runtime *rtd) DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - snd_soc_add_controls(codec, rk_controls, + snd_soc_add_codec_controls(codec, rk_controls, ARRAY_SIZE(rk_controls)); /* Add specific widgets */ @@ -98,12 +98,12 @@ static int rk_hifi_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -112,11 +112,11 @@ static int rk_hifi_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -221,10 +221,10 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK3026 PCM", .codec_name = "rk3026-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rk3026-hifi", .init = rk3026_init, @@ -235,10 +235,10 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK3026 PCM", .codec_name = "rk3026-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rk3026-voice", .ops = &rk3026_voice_ops, diff --git a/sound/soc/rk29/rk_rk616.c b/sound/soc/rk/rk_rk616.c similarity index 93% rename from sound/soc/rk29/rk_rk616.c rename to sound/soc/rk/rk_rk616.c index 28e843f44401..a88e7284d1f0 100755 --- a/sound/soc/rk29/rk_rk616.c +++ b/sound/soc/rk/rk_rk616.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rk616_codec.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 @@ -74,7 +74,7 @@ static int rk616_init(struct snd_soc_pcm_runtime *rtd) DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - snd_soc_add_controls(codec, rk_controls, + snd_soc_add_codec_controls(codec, rk_controls, ARRAY_SIZE(rk_controls)); /* Add specific widgets */ @@ -105,12 +105,12 @@ static int rk_hifi_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -119,11 +119,11 @@ static int rk_hifi_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -251,10 +251,10 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK616 PCM", .codec_name = "rk616-codec.4-0050", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rk616-hifi", .init = rk616_init, @@ -265,10 +265,10 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK616 PCM", .codec_name = "rk616-codec.4-0050", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rk616-voice", .ops = &rk616_voice_ops, diff --git a/sound/soc/rk29/rk29_rt3261.c b/sound/soc/rk/rk_rt3261.c similarity index 93% rename from sound/soc/rk29/rk29_rt3261.c rename to sound/soc/rk/rk_rt3261.c index 639ffcf139c0..fd0f97f375ad 100644 --- a/sound/soc/rk29/rk29_rt3261.c +++ b/sound/soc/rk/rk_rt3261.c @@ -21,7 +21,7 @@ #include #include "../codecs/rt3261.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" @@ -51,12 +51,12 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -65,11 +65,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -213,7 +213,7 @@ static int rk29_rt3261_init(struct snd_soc_pcm_runtime *rtd) DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - snd_soc_add_controls(codec, rk_controls, + snd_soc_add_codec_controls(codec, rk_controls, ARRAY_SIZE(rk_controls)); /* Add specific widgets */ @@ -258,10 +258,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT3261 PCM", .codec_name = "rt3261.0-001c", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rt3261-aif1", .init = rk29_rt3261_init, @@ -272,10 +272,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT3261 PCM", .codec_name = "rt3261.0-001c", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rt3261-aif2", .ops = &rt3261_voice_ops, @@ -283,7 +283,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT3261", + .name = "RK_RT3261", .dai_link = rk29_dai, .num_links = 2, }; diff --git a/sound/soc/rk29/rk29_rt5512.c b/sound/soc/rk/rk_rt5512.c similarity index 95% rename from sound/soc/rk29/rk29_rt5512.c rename to sound/soc/rk/rk_rt5512.c index 0d30236738e8..33a6f830c45e 100755 --- a/sound/soc/rk29/rk29_rt5512.c +++ b/sound/soc/rk/rk_rt5512.c @@ -16,7 +16,7 @@ #include #include #include -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 #define DBG(x...) printk(KERN_INFO x) @@ -42,11 +42,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -55,11 +55,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -95,7 +95,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return -EINVAL; break; } -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, 64-1);//bclk = 2*32*lrck; 2*32fs switch(params_rate(params)) { @@ -158,7 +158,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) //snd_soc_dai_set_pll(codec_dai,0,pll_out, 22579200); snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); #endif @@ -288,7 +288,7 @@ static struct snd_soc_dai_link rk29_dai[] = { { /* Primary DAI i/f */ .name = "RT5512 AIF1", .stream_name = "RT5512 PCM", - .cpu_dai_name = "rk29_i2s.1", + .cpu_dai_name = "rk_i2s.1", .codec_dai_name = "RT5512-aif1", .platform_name = "rockchip-audio", .codec_name = "rt5512.1-0018", @@ -298,7 +298,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5512", + .name = "RK_RT5512", .dai_link = rk29_dai, /* If you want to use sec_fifo device, diff --git a/sound/soc/rk29/rk29_rt5616.c b/sound/soc/rk/rk_rt5616.c similarity index 91% rename from sound/soc/rk29/rk29_rt5616.c rename to sound/soc/rk/rk_rt5616.c index 8dcd265345ff..0a49430be7b0 100755 --- a/sound/soc/rk29/rk29_rt5616.c +++ b/sound/soc/rk/rk_rt5616.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rt5631.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 0 @@ -51,11 +51,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -63,11 +63,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -97,7 +97,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) #if 0 //use pll from blck /*Set the pll of rt5631,the Pll source from BITCLK on CPU is master mode*/ //bitclk is 64fs @@ -118,7 +118,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) // snd_soc_dai_set_pll(codec_dai,0,pll_out, 22579200); snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); @@ -126,7 +126,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, (pll_out/4)/params_rate(params)-1); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_MCLK, 3); @@ -195,12 +195,12 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "rt5616 PCM", .codec_name = "rt5616.4-001b", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "rt5616-aif1", .init = rk29_rt5631_init, @@ -208,7 +208,7 @@ static struct snd_soc_dai_link rk29_dai = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5616", + .name = "RK_RT5616", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_rt5621.c b/sound/soc/rk/rk_rt5621.c similarity index 93% rename from sound/soc/rk29/rk29_rt5621.c rename to sound/soc/rk/rk_rt5621.c index dca3e849a3bc..3469e085036c 100644 --- a/sound/soc/rk29/rk29_rt5621.c +++ b/sound/soc/rk/rk_rt5621.c @@ -21,7 +21,7 @@ #include #include #include "../codecs/rt5621.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 0 @@ -51,22 +51,22 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); } else { /* set codec DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif if (ret < 0) return ret; /* set cpu DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -94,7 +94,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) #if 0 //use pll from blck /*Set the pll of rt5621,the Pll source from BITCLK on CPU is master mode*/ //bitclk is 64fs @@ -113,7 +113,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) if((24576000%params_rate(params))==0) //for 8k,16k,32k,48k { @@ -129,7 +129,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, (pll_out/4)/params_rate(params)-1); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_MCLK, 3); @@ -179,14 +179,14 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "RT5621 PCM", .codec_name = "RT5621.0-001a", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "RT5621 HiFi", .init = rk29_rt5621_init, .ops = &rk29_ops, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5621", + .name = "RK_RT5621", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_rt5625.c b/sound/soc/rk/rk_rt5625.c similarity index 91% rename from sound/soc/rk29/rk29_rt5625.c rename to sound/soc/rk/rk_rt5625.c index 9a72e440ceb4..3d46289f54ba 100644 --- a/sound/soc/rk29/rk29_rt5625.c +++ b/sound/soc/rk/rk_rt5625.c @@ -21,7 +21,7 @@ #include #include #include "../codecs/rt5625.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 @@ -50,12 +50,12 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -64,11 +64,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -187,7 +187,7 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5625 PCM", .codec_name = "rt5625.0-001f", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "rt5625-aif1", .ops = &rk29_ops, }, @@ -196,14 +196,14 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5625 PCM", .codec_name = "rt5625.0-001f", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "rt5625-aif2", .ops = &rt5625_voice_ops, }, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5625", + .name = "RK_RT5625", .dai_link = rk29_dai, .num_links = 2, }; diff --git a/sound/soc/rk29/rk29_rt5631.c b/sound/soc/rk/rk_rt5631.c similarity index 92% rename from sound/soc/rk29/rk29_rt5631.c rename to sound/soc/rk/rk_rt5631.c index c230f63fc58a..8ddc988e1b89 100755 --- a/sound/soc/rk29/rk29_rt5631.c +++ b/sound/soc/rk/rk_rt5631.c @@ -20,7 +20,7 @@ #include #include #include "../codecs/rt5631.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #ifdef CONFIG_MACH_RK_FAC @@ -55,11 +55,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -67,11 +67,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -107,7 +107,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return -EINVAL; break; } -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); snd_soc_dai_set_clkdiv(cpu_dai, ROCKCHIP_DIV_BCLK, 64-1);//bclk = 2*32*lrck; 2*32fs switch(params_rate(params)) { @@ -143,7 +143,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) //snd_soc_dai_set_pll(codec_dai,0,pll_out, 22579200); snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); #endif @@ -208,12 +208,12 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "RT5631 PCM", .codec_name = "RT5631.0-001a", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "RT5631 HiFi", .init = rk29_rt5631_init, @@ -221,7 +221,7 @@ static struct snd_soc_dai_link rk29_dai = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5631", + .name = "RK_RT5631", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_rt5631_phone.c b/sound/soc/rk/rk_rt5631_phone.c similarity index 88% rename from sound/soc/rk29/rk29_rt5631_phone.c rename to sound/soc/rk/rk_rt5631_phone.c index 84cb83bdc068..cd585f8aee8f 100755 --- a/sound/soc/rk29/rk29_rt5631_phone.c +++ b/sound/soc/rk/rk_rt5631_phone.c @@ -1,5 +1,5 @@ /* - * rk29_rt5631.c -- SoC audio for rockchip + * rk_rt5631.c -- SoC audio for rockchip * * Driver for rockchip rt5631 audio * @@ -20,7 +20,7 @@ #include #include #include "../codecs/rt5631_phone.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 @@ -41,11 +41,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -53,11 +53,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -85,7 +85,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) /*Set the system clk for codec*/ ret=snd_soc_dai_set_sysclk(codec_dai, 0,pll_out,SND_SOC_CLOCK_IN); if (ret < 0) @@ -98,7 +98,7 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); #endif @@ -120,11 +120,11 @@ static int rk29_hw_params_voice(struct snd_pcm_substream *substream, //change to 8Khz params->intervals[SNDRV_PCM_HW_PARAM_RATE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL].min = 8000; /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -132,11 +132,11 @@ static int rk29_hw_params_voice(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -165,7 +165,7 @@ static int rk29_hw_params_voice(struct snd_pcm_substream *substream, DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params)); snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0); - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) /*Set the system clk for codec*/ ret=snd_soc_dai_set_sysclk(codec_dai, 0,pll_out,SND_SOC_CLOCK_IN); if (ret < 0) @@ -178,7 +178,7 @@ static int rk29_hw_params_voice(struct snd_pcm_substream *substream, #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) snd_soc_dai_set_sysclk(codec_dai,0,pll_out, SND_SOC_CLOCK_IN); #endif @@ -220,7 +220,7 @@ static int rk29_rt5631_init(struct snd_soc_pcm_runtime *rtd) DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); //bard 7-5 s - snd_soc_add_controls(codec, rk29_controls, + snd_soc_add_codec_controls(codec, rk29_controls, ARRAY_SIZE(rk29_controls)); //bard 7-5 e /* Add specific widgets */ @@ -250,12 +250,12 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5631 hifi stream", .codec_name = "RT5631.0-001a", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "RT5631 HiFi", .init = rk29_rt5631_init, @@ -266,12 +266,12 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5631 voice stream", .codec_name = "RT5631.0-001a", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #else - .cpu_dai_name = "rk29_i2s.2", + .cpu_dai_name = "rk_i2s.2", #endif .codec_dai_name = "rt5631-voice", .ops = &rk29_ops_voice, @@ -279,7 +279,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5631", + .name = "RK_RT5631", .dai_link = rk29_dai, .num_links = 2, }; diff --git a/sound/soc/rk29/rk29_rt5639.c b/sound/soc/rk/rk_rt5639.c similarity index 91% rename from sound/soc/rk29/rk29_rt5639.c rename to sound/soc/rk/rk_rt5639.c index 79ae984acc29..91d0f49a2659 100755 --- a/sound/soc/rk29/rk29_rt5639.c +++ b/sound/soc/rk/rk_rt5639.c @@ -21,7 +21,7 @@ #include #include "../codecs/rt3261.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #if 1 @@ -50,12 +50,12 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -64,11 +64,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -187,7 +187,7 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5639 PCM", .codec_name = "rt5639.0-001c", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "rt5639-aif1", .ops = &rk29_ops, }, @@ -196,14 +196,14 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5639 PCM", .codec_name = "rt5639.0-001c", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "rt5639-aif2", .ops = &rt5639_voice_ops, }, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5639", + .name = "RK_RT5639", .dai_link = rk29_dai, .num_links = 2, }; diff --git a/sound/soc/rk29/rk29_rt5640.c b/sound/soc/rk/rk_rt5640.c similarity index 93% rename from sound/soc/rk29/rk29_rt5640.c rename to sound/soc/rk/rk_rt5640.c index bd29c1ed144a..6756f33fb84f 100755 --- a/sound/soc/rk29/rk29_rt5640.c +++ b/sound/soc/rk/rk_rt5640.c @@ -21,7 +21,7 @@ #include #include "../codecs/rt3261.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" @@ -51,12 +51,12 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, } else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); @@ -65,11 +65,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -213,7 +213,7 @@ static int rk29_rt3261_init(struct snd_soc_pcm_runtime *rtd) DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); - snd_soc_add_controls(codec, rk_controls, + snd_soc_add_codec_controls(codec, rk_controls, ARRAY_SIZE(rk_controls)); /* Add specific widgets */ @@ -258,10 +258,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5640 PCM", .codec_name = "rt5640.0-001c", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.1", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.1", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rt5640-aif1", .init = rk29_rt3261_init, @@ -272,10 +272,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "RT5640 PCM", .codec_name = "rt5640.0-001c", .platform_name = "rockchip-audio", - #if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.1", - #elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", + #if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.1", + #elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "rt5640-aif2", .ops = &rt3261_voice_ops, @@ -283,7 +283,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_RT5640", + .name = "RK_RT5640", .dai_link = rk29_dai, .num_links = 2, }; diff --git a/sound/soc/rk29/rk_spdif.c b/sound/soc/rk/rk_spdif.c similarity index 99% rename from sound/soc/rk29/rk_spdif.c rename to sound/soc/rk/rk_spdif.c index 39ad0df0686c..22387735399c 100755 --- a/sound/soc/rk29/rk_spdif.c +++ b/sound/soc/rk/rk_spdif.c @@ -47,7 +47,7 @@ #include #endif -#include "rk29_pcm.h" +#include "rk_pcm.h" #if 0 #define RK_SPDIF_DBG(x...) printk(KERN_INFO "rk_spdif:"x) diff --git a/sound/soc/rk29/rk29_wm8900.c b/sound/soc/rk/rk_wm8900.c similarity index 95% rename from sound/soc/rk29/rk29_wm8900.c rename to sound/soc/rk/rk_wm8900.c index aca84583eac8..68f60a360b2d 100755 --- a/sound/soc/rk29/rk29_wm8900.c +++ b/sound/soc/rk/rk_wm8900.c @@ -21,7 +21,7 @@ #include #include #include "../codecs/wm8900.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include @@ -64,11 +64,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif @@ -76,11 +76,11 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -114,13 +114,13 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, //snd_soc_dai_set_pll(codec_dai, NULL, 12000000, pll_out); snd_soc_dai_set_clkdiv(codec_dai, WM8900_LRCLK_MODE, 0x000); - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) snd_soc_dai_set_clkdiv(codec_dai, WM8900_BCLK_DIV, WM8900_BCLK_DIV_4); snd_soc_dai_set_clkdiv(codec_dai, WM8900_DAC_LRCLK,(pll_out/4)/params_rate(params)); snd_soc_dai_set_clkdiv(codec_dai, WM8900_ADC_LRCLK,(pll_out/4)/params_rate(params)); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) general_pll=clk_get(NULL, "general_pll"); if(clk_get_rate(general_pll)>260000000) { @@ -225,7 +225,7 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "WM8900 PCM", .codec_name = "WM8900.0-001a", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "WM8900 HiFi", .init = rk29_wm8900_init, .ops = &rk29_ops, @@ -243,13 +243,13 @@ static struct snd_soc_dai_link rk29_dai = { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_WM8900", + .name = "RK_WM8900", .dai_link = &rk29_dai, .num_links = 1, }; #else static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_WM8900", + .name = "RK_WM8900", .platform = &rk29_soc_platform, .dai_link = &rk29_dai, .num_links = 1, diff --git a/sound/soc/rk29/rk29_wm8988.c b/sound/soc/rk/rk_wm8988.c similarity index 94% rename from sound/soc/rk29/rk29_wm8988.c rename to sound/soc/rk/rk_wm8988.c index e9abd89e43b5..dadc25340a67 100755 --- a/sound/soc/rk29/rk29_wm8988.c +++ b/sound/soc/rk/rk_wm8988.c @@ -21,7 +21,7 @@ #include #include #include "../codecs/wm8988.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include @@ -54,22 +54,22 @@ static int rk29_hw_params(struct snd_pcm_substream *substream, else { /* set codec DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM ); #endif if (ret < 0) return ret; /* set cpu DAI configuration */ - #if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) + #if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif - #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) + #if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif @@ -139,14 +139,14 @@ static struct snd_soc_dai_link rk29_dai = { .stream_name = "WM8988 PCM", .codec_name = "WM8988.0-001a", .platform_name = "rockchip-audio", - .cpu_dai_name = "rk29_i2s.0", + .cpu_dai_name = "rk_i2s.0", .codec_dai_name = "WM8988 HiFi", .init = rk29_wm8988_init, .ops = &rk29_ops, }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_WM8988", + .name = "RK_WM8988", .dai_link = &rk29_dai, .num_links = 1, }; diff --git a/sound/soc/rk29/rk29_wm8994.c b/sound/soc/rk/rk_wm8994.c similarity index 95% rename from sound/soc/rk29/rk29_wm8994.c rename to sound/soc/rk/rk_wm8994.c index 1b43a84ba760..df0a8e65c17a 100755 --- a/sound/soc/rk29/rk29_wm8994.c +++ b/sound/soc/rk/rk_wm8994.c @@ -21,7 +21,7 @@ #include #include #include "../codecs/wm8994.h" -#include "rk29_pcm.h" +#include "rk_pcm.h" #include "rk29_i2s.h" #include @@ -46,12 +46,12 @@ static int rk29_aif1_hw_params(struct snd_pcm_substream *substream, DBG("Enter::%s----%d\n",__FUNCTION__,__LINE__); /* set codec DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) DBG("Set codec_dai slave\n"); ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); DBG("Set codec_dai master\n"); @@ -60,12 +60,12 @@ static int rk29_aif1_hw_params(struct snd_pcm_substream *substream, return ret; /* set cpu DAI configuration */ -#if defined (CONFIG_SND_RK29_CODEC_SOC_SLAVE) +#if defined (CONFIG_SND_RK_CODEC_SOC_SLAVE) DBG("Set cpu_dai master\n"); ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); #endif -#if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER) +#if defined (CONFIG_SND_RK_CODEC_SOC_MASTER) ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); DBG("Set cpu_dai slave\n"); @@ -381,10 +381,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "WM8994 PCM", .codec_name = "wm8994-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "wm8994-aif1", .ops = &rk29_aif1_ops, @@ -395,10 +395,10 @@ static struct snd_soc_dai_link rk29_dai[] = { .stream_name = "WM8994 PCM", .codec_name = "wm8994-codec", .platform_name = "rockchip-audio", -#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) - .cpu_dai_name = "rk29_i2s.0", -#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) - .cpu_dai_name = "rk29_i2s.1", +#if defined(CONFIG_SND_RK_SOC_I2S_8CH) + .cpu_dai_name = "rk_i2s.0", +#elif defined(CONFIG_SND_RK_SOC_I2S_2CH) + .cpu_dai_name = "rk_i2s.1", #endif .codec_dai_name = "wm8994-aif2", .ops = &rk29_aif2_ops, @@ -406,7 +406,7 @@ static struct snd_soc_dai_link rk29_dai[] = { }; static struct snd_soc_card snd_soc_card_rk29 = { - .name = "RK29_WM8994", + .name = "RK_WM8994", .dai_link = rk29_dai, .num_links = ARRAY_SIZE(rk29_dai), }; diff --git a/sound/soc/rk29/Makefile b/sound/soc/rk29/Makefile deleted file mode 100755 index 88fec2ee7f83..000000000000 --- a/sound/soc/rk29/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# ROCKCHIP Platform Support -snd-soc-rockchip-objs := rk29_pcm.o -ifdef CONFIG_ARCH_RK29 -snd-soc-rockchip-i2s-objs := rk29_i2s.o -else -snd-soc-rockchip-i2s-objs := rk30_i2s.o -endif -snd-soc-rockchip-spdif-objs := rk_spdif.o - -obj-$(CONFIG_SND_RK29_SOC) += snd-soc-rockchip.o -obj-$(CONFIG_SND_RK29_SOC_I2S) += snd-soc-rockchip-i2s.o -obj-$(CONFIG_SND_RK_SOC_SPDIF) += snd-soc-rockchip-spdif.o - -# ROCKCHIP Machine Support -snd-soc-wm8900-objs := rk29_wm8900.o -snd-soc-rt5621-objs := rk29_rt5621.o -snd-soc-rt5631-objs := rk29_rt5631.o -snd-soc-ak4396-objs := rk29_ak4396.o -snd-soc-rt5616-objs := rk29_rt5616.o -snd-soc-rt5631-phone-objs := rk29_rt5631_phone.o -snd-soc-rt5625-objs := rk29_rt5625.o -snd-soc-rt5640-objs := rk29_rt5640.o -snd-soc-rt3261-objs := rk29_rt3261.o -snd-soc-rt3224-objs := rk29_rt3261.o -snd-soc-rt5639-objs := rk29_rt5639.o -snd-soc-cs42l52-objs := rk29_cs42l52.o -snd-soc-aic3111-objs := rk29_aic3111.o -snd-soc-wm8988-objs := rk29_wm8988.o -snd-soc-rk1000-objs := rk29_rk1000codec.o -snd-soc-wm8994-objs := rk29_wm8994.o -snd-soc-rk610-objs := rk29_jetta_codec.o -snd-soc-rk616-objs := rk_rk616.o -snd-soc-aic3262-objs := rk29_aic3262.o -snd-soc-rk2928-objs := rk2928-card.o -snd-soc-es8323-objs := rk29_es8323.o -snd-soc-rk3026-objs := rk_rk3026.o -snd-soc-hdmi-i2s-objs := rk_hdmi_i2s.o -snd-soc-hdmi-spdif-objs := rk_hdmi_spdif.o -snd-soc-rt5512-objs := rk29_rt5512.o -snd-soc-cx2070x-objs := rk29_cx2070x.o - -obj-$(CONFIG_SND_RK29_SOC_WM8994) += snd-soc-wm8994.o -obj-$(CONFIG_SND_RK29_SOC_WM8988) += snd-soc-wm8988.o -obj-$(CONFIG_SND_RK29_SOC_WM8900) += snd-soc-wm8900.o -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_AK4396) += snd-soc-ak4396.o -obj-$(CONFIG_SND_RK29_SOC_RT5631_PHONE) += snd-soc-rt5631-phone.o -obj-$(CONFIG_SND_RK29_SOC_RT5625) += snd-soc-rt5625.o -obj-$(CONFIG_SND_RK29_SOC_RT5640) += snd-soc-rt5640.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_RT5639) += snd-soc-rt5639.o -obj-$(CONFIG_SND_RK29_SOC_RT5616) += snd-soc-rt5616.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 -obj-$(CONFIG_SND_RK29_SOC_AIC3262) += snd-soc-aic3262.o -obj-$(CONFIG_SND_RK29_SOC_RK610) += snd-soc-rk610.o -obj-$(CONFIG_SND_RK_SOC_RK616) += snd-soc-rk616.o -obj-$(CONFIG_SND_RK_SOC_HDMI_I2S) += snd-soc-hdmi-i2s.o -obj-$(CONFIG_SND_RK_SOC_HDMI_SPDIF) += snd-soc-hdmi-spdif.o -obj-$(CONFIG_SND_RK_SOC_RK2928) += snd-soc-rk2928.o -obj-$(CONFIG_SND_RK29_SOC_ES8323) += snd-soc-es8323.o -obj-$(CONFIG_SND_RK_SOC_RK3026) += snd-soc-rk3026.o -obj-$(CONFIG_SND_RK29_SOC_RT5512) += snd-soc-rt5512.o -obj-$(CONFIG_SND_RK29_SOC_CX2070X) += snd-soc-cx2070x.o -- 2.34.1