Loading Makefile.am +4 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ obj-m += asoc/codecs/bolero/ obj-m += asoc/codecs/wcd937x/ endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm)) ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm qtiquingvm8295)) KBUILD_OPTIONS += CONFIG_SND_SOC_AUTO=y obj-m := ipc/ obj-m += dsp/ Loading @@ -49,6 +49,9 @@ endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm)) KBUILD_OPTIONS += CONFIG_SND_SOC_GVM=m endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm8295)) KBUILD_OPTIONS += CONFIG_SND_SOC_GVM_SA8295=m endif endif all: Loading NOTICE +26 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,29 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. _______________________________________ * Copyright 2011, The Android Open Source Project * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Android Open Source Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. asoc/Kbuild +13 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ ifeq ($(CONFIG_SND_SOC_AUTO), y) export INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif ifdef CONFIG_SND_SOC_GVM_SA8295 include $(AUDIO_ROOT)/config/sa8295gvmauto.conf export INCS += -include $(AUDIO_ROOT)/config/sa8295gvmautoconf.h endif else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) Loading Loading @@ -177,6 +182,11 @@ ifdef CONFIG_SND_SOC_SA8155 MACHINE_OBJS += sa8155.o endif # for sa8295 sound card driver ifdef CONFIG_SND_SOC_SA8295 MACHINE_OBJS += sa8295.o endif ifdef CONFIG_SND_SOC_CPE CPE_LSM_OBJS += msm-cpe-lsm.o endif Loading Loading @@ -296,6 +306,9 @@ machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_SA8155) += machine_dlkm.o machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_SA8295) += machine_dlkm.o machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_CPE) += cpe_lsm_dlkm.o cpe_lsm_dlkm-y := $(CPE_LSM_OBJS) Loading asoc/codecs/Kbuild +5 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ ifeq ($(CONFIG_SND_SOC_AUTO), y) export INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif ifdef CONFIG_SND_SOC_GVM_SA8295 include $(AUDIO_ROOT)/config/sa8295gvmauto.conf export INCS += -include $(AUDIO_ROOT)/config/sa8295gvmautoconf.h endif else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) Loading asoc/codecs/bolero/rx-macro.c +58 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ static const struct snd_kcontrol_new name##_mux = \ #define RX_MACRO_MOD_GAIN (RX_MACRO_GAIN_VAL_UNITY + 6) #define COMP_MAX_COEFF 25 #define IIR_MIX_CFG_MAX 4 #define IIR_MIX_CFG_OFFSET 10 struct wcd_imped_val { u32 imped_val; Loading Loading @@ -482,6 +484,7 @@ static const char * const rx_sidetone_mix_text[] = { static const char * const iir_inp_mux_text[] = { "ZERO", "DEC0", "DEC1", "DEC2", "DEC3", "DUMMY_1", "DUMMY_2", "DUMMY_3", "DUMMY_4", "DUMMY_5", "RX0", "RX1", "RX2", "RX3", "RX4", "RX5" }; Loading Loading @@ -921,8 +924,9 @@ static int rx_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai, u32 sample_rate) { u8 int_1_mix1_inp = 0; u32 j = 0, port = 0; u16 int_mux_cfg0 = 0, int_mux_cfg1 = 0; u32 j = 0, k = 0, port = 0; u16 int_mux_cfg0 = 0, int_mux_cfg1 = 0, iir_mux_cfg = 0; u32 iir_mux_cfg_val = 0; u16 int_fs_reg = 0; u8 int_mux_cfg0_val = 0, int_mux_cfg1_val = 0; u8 inp0_sel = 0, inp1_sel = 0, inp2_sel = 0; Loading Loading @@ -973,6 +977,58 @@ static int rx_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai, snd_soc_component_update_bits(component, int_fs_reg, 0x0F, rate_reg_val); } else if ((inp0_sel == INTn_1_INP_SEL_IIR0) || (inp1_sel == INTn_1_INP_SEL_IIR0) || (inp2_sel == INTn_1_INP_SEL_IIR0)) { for (k = 0; k < IIR_MIX_CFG_MAX; k++) { iir_mux_cfg = BOLERO_CDC_RX_IIR_INP_MUX_IIR0_MIX_CFG0 + 4 * k; iir_mux_cfg_val = snd_soc_component_read32(component, iir_mux_cfg) & 0x1F; if (iir_mux_cfg_val == int_1_mix1_inp + IIR_MIX_CFG_OFFSET){ int_fs_reg = BOLERO_CDC_RX_RX0_RX_PATH_CTL + 0x80 * j; pr_debug("%s: AIF_PB DAI(%d) connected to INT%u_1 via IIR0\n", __func__, dai->id, j); pr_debug("%s: set INT%u_1 sample rate to %u\n", __func__, j, sample_rate); /* sample_rate is in Hz */ snd_soc_component_update_bits(component, int_fs_reg, 0x0F, rate_reg_val); } } } else if ((inp0_sel == INTn_1_INP_SEL_IIR1) || (inp1_sel == INTn_1_INP_SEL_IIR1) || (inp2_sel == INTn_1_INP_SEL_IIR1)) { for (k = 0; k < IIR_MIX_CFG_MAX; k++) { iir_mux_cfg = BOLERO_CDC_RX_IIR_INP_MUX_IIR1_MIX_CFG0 + 4 * k; iir_mux_cfg_val = snd_soc_component_read32( component, iir_mux_cfg) & 0x1F; if (iir_mux_cfg_val == int_1_mix1_inp + IIR_MIX_CFG_OFFSET){ int_fs_reg = BOLERO_CDC_RX_RX0_RX_PATH_CTL + 0x80 * j; pr_debug("%s: AIF_PB DAI(%d) connected to INT%u_1 via IIR1\n", __func__, dai->id, j); pr_debug("%s: set INT%u_1 sample rate to %u\n", __func__, j, sample_rate); /* sample_rate is in Hz */ snd_soc_component_update_bits( component, int_fs_reg, 0x0F, rate_reg_val); } } } int_mux_cfg0 += 8; } Loading Loading
Makefile.am +4 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ obj-m += asoc/codecs/bolero/ obj-m += asoc/codecs/wcd937x/ endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm)) ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sa8155 sa8155ivi sa6155 sa8195 qtiquingvm qtiquingvm8295)) KBUILD_OPTIONS += CONFIG_SND_SOC_AUTO=y obj-m := ipc/ obj-m += dsp/ Loading @@ -49,6 +49,9 @@ endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm)) KBUILD_OPTIONS += CONFIG_SND_SOC_GVM=m endif ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qtiquingvm8295)) KBUILD_OPTIONS += CONFIG_SND_SOC_GVM_SA8295=m endif endif all: Loading
NOTICE +26 −0 Original line number Diff line number Diff line Loading @@ -22,3 +22,29 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. _______________________________________ * Copyright 2011, The Android Open Source Project * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Android Open Source Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE.
asoc/Kbuild +13 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ ifeq ($(CONFIG_SND_SOC_AUTO), y) export INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif ifdef CONFIG_SND_SOC_GVM_SA8295 include $(AUDIO_ROOT)/config/sa8295gvmauto.conf export INCS += -include $(AUDIO_ROOT)/config/sa8295gvmautoconf.h endif else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) Loading Loading @@ -177,6 +182,11 @@ ifdef CONFIG_SND_SOC_SA8155 MACHINE_OBJS += sa8155.o endif # for sa8295 sound card driver ifdef CONFIG_SND_SOC_SA8295 MACHINE_OBJS += sa8295.o endif ifdef CONFIG_SND_SOC_CPE CPE_LSM_OBJS += msm-cpe-lsm.o endif Loading Loading @@ -296,6 +306,9 @@ machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_SA8155) += machine_dlkm.o machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_SA8295) += machine_dlkm.o machine_dlkm-y := $(MACHINE_OBJS) obj-$(CONFIG_SND_SOC_CPE) += cpe_lsm_dlkm.o cpe_lsm_dlkm-y := $(CPE_LSM_OBJS) Loading
asoc/codecs/Kbuild +5 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,11 @@ ifeq ($(CONFIG_SND_SOC_AUTO), y) export INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h endif ifdef CONFIG_SND_SOC_GVM_SA8295 include $(AUDIO_ROOT)/config/sa8295gvmauto.conf export INCS += -include $(AUDIO_ROOT)/config/sa8295gvmautoconf.h endif else ifeq ($(KERNEL_BUILD), 0) ifeq ($(CONFIG_ARCH_SM8150), y) Loading
asoc/codecs/bolero/rx-macro.c +58 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ static const struct snd_kcontrol_new name##_mux = \ #define RX_MACRO_MOD_GAIN (RX_MACRO_GAIN_VAL_UNITY + 6) #define COMP_MAX_COEFF 25 #define IIR_MIX_CFG_MAX 4 #define IIR_MIX_CFG_OFFSET 10 struct wcd_imped_val { u32 imped_val; Loading Loading @@ -482,6 +484,7 @@ static const char * const rx_sidetone_mix_text[] = { static const char * const iir_inp_mux_text[] = { "ZERO", "DEC0", "DEC1", "DEC2", "DEC3", "DUMMY_1", "DUMMY_2", "DUMMY_3", "DUMMY_4", "DUMMY_5", "RX0", "RX1", "RX2", "RX3", "RX4", "RX5" }; Loading Loading @@ -921,8 +924,9 @@ static int rx_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai, u32 sample_rate) { u8 int_1_mix1_inp = 0; u32 j = 0, port = 0; u16 int_mux_cfg0 = 0, int_mux_cfg1 = 0; u32 j = 0, k = 0, port = 0; u16 int_mux_cfg0 = 0, int_mux_cfg1 = 0, iir_mux_cfg = 0; u32 iir_mux_cfg_val = 0; u16 int_fs_reg = 0; u8 int_mux_cfg0_val = 0, int_mux_cfg1_val = 0; u8 inp0_sel = 0, inp1_sel = 0, inp2_sel = 0; Loading Loading @@ -973,6 +977,58 @@ static int rx_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai, snd_soc_component_update_bits(component, int_fs_reg, 0x0F, rate_reg_val); } else if ((inp0_sel == INTn_1_INP_SEL_IIR0) || (inp1_sel == INTn_1_INP_SEL_IIR0) || (inp2_sel == INTn_1_INP_SEL_IIR0)) { for (k = 0; k < IIR_MIX_CFG_MAX; k++) { iir_mux_cfg = BOLERO_CDC_RX_IIR_INP_MUX_IIR0_MIX_CFG0 + 4 * k; iir_mux_cfg_val = snd_soc_component_read32(component, iir_mux_cfg) & 0x1F; if (iir_mux_cfg_val == int_1_mix1_inp + IIR_MIX_CFG_OFFSET){ int_fs_reg = BOLERO_CDC_RX_RX0_RX_PATH_CTL + 0x80 * j; pr_debug("%s: AIF_PB DAI(%d) connected to INT%u_1 via IIR0\n", __func__, dai->id, j); pr_debug("%s: set INT%u_1 sample rate to %u\n", __func__, j, sample_rate); /* sample_rate is in Hz */ snd_soc_component_update_bits(component, int_fs_reg, 0x0F, rate_reg_val); } } } else if ((inp0_sel == INTn_1_INP_SEL_IIR1) || (inp1_sel == INTn_1_INP_SEL_IIR1) || (inp2_sel == INTn_1_INP_SEL_IIR1)) { for (k = 0; k < IIR_MIX_CFG_MAX; k++) { iir_mux_cfg = BOLERO_CDC_RX_IIR_INP_MUX_IIR1_MIX_CFG0 + 4 * k; iir_mux_cfg_val = snd_soc_component_read32( component, iir_mux_cfg) & 0x1F; if (iir_mux_cfg_val == int_1_mix1_inp + IIR_MIX_CFG_OFFSET){ int_fs_reg = BOLERO_CDC_RX_RX0_RX_PATH_CTL + 0x80 * j; pr_debug("%s: AIF_PB DAI(%d) connected to INT%u_1 via IIR1\n", __func__, dai->id, j); pr_debug("%s: set INT%u_1 sample rate to %u\n", __func__, j, sample_rate); /* sample_rate is in Hz */ snd_soc_component_update_bits( component, int_fs_reg, 0x0F, rate_reg_val); } } } int_mux_cfg0 += 8; } Loading