Skip to content

Commit 9c1a3f4

Browse files
committed
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.
2 parents d93eeca + 7e1fe5d commit 9c1a3f4

File tree

11 files changed

+75
-18
lines changed

11 files changed

+75
-18
lines changed

Documentation/devicetree/bindings/sound/rockchip-spdif.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- const: rockchip,rk3568-spdif
2727
- items:
2828
- enum:
29+
- rockchip,rk3128-spdif
2930
- rockchip,rk3188-spdif
3031
- rockchip,rk3288-spdif
3132
- rockchip,rk3308-spdif

sound/soc/fsl/fsl-asoc-card.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ struct codec_priv {
5252
unsigned long mclk_freq;
5353
unsigned long free_freq;
5454
u32 mclk_id;
55-
u32 fll_id;
56-
u32 pll_id;
55+
int fll_id;
56+
int pll_id;
5757
};
5858

5959
/**
@@ -206,7 +206,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
206206
}
207207

208208
/* Specific configuration for PLL */
209-
if (codec_priv->pll_id && codec_priv->fll_id) {
209+
if (codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
210210
if (priv->sample_format == SNDRV_PCM_FORMAT_S24_LE)
211211
pll_out = priv->sample_rate * 384;
212212
else
@@ -248,7 +248,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream)
248248

249249
priv->streams &= ~BIT(substream->stream);
250250

251-
if (!priv->streams && codec_priv->pll_id && codec_priv->fll_id) {
251+
if (!priv->streams && codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) {
252252
/* Force freq to be free_freq to avoid error message in codec */
253253
ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0),
254254
codec_priv->mclk_id,
@@ -621,6 +621,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
621621
priv->card.dapm_routes = audio_map;
622622
priv->card.num_dapm_routes = ARRAY_SIZE(audio_map);
623623
priv->card.driver_name = DRIVER_NAME;
624+
625+
priv->codec_priv.fll_id = -1;
626+
priv->codec_priv.pll_id = -1;
627+
624628
/* Diversify the card configurations */
625629
if (of_device_is_compatible(np, "fsl,imx-audio-cs42888")) {
626630
codec_dai_name = "cs42888";

sound/soc/fsl/fsl_sai.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir)
710710
{
711711
unsigned int ofs = sai->soc_data->reg_offset;
712712
bool tx = dir == TX;
713-
u32 xcsr, count = 100;
713+
u32 xcsr, count = 100, mask;
714+
715+
if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
716+
mask = FSL_SAI_CSR_TERE;
717+
else
718+
mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE;
714719

715720
regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs),
716-
FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0);
721+
mask, 0);
717722

718723
/* TERE will remain set till the end of current frame */
719724
do {

sound/soc/generic/simple-card-utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
310310
if (fixed_sysclk % props->mclk_fs) {
311311
dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n",
312312
fixed_sysclk, props->mclk_fs);
313-
return -EINVAL;
313+
ret = -EINVAL;
314+
goto codec_err;
314315
}
315316
ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
316317
fixed_rate, fixed_rate);

sound/soc/generic/simple-card.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,10 +759,12 @@ static int asoc_simple_probe(struct platform_device *pdev)
759759
struct snd_soc_dai_link *dai_link = priv->dai_link;
760760
struct simple_dai_props *dai_props = priv->dai_props;
761761

762+
ret = -EINVAL;
763+
762764
cinfo = dev->platform_data;
763765
if (!cinfo) {
764766
dev_err(dev, "no info for asoc-simple-card\n");
765-
return -EINVAL;
767+
goto err;
766768
}
767769

768770
if (!cinfo->name ||
@@ -771,7 +773,7 @@ static int asoc_simple_probe(struct platform_device *pdev)
771773
!cinfo->platform ||
772774
!cinfo->cpu_dai.name) {
773775
dev_err(dev, "insufficient asoc_simple_card_info settings\n");
774-
return -EINVAL;
776+
goto err;
775777
}
776778

777779
cpus = dai_link->cpus;

sound/soc/intel/boards/sof_es8336.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,16 @@ static const struct platform_device_id board_ids[] = {
808808
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
809809
SOF_ES8336_JD_INVERTED),
810810
},
811+
{
812+
.name = "mtl_es83x6_c1_h02",
813+
.driver_data = (kernel_ulong_t)(SOF_ES8336_SSP_CODEC(1) |
814+
SOF_NO_OF_HDMI_CAPTURE_SSP(2) |
815+
SOF_HDMI_CAPTURE_1_SSP(0) |
816+
SOF_HDMI_CAPTURE_2_SSP(2) |
817+
SOF_SSP_HDMI_CAPTURE_PRESENT |
818+
SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
819+
SOF_ES8336_JD_INVERTED),
820+
},
811821
{ }
812822
};
813823
MODULE_DEVICE_TABLE(platform, board_ids);

