Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9356dd21 authored by Shalini Manjunatha's avatar Shalini Manjunatha
Browse files

ASoC: SDM660: Avoid static route between cpu and codec dai



Currently ASoC core creates a static route b/w
playback/capture widgets of cpu and codec dai
if they are part of the same dai-link. However
this will cause codec path to get powered up first
followed by the backend dai start during device
switch use-case where the front-end is not closed,
leading to audio playback failure if either bit-width
or sample rate is different. Set the dynamic bit of
backend dai dailink to update the backend parameters
before codec path setup.

Change-Id: I58d4fef939ecee12506da39f7bb48cdeaaec3996
Signed-off-by: default avatarShalini Manjunatha <shalma@codeaurora.org>
parent c372adb2
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2019, 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, 2021, The Linux Foundation. All rights reserved.
 */

#include <linux/of.h>
@@ -275,6 +275,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_mix_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_0_RX,
@@ -306,6 +307,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_mix_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_1_RX,
@@ -336,6 +338,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_mix_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_3_RX,
@@ -367,6 +370,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_mix_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_4_RX,
@@ -383,6 +387,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_rx3",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_5_RX,
@@ -414,6 +419,7 @@ static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tasha_codec",
		.codec_dai_name = "tasha_rx4",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_6_RX,
@@ -433,6 +439,7 @@ static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tavil_codec",
		.codec_dai_name = "tavil_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_0_RX,
@@ -464,6 +471,7 @@ static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tavil_codec",
		.codec_dai_name = "tavil_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_1_RX,
@@ -494,6 +502,7 @@ static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tavil_codec",
		.codec_dai_name = "tavil_rx2",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_2_RX,
@@ -509,6 +518,7 @@ static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tavil_codec",
		.codec_dai_name = "tavil_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_3_RX,
@@ -539,6 +549,7 @@ static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
		.platform_name = "msm-pcm-routing",
		.codec_name = "tavil_codec",
		.codec_dai_name = "tavil_rx1",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_4_RX,
@@ -1799,6 +1810,7 @@ static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
		 * supported usecase information
		 */
		.codec_dai_name = "btfm_bt_sco_a2dp_slim_rx",
		.dynamic_be = 1,
		.no_pcm = 1,
		.dpcm_playback = 1,
		.id = MSM_BACKEND_DAI_SLIMBUS_7_RX,