ASoc / PCM recording-related regression between v5.4 and v5.5
Hin-Tak Leung
htl10 at users.sourceforge.net
Sat Apr 17 12:16:47 CEST 2021
Hi,
I am trying to find the cause of a rather unusual regression between kernel v5.4 and v5.5, for an out-of-tree driver on the raspberrypi. Everything looks identical between v5.4 and 5.5, within accountable differences, even when I enable dynamic debugging and
echo "file sound/* +p" > /sys/kernel/debug/dynamic_debug/control
for the whole of sound sub-system. It records fines against v5.4, but blocks on v5.5, and on ctrl-c, does
^CAborted by signal Interrupt...
arecord: pcm_read:2145: read error: Interrupted system call
I have gradually replaced the include/sound and sound/ directories between the two (the pi v5.4 and v5.5 kernels are separate branches off linux-stable, so one cannot do ordinary bisects), and narrowed it down to the following 13 commits from 5 people:
4104faaeeda0e23a169c50e43f309ff7435087b1 ASoC: soc-core: disable route checks for legacy devices
4bf2e385aa59c2fae5f880aa25cfd2b470109093 ASoC: core: Init pcm runtime work early to avoid warnings
fb5126778333d289b2623a7e6260beeb1ac1b819 ASoC: core: add SND_SOC_BYTES_E
dc73d73aa7145f55412611f3eead1e85ae026785 ASoC: add control components management
509ba54fcfd1e45bceebe8ccea59dc496312f1a0 ASoC: soc.h: dobj is used only when SND_SOC_TOPOLOGY
e443c20593de9f8efd9b2935ed40eb0bbacce30b ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()
5d07519703bc2f0bf19d33652401552a480d68b8 ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai()
e11381f38f34789b374880c4a149e25e8d7f0cfd ASoC: soc-core: add snd_soc_unregister_dai()
4baabbf932ed4f97df8e18cf546d39b7c2138020 ASoC: soc-dpcm: tidyup for_each_dpcm_xx() macro
2b544dd7b43b19fb55ea4fbb3e30b60eb20b7828 ASoC: soc-core: add for_each_rtd_components() and replace
33536a14879515949b065721cdb7fedb276d8e8a ASoC: soc-core: remove for_each_rtdcom_safe()
8ec241c495dde3d19a0459304298c2468c60182b ASoC: soc-core: add snd_soc_pcm_lib_ioctl()
b7c5bc45ee94a03a0dc45a862180e17db8ea8e9d ASoC: soc-core: merge soc_free_pcm_runtime() and soc_rtd_free()
I think it is overlay / devicetree related, since another audio device of the same family and similar hardware but different overlay works fine. As I already did 'echo "file sound/* +p" > /sys/kernel/debug/dynamic_debug/control' , I likely need some additional debug statement or enable debugging at another part to go further, despite it being a regression in 'include/sound/soc*.h' and 'sound/soc/soc-*'. Building the pi kernel cleanly - from 'make mrproper', copy .config then 'make oldconnfig' - takes about an hour, so switching between the two and compare takes about 3 hours, and quite slow.
I can possibly narrow the changes further from the 13 commits (9 of them from Kuninori Morimoto), but I think some more dev_dbg() is needed as the current ones in "sound/*" don't help; and it is worth bring it to alsa-devel since it is so unusual - all the dev_dbg() in kernel/sound/ and the driver side emits to the same messages, v5.4 can records while v5.5 blocks on stuck system call.
More details at
https://github.com/raspberrypi/linux/issues/4279
and it was initially at https://github.com/respeaker/seeed-voicecard/issues/290 . The "seeed-8mic-voicecard-overlay.dts" is the dts corresponds to the problematic device ; The one with similar hardware but okay is "seeed-4mic-voicecard-overlay.dts" .
I am subscribed to alsa-devel actually, but receive it in digest form, and haven't opened the digests for a while...
Thanks a lot.
Hin-Tak
More information about the Alsa-devel
mailing list