ASoc / PCM recording-related regression between v5.4 and v5.5

Hin-Tak Leung htl10 at users.sourceforge.net
Tue Apr 20 18:04:02 CEST 2021


 Hi,

I agree with Peter's change. Raspbian - the raspberry pi distribution - is currently shipping v5.10.x (jumping from v5.4.x in February), which has changed a lot since v5.5.x. Nonetheless, as a proof of concept, I reverted the idea of Peter's change in v.5.10.x, with this:

<diff-start>
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 91bf33958..20077dd8c 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1042,7 +1042,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 case SNDRV_PCM_TRIGGER_START:
 case SNDRV_PCM_TRIGGER_RESUME:
 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- ret = snd_soc_link_trigger(substream, cmd);
+ ret = snd_soc_pcm_dai_trigger(substream, cmd);
 if (ret < 0)
 break;
 
@@ -1050,8 +1050,9 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 if (ret < 0)
 break;
 
- ret = snd_soc_pcm_dai_trigger(substream, cmd);
+ ret = snd_soc_link_trigger(substream, cmd);
 break;
+
 case SNDRV_PCM_TRIGGER_STOP:
 case SNDRV_PCM_TRIGGER_SUSPEND:
 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
<diff-end>

and was able to restore the functionality of Seeed Studio's respeaker driver against v5.10.x. That it relies on the previous behavior is a bit broken. I think I'd like some dev_dbg() inside soc-pcm.c, and perhaps some help in modifying the out-of-tree audio device driver to cope?

Thanks a lot.

Regards,
Hin-Tak 

On Tuesday, 20 April 2021, 15:19:58 BST, Hin-Tak Leung <htl10 at users.sourceforge.net> wrote:

> Hi Peter:

> I found the commit 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 with debugging in > sound/ +p and the driver side. 5.4 records fine, 5.5 stucks on recording. The commit is one of yours:

> commit 4378f1fbe924054a09ff0d4e39e1a581b9245252
> Author: Peter Ujfalusi <peter.ujfalusi at ti.com>
> Date: Fri Sep 27 10:16:46 2019 +0300

> ASoC: soc-pcm: Use different sequence for start/stop trigger

...

> The problem was initially at https://github.com/respeaker/seeed-voicecard/issues/290 
> then over to https://github.com/raspberrypi/linux/issues/4279 and finally here. 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" .

...
> The Raspberry Pi distribution raspbian jumped directly from 5.4.x to 5.10.x at the beginning of February. Considering 
> the change has been in since the v5.5 merge window, I guess I'd like some help to correct / workaround on the 
> out-of-tree driver side? And probably some new dev_err() message in the kernel for problematic driver helping to 
> diagnose similar problems in the future would be nice. 

  


More information about the Alsa-devel mailing list