Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 005aa9f

Browse files
jbrun3tgregkh
authored andcommitted
ASoC: meson: axg-card: fix codec-to-codec link setup
commit 1164284270779e1865cc2046a2a01b58a1e858a9 upstream. Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported"), meson-axg cards which have codec-to-codec links fail to init and Oops: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000128 Internal error: Oops: 96000044 [#1] PREEMPT SMP CPU: 3 PID: 1582 Comm: arecord Not tainted 5.7.0-rc1 pc : invalidate_paths_ep+0x30/0xe0 lr : snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8 Call trace: invalidate_paths_ep+0x30/0xe0 snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8 dpcm_path_get+0x38/0xd0 dpcm_fe_dai_open+0x70/0x920 snd_pcm_open_substream+0x564/0x840 snd_pcm_open+0xfc/0x228 snd_pcm_capture_open+0x4c/0x78 snd_open+0xac/0x1a8 ... While initiliazing the links, ASoC treats the codec-to-codec links of this card type as a DPCM backend. This error eventually leads to the Oops. Most of the card driver code is shared between DPCM backends and codec-to-codec links. The property "no_pcm" marking DCPM BE was left set on codec-to-codec links, leading to this problem. This commit fixes that. Fixes: 0a8f111 ("ASoC: meson: axg-card: add basic codec-to-codec link support") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200420114511.450560-2-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 08865eb commit 005aa9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sound/soc/meson/axg-card.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,10 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
586586

587587
if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node))
588588
ret = axg_card_parse_tdm(card, np, index);
589-
else if (axg_card_cpu_is_codec(dai_link->cpus->of_node))
589+
else if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) {
590590
dai_link->params = &codec_params;
591+
dai_link->no_pcm = 0; /* link is not a DPCM BE */
592+
}
591593

592594
return ret;
593595
}

0 commit comments

Comments
 (0)