Skip to content

Commit 2855e16

Browse files
committed
ASoC: Intel: set dpcm_capture for amps
Merge series from Kai Vehmanen <[email protected]>: This series addresses problems with echo reference devices reported in: "[BUG][ADL-N] Kernel panic when echo reference stream is opened" thesofproject#4083
2 parents 54650eb + b3c0031 commit 2855e16

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

sound/soc/intel/boards/sof_cs42l42.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ static int create_spk_amp_dai_links(struct device *dev,
336336
links[*id].platforms = platform_component;
337337
links[*id].num_platforms = ARRAY_SIZE(platform_component);
338338
links[*id].dpcm_playback = 1;
339+
/* firmware-generated echo reference */
340+
links[*id].dpcm_capture = 1;
341+
339342
links[*id].no_pcm = 1;
340343
links[*id].cpus = &cpus[*id];
341344
links[*id].num_cpus = 1;

sound/soc/intel/boards/sof_nau8825.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
487487
links[id].num_codecs = ARRAY_SIZE(max_98373_components);
488488
links[id].init = max_98373_spk_codec_init;
489489
links[id].ops = &max_98373_ops;
490-
/* feedback stream */
491-
links[id].dpcm_capture = 1;
492490
} else if (sof_nau8825_quirk &
493491
SOF_MAX98360A_SPEAKER_AMP_PRESENT) {
494492
max_98360a_dai_link(&links[id]);
@@ -506,6 +504,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
506504
links[id].platforms = platform_component;
507505
links[id].num_platforms = ARRAY_SIZE(platform_component);
508506
links[id].dpcm_playback = 1;
507+
/* feedback stream or firmware-generated echo reference */
508+
links[id].dpcm_capture = 1;
509+
509510
links[id].no_pcm = 1;
510511
links[id].cpus = &cpus[id];
511512
links[id].num_cpus = 1;

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
761761
links[id].num_codecs = ARRAY_SIZE(max_98373_components);
762762
links[id].init = max_98373_spk_codec_init;
763763
links[id].ops = &max_98373_ops;
764-
/* feedback stream */
765-
links[id].dpcm_capture = 1;
766764
} else if (sof_rt5682_quirk &
767765
SOF_MAX98360A_SPEAKER_AMP_PRESENT) {
768766
max_98360a_dai_link(&links[id]);
@@ -789,6 +787,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
789787
links[id].platforms = platform_component;
790788
links[id].num_platforms = ARRAY_SIZE(platform_component);
791789
links[id].dpcm_playback = 1;
790+
/* feedback stream or firmware-generated echo reference */
791+
links[id].dpcm_capture = 1;
792+
792793
links[id].no_pcm = 1;
793794
links[id].cpus = &cpus[id];
794795
links[id].num_cpus = 1;

sound/soc/intel/boards/sof_ssp_amp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,12 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
258258
sof_rt1308_dai_link(&links[id]);
259259
} else if (sof_ssp_amp_quirk & SOF_CS35L41_SPEAKER_AMP_PRESENT) {
260260
cs35l41_set_dai_link(&links[id]);
261-
262-
/* feedback from amplifier */
263-
links[id].dpcm_capture = 1;
264261
}
265262
links[id].platforms = platform_component;
266263
links[id].num_platforms = ARRAY_SIZE(platform_component);
267264
links[id].dpcm_playback = 1;
265+
/* feedback from amplifier or firmware-generated echo reference */
266+
links[id].dpcm_capture = 1;
268267
links[id].no_pcm = 1;
269268
links[id].cpus = &cpus[id];
270269
links[id].num_cpus = 1;

0 commit comments

Comments
 (0)