Commit 9c1a3f43 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-fix-v6.6-rc4' of...

Merge tag 'asoc-fix-v6.6-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.6

There's quite a lot of changes here, but a lot of them are simple quirks
or device IDs rather than actual fixes.  The fixes that are here are all
quite device specific and relatively minor.
parents d93eeca6 7e1fe5d9
...@@ -26,6 +26,7 @@ properties: ...@@ -26,6 +26,7 @@ properties:
- const: rockchip,rk3568-spdif - const: rockchip,rk3568-spdif
- items: - items:
- enum: - enum:
- rockchip,rk3128-spdif
- rockchip,rk3188-spdif - rockchip,rk3188-spdif
- rockchip,rk3288-spdif - rockchip,rk3288-spdif
- rockchip,rk3308-spdif - rockchip,rk3308-spdif
......
...@@ -52,8 +52,8 @@ struct codec_priv { ...@@ -52,8 +52,8 @@ struct codec_priv {
unsigned long mclk_freq; unsigned long mclk_freq;
unsigned long free_freq; unsigned long free_freq;
u32 mclk_id; u32 mclk_id;
u32 fll_id; int fll_id;
u32 pll_id; int pll_id;
}; };
/** /**
...@@ -206,7 +206,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, ...@@ -206,7 +206,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
} }
/* Specific configuration for PLL */ /* Specific configuration for PLL */
if (codec_priv->pll_id && codec_priv->fll_id) { if (codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
if (priv->sample_format == SNDRV_PCM_FORMAT_S24_LE) if (priv->sample_format == SNDRV_PCM_FORMAT_S24_LE)
pll_out = priv->sample_rate * 384; pll_out = priv->sample_rate * 384;
else else
...@@ -248,7 +248,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream) ...@@ -248,7 +248,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream)
priv->streams &= ~BIT(substream->stream); priv->streams &= ~BIT(substream->stream);
if (!priv->streams && codec_priv->pll_id && codec_priv->fll_id) { if (!priv->streams && codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
/* Force freq to be free_freq to avoid error message in codec */ /* Force freq to be free_freq to avoid error message in codec */
ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0),
codec_priv->mclk_id, codec_priv->mclk_id,
...@@ -621,6 +621,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) ...@@ -621,6 +621,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
priv->card.dapm_routes = audio_map; priv->card.dapm_routes = audio_map;
priv->card.num_dapm_routes = ARRAY_SIZE(audio_map); priv->card.num_dapm_routes = ARRAY_SIZE(audio_map);
priv->card.driver_name = DRIVER_NAME; priv->card.driver_name = DRIVER_NAME;
priv->codec_priv.fll_id = -1;
priv->codec_priv.pll_id = -1;
/* Diversify the card configurations */ /* Diversify the card configurations */
if (of_device_is_compatible(np, "fsl,imx-audio-cs42888")) { if (of_device_is_compatible(np, "fsl,imx-audio-cs42888")) {
codec_dai_name = "cs42888"; codec_dai_name = "cs42888";
......
...@@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir) ...@@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir)
{ {
unsigned int ofs = sai->soc_data->reg_offset; unsigned int ofs = sai->soc_data->reg_offset;
bool tx = dir == TX; bool tx = dir == TX;
u32 xcsr, count = 100; u32 xcsr, count = 100, mask;
if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
mask = FSL_SAI_CSR_TERE;
else
mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE;
regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs), regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs),
FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0); mask, 0);
/* TERE will remain set till the end of current frame */ /* TERE will remain set till the end of current frame */
do { do {
......
...@@ -310,7 +310,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream) ...@@ -310,7 +310,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
if (fixed_sysclk % props->mclk_fs) { if (fixed_sysclk % props->mclk_fs) {
dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n", dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n",
fixed_sysclk, props->mclk_fs); fixed_sysclk, props->mclk_fs);
return -EINVAL; ret = -EINVAL;
goto codec_err;
} }
ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE, ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
fixed_rate, fixed_rate); fixed_rate, fixed_rate);
......
...@@ -759,10 +759,12 @@ static int asoc_simple_probe(struct platform_device *pdev) ...@@ -759,10 +759,12 @@ static int asoc_simple_probe(struct platform_device *pdev)
struct snd_soc_dai_link *dai_link = priv->dai_link; struct snd_soc_dai_link *dai_link = priv->dai_link;
struct simple_dai_props *dai_props = priv->dai_props; struct simple_dai_props *dai_props = priv->dai_props;
ret = -EINVAL;
cinfo = dev->platform_data; cinfo = dev->platform_data;
if (!cinfo) { if (!cinfo) {
dev_err(dev, "no info for asoc-simple-card\n"); dev_err(dev, "no info for asoc-simple-card\n");
return -EINVAL; goto err;
} }
if (!cinfo->name || if (!cinfo->name ||
...@@ -771,7 +773,7 @@ static int asoc_simple_probe(struct platform_device *pdev) ...@@ -771,7 +773,7 @@ static int asoc_simple_probe(struct platform_device *pdev)
!cinfo->platform || !cinfo->platform ||
!cinfo->cpu_dai.name) { !cinfo->cpu_dai.name) {
dev_err(dev, "insufficient asoc_simple_card_info settings\n"); dev_err(dev, "insufficient asoc_simple_card_info settings\n");
return -EINVAL; goto err;
} }
cpus = dai_link->cpus; cpus = dai_link->cpus;
......
...@@ -808,6 +808,16 @@ static const struct platform_device_id board_ids[] = { ...@@ -808,6 +808,16 @@ static const struct platform_device_id board_ids[] = {
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK | SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
SOF_ES8336_JD_INVERTED), SOF_ES8336_JD_INVERTED),
}, },
{
.name = "mtl_es83x6_c1_h02",
.driver_data = (kernel_ulong_t)(SOF_ES8336_SSP_CODEC(1) |
SOF_NO_OF_HDMI_CAPTURE_SSP(2) |
SOF_HDMI_CAPTURE_1_SSP(0) |
SOF_HDMI_CAPTURE_2_SSP(2) |
SOF_SSP_HDMI_CAPTURE_PRESENT |
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
SOF_ES8336_JD_INVERTED),
},
{ } { }
}; };
MODULE_DEVICE_TABLE(platform, board_ids); MODULE_DEVICE_TABLE(platform, board_ids);
......
...@@ -376,6 +376,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { ...@@ -376,6 +376,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
/* No Jack */ /* No Jack */
.driver_data = (void *)SOF_SDW_TGL_HDMI, .driver_data = (void *)SOF_SDW_TGL_HDMI,
}, },
{
.callback = sof_sdw_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B14"),
},
/* No Jack */
.driver_data = (void *)SOF_SDW_TGL_HDMI,
},
{ {
.callback = sof_sdw_quirk_cb, .callback = sof_sdw_quirk_cb,
.matches = { .matches = {
......
...@@ -655,18 +655,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { ...@@ -655,18 +655,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
.drv_name = "sof_sdw", .drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg", .sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
}, },
{
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
.links = adl_sdw_rt1316_link1_rt714_link0,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
},
{ {
.link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */ .link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
.links = adl_sdw_rt1316_link12_rt714_link0, .links = adl_sdw_rt1316_link12_rt714_link0,
.drv_name = "sof_sdw", .drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg", .sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
}, },
{
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
.links = adl_sdw_rt1316_link1_rt714_link0,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
},
{ {
.link_mask = 0x5, /* 2 active links required */ .link_mask = 0x5, /* 2 active links required */
.links = adl_sdw_rt1316_link2_rt714_link0, .links = adl_sdw_rt1316_link2_rt714_link0,
......
...@@ -30,6 +30,16 @@ static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = { ...@@ -30,6 +30,16 @@ static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
.codecs = {"10EC5682", "RTL5682"}, .codecs = {"10EC5682", "RTL5682"},
}; };
static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
.num_codecs = 3,
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
};
static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
.num_codecs = 1,
.codecs = {"INTC10B0"}
};
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
{ {
.comp_ids = &mtl_rt5682_rt5682s_hp, .comp_ids = &mtl_rt5682_rt5682s_hp,
...@@ -52,6 +62,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { ...@@ -52,6 +62,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
.quirk_data = &mtl_rt1019p_amp, .quirk_data = &mtl_rt1019p_amp,
.sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg", .sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg",
}, },
{
.comp_ids = &mtl_essx_83x6,
.drv_name = "mtl_es83x6_c1_h02",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &mtl_lt6911_hdmi,
.sof_tplg_filename = "sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg",
},
{
.comp_ids = &mtl_essx_83x6,
.drv_name = "sof-essx8336",
.sof_tplg_filename = "sof-mtl-es8336", /* the tplg suffix is added at run time */
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
},
{}, {},
}; };
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines); EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);
......
...@@ -44,8 +44,8 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm, ...@@ -44,8 +44,8 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm,
* platforms which make use of the snd_dmaengine_dai_dma_data struct for their * platforms which make use of the snd_dmaengine_dai_dma_data struct for their
* DAI DMA data. Internally the function will first call * DAI DMA data. Internally the function will first call
* snd_hwparams_to_dma_slave_config to fill in the slave config based on the * snd_hwparams_to_dma_slave_config to fill in the slave config based on the
* hw_params, followed by snd_dmaengine_set_config_from_dai_data to fill in the * hw_params, followed by snd_dmaengine_pcm_set_config_from_dai_data to fill in
* remaining fields based on the DAI DMA data. * the remaining fields based on the DAI DMA data.
*/ */
int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config)
......
...@@ -35,7 +35,6 @@ static const struct sof_amd_acp_desc rembrandt_chip_info = { ...@@ -35,7 +35,6 @@ static const struct sof_amd_acp_desc rembrandt_chip_info = {
.dsp_intr_base = ACP6X_DSP_SW_INTR_BASE, .dsp_intr_base = ACP6X_DSP_SW_INTR_BASE,
.sram_pte_offset = ACP6X_SRAM_PTE_OFFSET, .sram_pte_offset = ACP6X_SRAM_PTE_OFFSET,
.hw_semaphore_offset = ACP6X_AXI2DAGB_SEM_0, .hw_semaphore_offset = ACP6X_AXI2DAGB_SEM_0,
.acp_clkmux_sel = ACP6X_CLKMUX_SEL,
.fusion_dsp_offset = ACP6X_DSP_FUSION_RUNSTALL, .fusion_dsp_offset = ACP6X_DSP_FUSION_RUNSTALL,
.probe_reg_offset = ACP6X_FUTURE_REG_ACLK_0, .probe_reg_offset = ACP6X_FUTURE_REG_ACLK_0,
}; };
......
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