Commit 5976192d authored by Mark Brown's avatar Mark Brown

ASoC: Merge up fixes

To facilitate testing get our current fixes into the branch.
parents 39522868 70b47699
...@@ -505,6 +505,13 @@ static int acp_card_rt5682s_hw_params(struct snd_pcm_substream *substream, ...@@ -505,6 +505,13 @@ static int acp_card_rt5682s_hw_params(struct snd_pcm_substream *substream,
clk_set_rate(drvdata->wclk, srate); clk_set_rate(drvdata->wclk, srate);
clk_set_rate(drvdata->bclk, srate * ch * format); clk_set_rate(drvdata->bclk, srate * ch * format);
if (!drvdata->soc_mclk) {
ret = acp_clk_enable(drvdata, srate, ch * format);
if (ret < 0) {
dev_err(rtd->card->dev, "Failed to enable HS clk: %d\n", ret);
return ret;
}
}
return 0; return 0;
} }
...@@ -1464,8 +1471,13 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) ...@@ -1464,8 +1471,13 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card)
if (drv_data->amp_cpu_id == I2S_SP) { if (drv_data->amp_cpu_id == I2S_SP) {
links[i].name = "acp-amp-codec"; links[i].name = "acp-amp-codec";
links[i].id = AMP_BE_ID; links[i].id = AMP_BE_ID;
if (drv_data->platform == RENOIR) {
links[i].cpus = sof_sp;
links[i].num_cpus = ARRAY_SIZE(sof_sp);
} else {
links[i].cpus = sof_sp_virtual; links[i].cpus = sof_sp_virtual;
links[i].num_cpus = ARRAY_SIZE(sof_sp_virtual); links[i].num_cpus = ARRAY_SIZE(sof_sp_virtual);
}
links[i].platforms = sof_component; links[i].platforms = sof_component;
links[i].num_platforms = ARRAY_SIZE(sof_component); links[i].num_platforms = ARRAY_SIZE(sof_component);
links[i].dpcm_playback = 1; links[i].dpcm_playback = 1;
......
...@@ -46,6 +46,7 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = { ...@@ -46,6 +46,7 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = {
.hs_codec_id = RT5682S, .hs_codec_id = RT5682S,
.amp_codec_id = RT1019, .amp_codec_id = RT1019,
.dmic_codec_id = DMIC, .dmic_codec_id = DMIC,
.platform = RENOIR,
}; };
static struct acp_card_drvdata sof_rt5682s_max_data = { static struct acp_card_drvdata sof_rt5682s_max_data = {
...@@ -55,6 +56,7 @@ static struct acp_card_drvdata sof_rt5682s_max_data = { ...@@ -55,6 +56,7 @@ static struct acp_card_drvdata sof_rt5682s_max_data = {
.hs_codec_id = RT5682S, .hs_codec_id = RT5682S,
.amp_codec_id = MAX98360A, .amp_codec_id = MAX98360A,
.dmic_codec_id = DMIC, .dmic_codec_id = DMIC,
.platform = RENOIR,
}; };
static struct acp_card_drvdata sof_nau8825_data = { static struct acp_card_drvdata sof_nau8825_data = {
...@@ -64,6 +66,7 @@ static struct acp_card_drvdata sof_nau8825_data = { ...@@ -64,6 +66,7 @@ static struct acp_card_drvdata sof_nau8825_data = {
.hs_codec_id = NAU8825, .hs_codec_id = NAU8825,
.amp_codec_id = MAX98360A, .amp_codec_id = MAX98360A,
.dmic_codec_id = DMIC, .dmic_codec_id = DMIC,
.platform = REMBRANDT,
.soc_mclk = true, .soc_mclk = true,
}; };
...@@ -74,6 +77,7 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { ...@@ -74,6 +77,7 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = {
.hs_codec_id = RT5682S, .hs_codec_id = RT5682S,
.amp_codec_id = RT1019, .amp_codec_id = RT1019,
.dmic_codec_id = DMIC, .dmic_codec_id = DMIC,
.platform = REMBRANDT,
.soc_mclk = true, .soc_mclk = true,
}; };
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/slimbus.h> #include <linux/slimbus.h>
#include <sound/pcm_params.h> #include <sound/pcm_params.h>
......
...@@ -210,7 +210,7 @@ struct wcd938x_priv { ...@@ -210,7 +210,7 @@ struct wcd938x_priv {
}; };
static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(ear_pa_gain, 600, -1800); static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(ear_pa_gain, 600, -1800);
static const DECLARE_TLV_DB_SCALE(line_gain, -3000, 150, -3000); static const DECLARE_TLV_DB_SCALE(line_gain, -3000, 150, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(analog_gain, 0, 3000); static const SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(analog_gain, 0, 3000);
struct wcd938x_mbhc_zdet_param { struct wcd938x_mbhc_zdet_param {
...@@ -3587,10 +3587,8 @@ static int wcd938x_probe(struct platform_device *pdev) ...@@ -3587,10 +3587,8 @@ static int wcd938x_probe(struct platform_device *pdev)
mutex_init(&wcd938x->micb_lock); mutex_init(&wcd938x->micb_lock);
ret = wcd938x_populate_dt_data(wcd938x, dev); ret = wcd938x_populate_dt_data(wcd938x, dev);
if (ret) { if (ret)
dev_err(dev, "%s: Fail to obtain platform data\n", __func__); return ret;
return -EINVAL;
}
ret = wcd938x_add_slave_components(wcd938x, dev, &match); ret = wcd938x_add_slave_components(wcd938x, dev, &match);
if (ret) if (ret)
......
...@@ -1037,7 +1037,7 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card, ...@@ -1037,7 +1037,7 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
return -EINVAL; return -EINVAL;
} }
#define MAX_DEFAULT_CH_MAP_SIZE 7 #define MAX_DEFAULT_CH_MAP_SIZE 8
static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZE] = { static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 }, { .cpu = 0, .codec = 0 },
{ .cpu = 1, .codec = 1 }, { .cpu = 1, .codec = 1 },
...@@ -1046,6 +1046,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZ ...@@ -1046,6 +1046,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 4, .codec = 4 }, { .cpu = 4, .codec = 4 },
{ .cpu = 5, .codec = 5 }, { .cpu = 5, .codec = 5 },
{ .cpu = 6, .codec = 6 }, { .cpu = 6, .codec = 6 },
{ .cpu = 7, .codec = 7 },
}; };
static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZE] = { static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 }, { .cpu = 0, .codec = 0 },
...@@ -1055,6 +1056,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZ ...@@ -1055,6 +1056,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 0, .codec = 4 }, { .cpu = 0, .codec = 4 },
{ .cpu = 0, .codec = 5 }, { .cpu = 0, .codec = 5 },
{ .cpu = 0, .codec = 6 }, { .cpu = 0, .codec = 6 },
{ .cpu = 0, .codec = 7 },
}; };
static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_SIZE] = { static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 }, { .cpu = 0, .codec = 0 },
...@@ -1064,6 +1066,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_S ...@@ -1064,6 +1066,7 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_S
{ .cpu = 4, .codec = 0 }, { .cpu = 4, .codec = 0 },
{ .cpu = 5, .codec = 0 }, { .cpu = 5, .codec = 0 },
{ .cpu = 6, .codec = 0 }, { .cpu = 6, .codec = 0 },
{ .cpu = 7, .codec = 0 },
}; };
static int snd_soc_compensate_channel_connection_map(struct snd_soc_card *card, static int snd_soc_compensate_channel_connection_map(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link) struct snd_soc_dai_link *dai_link)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment