asoc: Enable VAD in QCS405

Add AFE HW CAL dep node in config and fix the set sampling rate
for codec dma interface

Change-Id: I9165a80da00bfb5b61bbf4f0391ff794d8fba352
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
This commit is contained in:
Mangesh Kunchamwar 2018-07-10 17:50:35 +05:30
parent ab8586d542
commit 2d84e4aedc
5 changed files with 37 additions and 5 deletions

View file

@ -1127,7 +1127,6 @@ static int msm_dai_q6_dai_auxpcm_remove(struct snd_soc_dai *dai)
return 0;
}
static int msm_dai_q6_island_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
@ -1155,6 +1154,7 @@ static struct snd_kcontrol_new island_config_controls[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "?",
.info = snd_ctl_boolean_mono_info,
.get = msm_dai_q6_island_mode_get,
.put = msm_dai_q6_island_mode_put,
.private_value = SOC_SINGLE_VALUE(0, 0, 1, 0, 0)
@ -1178,8 +1178,7 @@ static int msm_dai_q6_add_island_mx_ctls(struct snd_card *card,
if (!mixer_str)
return -ENOMEM;
snprintf(mixer_str, ctl_len + strlen(mx_ctl_name) + 1,
"%s %s", dai_name, mx_ctl_name);
snprintf(mixer_str, ctl_len, "%s %s", dai_name, mx_ctl_name);
island_config_controls[0].name = mixer_str;
((struct soc_enum *) island_config_controls[0].private_value)->reg
= dai_id;

View file

@ -462,7 +462,8 @@ static const char *const cdc_dma_rx_ch_text[] = {"One", "Two"};
static const char *const cdc_dma_tx_ch_text[] = {"One", "Two", "Three", "Four",
"Five", "Six", "Seven",
"Eight"};
static char const *cdc_dma_sample_rate_text[] = {"KHZ_8", "KHZ_16",
static char const *cdc_dma_sample_rate_text[] = {"KHZ_8", "KHZ_11P025",
"KHZ_16", "KHZ_22P05",
"KHZ_32", "KHZ_44P1", "KHZ_48",
"KHZ_88P2", "KHZ_96", "KHZ_176P4",
"KHZ_192", "KHZ_352P8", "KHZ_384"};
@ -6034,6 +6035,35 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
.ops = &qcs405_tdm_be_ops,
.ignore_suspend = 1,
},
{
.name = LPASS_BE_QUIN_TDM_RX_0,
.stream_name = "Quinary TDM0 Playback",
.cpu_dai_name = "msm-dai-q6-tdm.36928",
.platform_name = "msm-pcm-routing",
.codec_name = "msm-stub-codec.1",
.codec_dai_name = "msm-stub-rx",
.no_pcm = 1,
.dpcm_playback = 1,
.id = MSM_BACKEND_DAI_QUIN_TDM_RX_0,
.be_hw_params_fixup = msm_tdm_be_hw_params_fixup,
.ops = &qcs405_tdm_be_ops,
.ignore_suspend = 1,
.ignore_pmdown_time = 1,
},
{
.name = LPASS_BE_QUIN_TDM_TX_0,
.stream_name = "Quinary TDM0 Capture",
.cpu_dai_name = "msm-dai-q6-tdm.36929",
.platform_name = "msm-pcm-routing",
.codec_name = "msm-stub-codec.1",
.codec_dai_name = "msm-stub-tx",
.no_pcm = 1,
.dpcm_capture = 1,
.id = MSM_BACKEND_DAI_QUIN_TDM_TX_0,
.be_hw_params_fixup = msm_be_hw_params_fixup,
.ops = &qcs405_tdm_be_ops,
.ignore_suspend = 1,
},
};
static struct snd_soc_dai_link msm_tasha_be_dai_links[] = {

View file

@ -26,6 +26,7 @@ CONFIG_SND_SOC_WCD_MBHC_LEGACY=m
CONFIG_SND_SOC_QDSP6V2=m
CONFIG_QTI_PP=m
CONFIG_SND_HWDEP_ROUTING=m
CONFIG_AFE_HWDEP=m
CONFIG_DTS_EAGLE=m
CONFIG_DOLBY_DS2=m
CONFIG_DOLBY_LICENSE=m

View file

@ -38,6 +38,7 @@
#define CONFIG_SND_SOC_QDSP6V2 1
#define CONFIG_QTI_PP 1
#define CONFIG_SND_HWDEP_ROUTING 1
#define CONFIG_AFE_HWDEP 1
#define CONFIG_DTS_EAGLE 1
#define CONFIG_DOLBY_DS2 1
#define CONFIG_DOLBY_LICENSE 1

View file

@ -3513,10 +3513,11 @@ static int __afe_port_start(u16 port_id, union afe_port_config *afe_config,
/* send VAD configuration if is enabled */
if (this_afe.vad_cfg[port_index].is_enable) {
ret = afe_send_port_vad_cfg_params(port_id);
if (ret)
if (ret) {
pr_err("%s: afe send VAD config failed %d\n",
__func__, ret);
goto fail_cmd;
}
}
}