On 8/5/23 12:14, Hans de Goede wrote: > If SNDRV_PCM_IOCTL_PREPARE is called when the mixer settings linking > frontend and backend have not been setup yet this results in > e.g. the following errors getting logged: > > [ 43.244549] Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port > [ 43.244744] Baytrail Audio Port: ASoC: error at dpcm_fe_dai_prepare on Baytrail Audio Port: -22 > > pipewire triggers this leading to 96 lines getting logged > after the user has logged into a GNOME session. > > Change the actual "no backend DAIs enabled for ... Port" error to > dev_err_once() to avoid it getting repeated 48 times. While at it > also improve the error by hinting the user how to fix this. > > To not make developing new UCM profiles harder, also log the error > at dev_dbg() level all the time (vs once). So that e.g. dyndbg can > be used to (re)enable the messages. > > Also changes _soc_pcm_ret() to not log for -EINVAL errors, to fix > the other error getting logged 48 times. Userspace passing wrong > parameters should not lead to dmesg messages. > > Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3407 > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>