sound/soc/intel/boards/sof_sdw.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
376376
/* No Jack */
377377
.driver_data = (void *)SOF_SDW_TGL_HDMI,
378378
},
379+
{
380+
.callback = sof_sdw_quirk_cb,
381+
.matches = {
382+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
383+
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B14"),
384+
},
385+
/* No Jack */
386+
.driver_data = (void *)SOF_SDW_TGL_HDMI,
387+
},
388+
379389
{
380390
.callback = sof_sdw_quirk_cb,
381391
.matches = {

sound/soc/intel/common/soc-acpi-intel-adl-match.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,18 +655,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = {
655655
.drv_name = "sof_sdw",
656656
.sof_tplg_filename = "sof-adl-rt1316-l2-mono-rt714-l3.tplg",
657657
},
658-
{
659-
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
660-
.links = adl_sdw_rt1316_link1_rt714_link0,
661-
.drv_name = "sof_sdw",
662-
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
663-
},
664658
{
665659
.link_mask = 0x7, /* rt714 on link0 & two rt1316s on link1 and link2 */
666660
.links = adl_sdw_rt1316_link12_rt714_link0,
667661
.drv_name = "sof_sdw",
668662
.sof_tplg_filename = "sof-adl-rt1316-l12-rt714-l0.tplg",
669663
},
664+
{
665+
.link_mask = 0x3, /* rt1316 on link1 & rt714 on link0 */
666+
.links = adl_sdw_rt1316_link1_rt714_link0,
667+
.drv_name = "sof_sdw",
668+
.sof_tplg_filename = "sof-adl-rt1316-l1-mono-rt714-l0.tplg",
669+
},
670670
{
671671
.link_mask = 0x5, /* 2 active links required */
672672
.links = adl_sdw_rt1316_link2_rt714_link0,

sound/soc/intel/common/soc-acpi-intel-mtl-match.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ static const struct snd_soc_acpi_codecs mtl_rt5682_rt5682s_hp = {
3030
.codecs = {"10EC5682", "RTL5682"},
3131
};
3232

33+
static const struct snd_soc_acpi_codecs mtl_essx_83x6 = {
34+
.num_codecs = 3,
35+
.codecs = { "ESSX8316", "ESSX8326", "ESSX8336"},
36+
};
37+
38+
static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
39+
.num_codecs = 1,
40+
.codecs = {"INTC10B0"}
41+
};
42+
3343
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
3444
{
3545
.comp_ids = &mtl_rt5682_rt5682s_hp,
@@ -52,6 +62,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
5262
.quirk_data = &mtl_rt1019p_amp,
5363
.sof_tplg_filename = "sof-mtl-rt1019-rt5682.tplg",
5464
},
65+
{
66+
.comp_ids = &mtl_essx_83x6,
67+
.drv_name = "mtl_es83x6_c1_h02",
68+
.machine_quirk = snd_soc_acpi_codec_list,
69+
.quirk_data = &mtl_lt6911_hdmi,
70+
.sof_tplg_filename = "sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg",
71+
},
72+
{
73+
.comp_ids = &mtl_essx_83x6,
74+
.drv_name = "sof-essx8336",
75+
.sof_tplg_filename = "sof-mtl-es8336", /* the tplg suffix is added at run time */
76+
.tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER |
77+
SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
78+
SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
79+
},
5580
{},
5681
};
5782
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_mtl_machines);

sound/soc/soc-generic-dmaengine-pcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm,
4444
* platforms which make use of the snd_dmaengine_dai_dma_data struct for their
4545
* DAI DMA data. Internally the function will first call
4646
* snd_hwparams_to_dma_slave_config to fill in the slave config based on the
47-
* hw_params, followed by snd_dmaengine_set_config_from_dai_data to fill in the
48-
* remaining fields based on the DAI DMA data.
47+
* hw_params, followed by snd_dmaengine_pcm_set_config_from_dai_data to fill in
48+
* the remaining fields based on the DAI DMA data.
4949
*/
5050
int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
5151
struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config)

0 commit comments

Comments
 (0)