alsa: restart the node on hw_param change

When we emit a new EnumFormat, the adapter will renegotiate a new format
that will be applied when we restart.

Fixes #3858
This commit is contained in:
Wim Taymans 2024-02-19 15:11:30 +01:00
parent 2c0bb6ffd2
commit b3e3d301c0

View file

@ -535,8 +535,10 @@ static int snd_pcm_pipewire_prepare(snd_pcm_ioplug_t *io)
params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, &pw->format);
if (pw->stream != NULL) {
pw_stream_set_active(pw->stream, false);
pw_stream_update_properties(pw->stream, &pw->props->dict);
pw_stream_update_params(pw->stream, params, 1);
pw_stream_set_active(pw->stream, true);
goto done;
}