ASoC: sdxlemur: Add support for new target compilation
Add support for sdxlemur Change-Id: I2338fd4df56e4f2c9f0c5f233e7e41aba4f37045 Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
This commit is contained in:
10
Makefile
10
Makefile
@@ -21,7 +21,12 @@ endif
|
|||||||
ifeq ($(CONFIG_ARCH_HOLI), y)
|
ifeq ($(CONFIG_ARCH_HOLI), y)
|
||||||
include $(srctree)/techpack/audio/config/holiauto.conf
|
include $(srctree)/techpack/audio/config/holiauto.conf
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(srctree)/techpack/audio/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Use USERINCLUDE when you must reference the UAPI directories only.
|
# Use USERINCLUDE when you must reference the UAPI directories only.
|
||||||
USERINCLUDE += \
|
USERINCLUDE += \
|
||||||
@@ -32,6 +37,7 @@ USERINCLUDE += \
|
|||||||
LINUXINCLUDE += \
|
LINUXINCLUDE += \
|
||||||
-I$(srctree)/techpack/audio/include/uapi \
|
-I$(srctree)/techpack/audio/include/uapi \
|
||||||
-I$(srctree)/techpack/audio/include/uapi/audio \
|
-I$(srctree)/techpack/audio/include/uapi/audio \
|
||||||
|
-I$(srctree)/techpack/audio/include/asoc \
|
||||||
-I$(srctree)/techpack/audio/include
|
-I$(srctree)/techpack/audio/include
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
|
ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y)
|
||||||
@@ -58,6 +64,10 @@ ifeq ($(CONFIG_ARCH_HOLI), y)
|
|||||||
LINUXINCLUDE += \
|
LINUXINCLUDE += \
|
||||||
-include $(srctree)/techpack/audio/config/holiautoconf.h
|
-include $(srctree)/techpack/audio/config/holiautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
LINUXINCLUDE += \
|
||||||
|
-include $(srctree)/techpack/audio/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
|
|
||||||
obj-y += soc/
|
obj-y += soc/
|
||||||
obj-y += dsp/
|
obj-y += dsp/
|
||||||
|
@@ -17,6 +17,11 @@ endif
|
|||||||
ifeq ($(TARGET_SUPPORT), sdmsteppe)
|
ifeq ($(TARGET_SUPPORT), sdmsteppe)
|
||||||
KBUILD_OPTIONS += CONFIG_ARCH_SM6150=y
|
KBUILD_OPTIONS += CONFIG_ARCH_SM6150=y
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(TARGET_SUPPORT), sdxlemur))
|
||||||
|
KBUILD_OPTIONS += CONFIG_ARCH_SDXLEMUR=y
|
||||||
|
endif
|
||||||
|
|
||||||
|
subdir-ccflags-y += -I$(AUDIO_ROOT)/include/uapi/
|
||||||
|
|
||||||
subdir-ccflags-y += -I$(AUDIO_ROOT)/include/uapi/
|
subdir-ccflags-y += -I$(AUDIO_ROOT)/include/uapi/
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ obj-m += dsp/
|
|||||||
obj-m += soc/
|
obj-m += soc/
|
||||||
obj-m += asoc/
|
obj-m += asoc/
|
||||||
obj-m += asoc/codecs/
|
obj-m += asoc/codecs/
|
||||||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdmsteppe))
|
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), sdmsteppe sdxlemur))
|
||||||
obj-m += asoc/codecs/wcd934x/
|
obj-m += asoc/codecs/wcd934x/
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qcs40x))
|
ifeq ($(TARGET_SUPPORT), $(filter $(TARGET_SUPPORT), qcs40x))
|
||||||
|
12
asoc/Kbuild
12
asoc/Kbuild
@@ -76,6 +76,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# As per target team, build is done as follows:
|
# As per target team, build is done as follows:
|
||||||
@@ -161,6 +166,10 @@ ifdef CONFIG_SND_SOC_QDSP6V2
|
|||||||
PLATFORM_OBJS += platform_init.o
|
PLATFORM_OBJS += platform_init.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_SND_SOC_SDX
|
||||||
|
MACHINE_OBJS += sdx-target.o
|
||||||
|
endif
|
||||||
|
|
||||||
LINUX_INC += -Iinclude/linux
|
LINUX_INC += -Iinclude/linux
|
||||||
|
|
||||||
INCS += $(COMMON_INC) \
|
INCS += $(COMMON_INC) \
|
||||||
@@ -236,5 +245,8 @@ machine_dlkm-y := $(MACHINE_OBJS)
|
|||||||
obj-$(CONFIG_SND_SOC_SA8155) += machine_dlkm.o
|
obj-$(CONFIG_SND_SOC_SA8155) += machine_dlkm.o
|
||||||
machine_dlkm-y := $(MACHINE_OBJS)
|
machine_dlkm-y := $(MACHINE_OBJS)
|
||||||
|
|
||||||
|
obj-$(CONFIG_SND_SOC_SDX) += machine_dlkm.o
|
||||||
|
machine_dlkm-y := $(MACHINE_OBJS)
|
||||||
|
|
||||||
# inject some build related information
|
# inject some build related information
|
||||||
DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
|
DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
|
||||||
|
@@ -70,6 +70,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# As per target team, build is done as follows:
|
# As per target team, build is done as follows:
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <asoc/core.h>
|
#include <asoc/core.h>
|
||||||
#include <asoc/wcd9xxx-regmap.h>
|
#include <asoc/wcd9xxx-regmap.h>
|
||||||
#include <asoc/wcd9335_registers.h>
|
#include "wcd9335_registers.h"
|
||||||
|
|
||||||
static const struct reg_sequence wcd9335_1_x_defaults[] = {
|
static const struct reg_sequence wcd9335_1_x_defaults[] = {
|
||||||
{ WCD9335_CODEC_RPM_CLK_GATE, 0x03, 0x00 },
|
{ WCD9335_CODEC_RPM_CLK_GATE, 0x03, 0x00 },
|
||||||
|
@@ -36,6 +36,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/sm8150autoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/sm8150autoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# As per target team, build is done as follows:
|
# As per target team, build is done as follows:
|
||||||
@@ -72,6 +77,7 @@ ifdef CONFIG_SND_SOC_WCD934X
|
|||||||
WCD934X_OBJS += wcd934x-dsd.o
|
WCD934X_OBJS += wcd934x-dsd.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
LINUX_INC += -Iinclude/linux
|
LINUX_INC += -Iinclude/linux
|
||||||
|
|
||||||
INCS += $(COMMON_INC) \
|
INCS += $(COMMON_INC) \
|
||||||
|
@@ -41,10 +41,9 @@
|
|||||||
#include <asoc/wcd9xxx-common-v2.h>
|
#include <asoc/wcd9xxx-common-v2.h>
|
||||||
#include <asoc/wcd9xxx-resmgr-v2.h>
|
#include <asoc/wcd9xxx-resmgr-v2.h>
|
||||||
#include <asoc/wcdcal-hwdep.h>
|
#include <asoc/wcdcal-hwdep.h>
|
||||||
|
#include <ipc/gpr-lite.h>
|
||||||
#include "wcd934x-dsd.h"
|
#include "wcd934x-dsd.h"
|
||||||
|
|
||||||
#define DRV_NAME "tavil_codec"
|
|
||||||
|
|
||||||
#define WCD934X_RATES_MASK (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
|
#define WCD934X_RATES_MASK (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
|
||||||
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\
|
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\
|
||||||
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000 |\
|
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000 |\
|
||||||
@@ -8116,16 +8115,16 @@ static const struct snd_soc_dapm_widget tavil_dapm_widgets[] = {
|
|||||||
SND_SOC_DAPM_INPUT("AMIC4"),
|
SND_SOC_DAPM_INPUT("AMIC4"),
|
||||||
SND_SOC_DAPM_INPUT("AMIC5"),
|
SND_SOC_DAPM_INPUT("AMIC5"),
|
||||||
|
|
||||||
SND_SOC_DAPM_MICBIAS_E("MIC BIAS1", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY("MIC BIAS1", SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
||||||
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E("MIC BIAS2", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY("MIC BIAS2", SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
||||||
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E("MIC BIAS3", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY("MIC BIAS3", SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
||||||
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E("MIC BIAS4", SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY("MIC BIAS4", SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
tavil_codec_enable_micbias, SND_SOC_DAPM_PRE_PMU |
|
||||||
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
|
|
||||||
@@ -8137,16 +8136,16 @@ static const struct snd_soc_dapm_widget tavil_dapm_widgets[] = {
|
|||||||
0, 0, tavil_codec_reset_hph_registers,
|
0, 0, tavil_codec_reset_hph_registers,
|
||||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
|
|
||||||
SND_SOC_DAPM_MICBIAS_E(DAPM_MICBIAS1_STANDALONE, SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY(DAPM_MICBIAS1_STANDALONE, SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_force_enable_micbias,
|
tavil_codec_force_enable_micbias,
|
||||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E(DAPM_MICBIAS2_STANDALONE, SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY(DAPM_MICBIAS2_STANDALONE, SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_force_enable_micbias,
|
tavil_codec_force_enable_micbias,
|
||||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E(DAPM_MICBIAS3_STANDALONE, SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY(DAPM_MICBIAS3_STANDALONE, SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_force_enable_micbias,
|
tavil_codec_force_enable_micbias,
|
||||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
SND_SOC_DAPM_MICBIAS_E(DAPM_MICBIAS4_STANDALONE, SND_SOC_NOPM, 0, 0,
|
SND_SOC_DAPM_SUPPLY(DAPM_MICBIAS4_STANDALONE, SND_SOC_NOPM, 0, 0,
|
||||||
tavil_codec_force_enable_micbias,
|
tavil_codec_force_enable_micbias,
|
||||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||||
|
|
||||||
@@ -9485,7 +9484,7 @@ int tavil_codec_info_create_codec_entry(struct snd_info_entry *codec_root,
|
|||||||
|
|
||||||
tavil = snd_soc_component_get_drvdata(component);
|
tavil = snd_soc_component_get_drvdata(component);
|
||||||
card = component->card;
|
card = component->card;
|
||||||
tavil->entry = snd_info_create_subdir(codec_root->module,
|
tavil->entry = snd_info_create_module_entry(codec_root->module,
|
||||||
"tavil", codec_root);
|
"tavil", codec_root);
|
||||||
if (!tavil->entry) {
|
if (!tavil->entry) {
|
||||||
dev_dbg(component->dev, "%s: failed to create wcd934x entry\n",
|
dev_dbg(component->dev, "%s: failed to create wcd934x entry\n",
|
||||||
@@ -10356,7 +10355,7 @@ static int tavil_post_reset_cb(struct wcd9xxx *wcd9xxx)
|
|||||||
|
|
||||||
component = (struct snd_soc_component *)(wcd9xxx->ssr_priv);
|
component = (struct snd_soc_component *)(wcd9xxx->ssr_priv);
|
||||||
if (!component->card) {
|
if (!component->card) {
|
||||||
dev_err(codec->dev, "%s: sound card is not enumerated.\n",
|
dev_err(component->dev, "%s: sound card is not enumerated.\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -10665,7 +10664,7 @@ static void tavil_soc_codec_remove(struct snd_soc_component *component)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_soc_component_driver soc_codec_dev_tavil = {
|
static const struct snd_soc_component_driver soc_codec_dev_tavil = {
|
||||||
.name = DRV_NAME,
|
.name = WCD934X_DRV_NAME,
|
||||||
.probe = tavil_soc_codec_probe,
|
.probe = tavil_soc_codec_probe,
|
||||||
.remove = tavil_soc_codec_remove,
|
.remove = tavil_soc_codec_remove,
|
||||||
.controls = tavil_snd_controls,
|
.controls = tavil_snd_controls,
|
||||||
@@ -11286,7 +11285,7 @@ static int tavil_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tavil->intf_type == WCD9XXX_INTERFACE_TYPE_I2C) {
|
if (tavil->intf_type == WCD9XXX_INTERFACE_TYPE_I2C) {
|
||||||
if (apr_get_subsys_state() == APR_SUBSYS_DOWN) {
|
if (gpr_get_modem_state() == GPR_SUBSYS_DOWN) {
|
||||||
dev_dbg(&pdev->dev, "%s: dsp down\n", __func__);
|
dev_dbg(&pdev->dev, "%s: dsp down\n", __func__);
|
||||||
devm_kfree(&pdev->dev, tavil);
|
devm_kfree(&pdev->dev, tavil);
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
#include <asoc/wcd9xxx-common-v2.h>
|
#include <asoc/wcd9xxx-common-v2.h>
|
||||||
#include <asoc/wcd-mbhc-v2.h>
|
#include <asoc/wcd-mbhc-v2.h>
|
||||||
|
|
||||||
|
#define WCD934X_DRV_NAME "tavil_codec"
|
||||||
|
|
||||||
#define WCD934X_REGISTER_START_OFFSET 0x800
|
#define WCD934X_REGISTER_START_OFFSET 0x800
|
||||||
#define WCD934X_SB_PGD_PORT_RX_BASE 0x40
|
#define WCD934X_SB_PGD_PORT_RX_BASE 0x40
|
||||||
#define WCD934X_SB_PGD_PORT_TX_BASE 0x50
|
#define WCD934X_SB_PGD_PORT_TX_BASE 0x50
|
||||||
|
@@ -63,13 +63,16 @@ static struct regmap_config wcd9xxx_base_regmap_config = {
|
|||||||
.reg_bits = 16,
|
.reg_bits = 16,
|
||||||
.val_bits = 8,
|
.val_bits = 8,
|
||||||
.can_multi_write = true,
|
.can_multi_write = true,
|
||||||
|
.use_single_read = true,
|
||||||
|
.use_single_write = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct regmap_config wcd9xxx_i2c_base_regmap_config = {
|
static struct regmap_config wcd9xxx_i2c_base_regmap_config = {
|
||||||
.reg_bits = 16,
|
.reg_bits = 16,
|
||||||
.val_bits = 8,
|
.val_bits = 8,
|
||||||
.can_multi_write = false,
|
.can_multi_write = false,
|
||||||
.use_single_rw = true,
|
.use_single_read = true,
|
||||||
|
.use_single_write = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u8 wcd9xxx_pgd_la;
|
static u8 wcd9xxx_pgd_la;
|
||||||
|
@@ -172,3 +172,13 @@ SND_SOC_DAILINK_DEFS(vi_feedback,
|
|||||||
DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
|
DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
|
||||||
DAILINK_COMP_ARRAY(COMP_CODEC("bolero_codec", "wsa_macro_vifeedback")),
|
DAILINK_COMP_ARRAY(COMP_CODEC("bolero_codec", "wsa_macro_vifeedback")),
|
||||||
DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
|
DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
|
||||||
|
|
||||||
|
SND_SOC_DAILINK_DEFS(tavil_i2s_rx1,
|
||||||
|
DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
|
||||||
|
DAILINK_COMP_ARRAY(COMP_CODEC("tavil_codec", "tavil_i2s_rx1")),
|
||||||
|
DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
|
||||||
|
|
||||||
|
SND_SOC_DAILINK_DEFS(tavil_i2s_tx1,
|
||||||
|
DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
|
||||||
|
DAILINK_COMP_ARRAY(COMP_CODEC("tavil_codec", "tavil_i2s_tx1")),
|
||||||
|
DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
|
||||||
|
68
asoc/sdx-port-config.h
Normal file
68
asoc/sdx-port-config.h
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _LAHAINA_PORT_CONFIG
|
||||||
|
#define _LAHAINA_PORT_CONFIG
|
||||||
|
|
||||||
|
#include <soc/swr-common.h>
|
||||||
|
|
||||||
|
#define WSA_MSTR_PORT_MASK 0xFF
|
||||||
|
/*
|
||||||
|
* Add port configuration in the format
|
||||||
|
*{ si, off1, off2, hstart, hstop, wd_len, bp_mode, bgp_ctrl, lane_ctrl, dir,
|
||||||
|
* stream_type}
|
||||||
|
*/
|
||||||
|
|
||||||
|
static struct port_params wsa_frame_params_default[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{7, 1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{31, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{63, 12, 31, 0xFF, 0xFF, 0xFF, 0x1, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{7, 6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{31, 18, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{63, 13, 31, 0xFF, 0xFF, 0xFF, 0x1, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{15, 7, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
{15, 10, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct port_params rx_frame_params_dsd[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1, 0x00, 0x00},
|
||||||
|
{31, 0, 0, 3, 6, 7, 0, 0xFF, 0, 0x00, 0x00},
|
||||||
|
{31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0, 0x00, 0x00},
|
||||||
|
{7, 9, 0, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0, 0x00, 0x00},
|
||||||
|
{3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 3, 0, 0x00, 0x00},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Headset + PCM Haptics */
|
||||||
|
static struct port_params rx_frame_params_default[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1, 0x00, 0x00}, /* HPH/EAR */
|
||||||
|
{31, 0, 0, 3, 6, 7, 0, 0xFF, 0, 0x00, 0x00}, /* HPH_CLH */
|
||||||
|
{31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0, 0x00, 0x00}, /* HPH_CMP */
|
||||||
|
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* LO/AUX */
|
||||||
|
{0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0, 0x00, 0x00}, /* DSD */
|
||||||
|
{0x18F, 0, 0, 0x8, 0x8, 0x0F, 0x00, 0, 0, 0x00, 0x01}, /* PCM_OUT */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
|
||||||
|
static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */
|
||||||
|
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX2 */
|
||||||
|
{7, 5, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
|
||||||
|
static struct port_params tx_frame_params_shima[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */
|
||||||
|
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX2 */
|
||||||
|
{7, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 4.8 MHz clock */
|
||||||
|
static struct port_params tx_frame_params_4p8MHz[SWR_MSTR_PORT_LEN] = {
|
||||||
|
{3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */
|
||||||
|
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX2 */
|
||||||
|
{3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _LAHAINA_PORT_CONFIG */
|
1204
asoc/sdx-target.c
Normal file
1204
asoc/sdx-target.c
Normal file
Plik diff jest za duży
Load Diff
31
config/sdxlemurauto.conf
Normal file
31
config/sdxlemurauto.conf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
export CONFIG_PINCTRL_WCD=m
|
||||||
|
export CONFIG_AUDIO_EXT_CLK=m
|
||||||
|
export CONFIG_SND_SOC_WCD9XXX_V2=m
|
||||||
|
export CONFIG_SND_SOC_WCD_MBHC=m
|
||||||
|
export CONFIG_SND_SOC_WSA881X=m
|
||||||
|
export CONFIG_SND_SOC_WCD934X=m
|
||||||
|
export CONFIG_SND_SOC_WCD934X_MBHC=m
|
||||||
|
export CONFIG_SND_SOC_WCD934X_DSD=m
|
||||||
|
export CONFIG_SOUNDWIRE_WCD_CTRL=m
|
||||||
|
export CONFIG_WCD9XXX_CODEC_CORE=m
|
||||||
|
export CONFIG_MSM_CDC_PINCTRL=m
|
||||||
|
export CONFIG_MSM_QDSP6_GPR_RPMSG=m
|
||||||
|
export CONFIG_AUDIO_PKT=m
|
||||||
|
export CONFIG_AUDIO_PKT_ION=m
|
||||||
|
export CONFIG_SPF_CORE=m
|
||||||
|
export CONFIG_AUDIO_PRM=m
|
||||||
|
export CONFIG_MSM_ADSP_LOADER=m
|
||||||
|
export CONFIG_REGMAP_SWR=m
|
||||||
|
export CONFIG_MSM_QDSP6_SSR=m
|
||||||
|
export CONFIG_MSM_QDSP6_PDR=m
|
||||||
|
export CONFIG_MSM_QDSP6_NOTIFIER=m
|
||||||
|
export CONFIG_SND_SOC_MSM_HOSTLESS_PCM=m
|
||||||
|
export CONFIG_SND_SOC_MSM_QDSP6V2_INTF=m
|
||||||
|
export CONFIG_SND_SOC_SDX=m
|
||||||
|
export CONFIG_MSM_GLINK_SPI_XPRT=m
|
||||||
|
export CONFIG_WCD_DSP_GLINK=m
|
||||||
|
export CONFIG_SOUNDWIRE=m
|
||||||
|
export CONFIG_SND_SOC_QDSP6V2=m
|
||||||
|
export CONFIG_SND_SOC_WCD_MBHC_ADC=m
|
||||||
|
export CONFIG_SND_SOC_MSM_STUB=m
|
||||||
|
export CONFIG_SND_EVENT=m
|
35
config/sdxlemurautoconf.h
Normal file
35
config/sdxlemurautoconf.h
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CONFIG_PINCTRL_WCD 1
|
||||||
|
#define CONFIG_AUDIO_EXT_CLK 1
|
||||||
|
#define CONFIG_SND_SOC_WCD9XXX_V2 1
|
||||||
|
#define CONFIG_SND_SOC_WCD_MBHC 1
|
||||||
|
#define CONFIG_SND_SOC_WSA881X 1
|
||||||
|
#define CONFIG_SND_SOC_WCD934X 1
|
||||||
|
#define CONFIG_SND_SOC_WCD934X_MBHC 1
|
||||||
|
#define CONFIG_SND_SOC_WCD934X_DSD 1
|
||||||
|
#define CONFIG_WCD9XXX_CODEC_CORE 1
|
||||||
|
#define CONFIG_MSM_CDC_PINCTRL 1
|
||||||
|
#define CONFIG_MSM_QDSP6_GPR_RPMSG 1
|
||||||
|
#define CONFIG_AUDIO_PKT 1
|
||||||
|
#define CONFIG_AUDIO_PKT_ION 1
|
||||||
|
#define CONFIG_SPF_CORE 1
|
||||||
|
#define CONFIG_AUDIO_PRM 1
|
||||||
|
#define CONFIG_SND_SOC_MSM_QDSP6V2_INTF 1
|
||||||
|
#define CONFIG_MSM_ADSP_LOADER 1
|
||||||
|
#define CONFIG_REGMAP_SWR 1
|
||||||
|
#define CONFIG_MSM_QDSP6_SSR 1
|
||||||
|
#define CONFIG_MSM_QDSP6_PDR 1
|
||||||
|
#define CONFIG_MSM_QDSP6_NOTIFIER 1
|
||||||
|
#define CONFIG_SND_SOC_MSM_HOSTLESS_PCM 1
|
||||||
|
#define CONFIG_SND_SOC_SDX 1
|
||||||
|
#define CONFIG_MSM_GLINK_SPI_XPRT 1
|
||||||
|
#define CONFIG_WCD_DSP_GLINK 1
|
||||||
|
#define CONFIG_SOUNDWIRE 1
|
||||||
|
#define CONFIG_SOUNDWIRE_WCD_CTRL 1
|
||||||
|
#define CONFIG_SND_SOC_WCD_MBHC_ADC 1
|
||||||
|
#define CONFIG_SND_SOC_QDSP6V2 1
|
||||||
|
#define CONFIG_SND_SOC_MSM_STUB 1
|
||||||
|
#define CONFIG_SND_EVENT 1
|
@@ -76,6 +76,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#ifndef __WCD9XXX_COMMON_V2_H__
|
#ifndef __WCD9XXX_COMMON_V2_H__
|
||||||
#define __WCD9XXX_COMMON_V2_H__
|
#define __WCD9XXX_COMMON_V2_H__
|
||||||
|
|
||||||
#include <audio/audio/linux/mfd/wcd9xxx/wcd9xxx_registers.h>
|
#include <audio/linux/mfd/wcd9xxx/wcd9xxx_registers.h>
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
|
|
||||||
enum wcd_clock_type {
|
enum wcd_clock_type {
|
||||||
|
@@ -283,4 +283,5 @@ void gpr_driver_unregister(struct gpr_driver *drv);
|
|||||||
|
|
||||||
int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt);
|
int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt);
|
||||||
|
|
||||||
|
enum gpr_subsys_state gpr_get_modem_state(void);
|
||||||
#endif /* __QCOM_GPR_H_ */
|
#endif /* __QCOM_GPR_H_ */
|
||||||
|
@@ -1 +1 @@
|
|||||||
../../../../../../kernel/msm-5.4/drivers/base/regmap/internal.h
|
../../../../drivers/base/regmap/internal.h
|
@@ -77,6 +77,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# As per target team, build is done as follows:
|
# As per target team, build is done as follows:
|
||||||
|
@@ -120,6 +120,7 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
|
|||||||
spin_lock_irqsave(&adev->lock, flags);
|
spin_lock_irqsave(&adev->lock, flags);
|
||||||
|
|
||||||
hdr = &pkt->hdr;
|
hdr = &pkt->hdr;
|
||||||
|
hdr->dst_domain_id = adev->domain_id;
|
||||||
pkt_size = GPR_PKT_GET_PACKET_BYTE_SIZE(hdr->header);
|
pkt_size = GPR_PKT_GET_PACKET_BYTE_SIZE(hdr->header);
|
||||||
|
|
||||||
dev_dbg(gpr->dev, "SVC_ID %d %s packet size %d\n",
|
dev_dbg(gpr->dev, "SVC_ID %d %s packet size %d\n",
|
||||||
|
@@ -76,6 +76,11 @@ ifeq ($(KERNEL_BUILD), 0)
|
|||||||
export
|
export
|
||||||
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
INCS += -include $(AUDIO_ROOT)/config/gvmautoconf.h
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_ARCH_SDXLEMUR), y)
|
||||||
|
include $(AUDIO_ROOT)/config/sdxlemurauto.conf
|
||||||
|
export
|
||||||
|
INCS += -include $(AUDIO_ROOT)/config/sdxlemurautoconf.h
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# As per target team, build is done as follows:
|
# As per target team, build is done as follows:
|
||||||
|
@@ -1 +1 @@
|
|||||||
../../../../../kernel/msm-5.4/drivers/pinctrl/core.h
|
../../../drivers/pinctrl/core.h
|
@@ -1 +1 @@
|
|||||||
../../../../../kernel/msm-5.4/drivers/pinctrl/pinctrl-utils.h
|
../../../drivers/pinctrl/pinctrl-utils.h
|
Reference in New Issue
Block a user