Merge "asoc: Binrgup fixes for talos"

This commit is contained in:
Linux Build Service Account 2018-08-12 05:58:33 -07:00 committed by Gerrit - the friendly Code Review server
commit 0c56067b68
5 changed files with 49 additions and 31 deletions

View file

@ -980,49 +980,49 @@ static const struct snd_soc_dapm_widget tx_macro_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("TX SWR_DMIC6"),
SND_SOC_DAPM_INPUT("TX SWR_DMIC7"),
SND_SOC_DAPM_MUX_E("TX DEC0 MUX", BOLERO_CDC_TX0_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC0 MUX", SND_SOC_NOPM,
TX_MACRO_DEC0, 0,
&tx_dec0_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC1 MUX", BOLERO_CDC_TX1_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC1 MUX", SND_SOC_NOPM,
TX_MACRO_DEC1, 0,
&tx_dec1_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC2 MUX", BOLERO_CDC_TX2_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC2 MUX", SND_SOC_NOPM,
TX_MACRO_DEC2, 0,
&tx_dec2_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC3 MUX", BOLERO_CDC_TX3_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC3 MUX", SND_SOC_NOPM,
TX_MACRO_DEC3, 0,
&tx_dec3_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC4 MUX", BOLERO_CDC_TX4_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC4 MUX", SND_SOC_NOPM,
TX_MACRO_DEC4, 0,
&tx_dec4_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC5 MUX", BOLERO_CDC_TX5_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC5 MUX", SND_SOC_NOPM,
TX_MACRO_DEC5, 0,
&tx_dec5_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC6 MUX", BOLERO_CDC_TX6_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC6 MUX", SND_SOC_NOPM,
TX_MACRO_DEC6, 0,
&tx_dec6_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_MUX_E("TX DEC7 MUX", BOLERO_CDC_TX7_TX_PATH_CTL,
SND_SOC_DAPM_MUX_E("TX DEC7 MUX", SND_SOC_NOPM,
TX_MACRO_DEC7, 0,
&tx_dec7_mux, tx_macro_enable_dec,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |

View file

@ -1032,6 +1032,12 @@ static const struct snd_soc_dapm_widget va_macro_dapm_widgets[] = {
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
};
static const struct snd_soc_dapm_widget va_macro_wod_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY_S("VA_MCLK", 0, SND_SOC_NOPM, 0, 0,
va_macro_mclk_event,
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
};
static const struct snd_soc_dapm_route va_audio_map[] = {
{"VA_AIF1 CAP", NULL, "VA_MCLK"},
{"VA_AIF2 CAP", NULL, "VA_MCLK"},
@ -1347,6 +1353,19 @@ static int va_macro_init(struct snd_soc_codec *codec)
return -EINVAL;
}
if (va_priv->va_without_decimation) {
ret = snd_soc_dapm_new_controls(dapm, va_macro_wod_dapm_widgets,
ARRAY_SIZE(va_macro_wod_dapm_widgets));
if (ret < 0) {
dev_err(va_dev,
"%s: Failed to add without dec controls\n",
__func__);
return ret;
}
va_priv->codec = codec;
return 0;
}
ret = snd_soc_dapm_new_controls(dapm, va_macro_dapm_widgets,
ARRAY_SIZE(va_macro_dapm_widgets));
if (ret < 0) {
@ -1409,16 +1428,14 @@ static void va_macro_init_ops(struct macro_ops *ops,
{
memset(ops, 0, sizeof(struct macro_ops));
if (!va_without_decimation) {
ops->init = va_macro_init;
ops->exit = va_macro_deinit;
ops->dai_ptr = va_macro_dai;
ops->num_dais = ARRAY_SIZE(va_macro_dai);
} else {
ops->init = NULL;
ops->exit = NULL;
ops->dai_ptr = NULL;
ops->num_dais = 0;
}
ops->init = va_macro_init;
ops->exit = va_macro_deinit;
ops->io_base = va_io_base;
ops->mclk_fn = va_macro_mclk_ctrl;
}
@ -1477,9 +1494,10 @@ static int va_macro_probe(struct platform_device *pdev)
/* Register MCLK for va macro */
va_core_clk = devm_clk_get(&pdev->dev, "va_core_clk");
if (IS_ERR(va_core_clk)) {
ret = PTR_ERR(va_core_clk);
dev_err(&pdev->dev, "%s: clk get %s failed\n",
__func__, "va_core_clk");
return -EINVAL;
return ret;
}
va_priv->va_core_clk = va_core_clk;

View file

@ -2252,17 +2252,19 @@ static int wsa_macro_probe(struct platform_device *pdev)
/* Register MCLK for wsa macro */
wsa_core_clk = devm_clk_get(&pdev->dev, "wsa_core_clk");
if (IS_ERR(wsa_core_clk)) {
ret = PTR_ERR(wsa_core_clk);
dev_err(&pdev->dev, "%s: clk get %s failed\n",
__func__, "wsa_core_clk");
return -EINVAL;
return ret;
}
wsa_priv->wsa_core_clk = wsa_core_clk;
/* Register npl clk for soundwire */
wsa_npl_clk = devm_clk_get(&pdev->dev, "wsa_npl_clk");
if (IS_ERR(wsa_npl_clk)) {
ret = PTR_ERR(wsa_npl_clk);
dev_err(&pdev->dev, "%s: clk get %s failed\n",
__func__, "wsa_npl_clk");
return -EINVAL;
return ret;
}
wsa_priv->wsa_npl_clk = wsa_npl_clk;
dev_set_drvdata(&pdev->dev, wsa_priv);

View file

@ -1778,14 +1778,6 @@ static int wcd937x_bind(struct device *dev)
}
wcd937x->rst_np = pdata->rst_np;
wcd937x_reset(dev);
/*
* Add 5msec delay to provide sufficient time for
* soundwire auto enumeration of slave devices as
* as per HW requirement.
*/
usleep_range(5000, 5010);
ret = msm_cdc_init_supplies(dev, &wcd937x->supplies,
pdata->regulator, pdata->num_supplies);
if (!wcd937x->supplies) {
@ -1803,6 +1795,14 @@ static int wcd937x_bind(struct device *dev)
return ret;
}
wcd937x_reset(dev);
/*
* Add 5msec delay to provide sufficient time for
* soundwire auto enumeration of slave devices as
* as per HW requirement.
*/
usleep_range(5000, 5010);
ret = component_bind_all(dev, wcd937x);
if (ret) {
dev_err(dev, "%s: Slave bind failed, ret = %d\n",

View file

@ -7342,13 +7342,12 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_RX_CDC_DMA_RX_0,
.stream_name = "RX CDC DMA0 Playback",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45120",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45104",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "rx_macro_rx1",
.no_pcm = 1,
.dpcm_playback = 1,
.init = &msm_int_audrx_init,
.id = MSM_BACKEND_DAI_RX_CDC_DMA_RX_0,
.be_hw_params_fixup = msm_be_hw_params_fixup,
.ignore_pmdown_time = 1,
@ -7358,7 +7357,7 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_RX_CDC_DMA_RX_1,
.stream_name = "RX CDC DMA1 Playback",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45122",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45106",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "rx_macro_rx2",
@ -7373,7 +7372,7 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_RX_CDC_DMA_RX_2,
.stream_name = "RX CDC DMA2 Playback",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45124",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45108",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "rx_macro_rx3",
@ -7388,7 +7387,7 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_RX_CDC_DMA_RX_3,
.stream_name = "RX CDC DMA3 Playback",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45126",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45110",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "rx_macro_rx4",
@ -7404,13 +7403,12 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_TX_CDC_DMA_TX_3,
.stream_name = "TX CDC DMA3 Capture",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45127",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45111",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "tx_macro_tx1",
.no_pcm = 1,
.dpcm_capture = 1,
.init = &msm_int_audrx_init,
.id = MSM_BACKEND_DAI_TX_CDC_DMA_TX_3,
.be_hw_params_fixup = msm_be_hw_params_fixup,
.ignore_suspend = 1,
@ -7419,7 +7417,7 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
{
.name = LPASS_BE_TX_CDC_DMA_TX_4,
.stream_name = "TX CDC DMA4 Capture",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45129",
.cpu_dai_name = "msm-dai-cdc-dma-dev.45113",
.platform_name = "msm-pcm-routing",
.codec_name = "bolero_codec",
.codec_dai_name = "tx_macro_tx2",