alsa: fix the plug: PCM device name creation

The plug: ALSA PCM device name can pass any device name
even with argument, but the syntax is:

plug:SLAVE='<pcm_device_name>'

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/75#issuecomment-768555182
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/492>
This commit is contained in:
Jaroslav Kysela 2021-01-28 08:48:03 +01:00
parent c6309a9c18
commit 597a1eb1ba

View file

@ -731,7 +731,7 @@ snd_pcm_t *pa_alsa_open_by_device_string(
if (!pa_startswith(d, "plug:") && !pa_startswith(d, "plughw:")) { if (!pa_startswith(d, "plug:") && !pa_startswith(d, "plughw:")) {
char *t; char *t;
t = pa_sprintf_malloc("plug:%s", d); t = pa_sprintf_malloc("plug:SLAVE='%s'", d);
pa_xfree(d); pa_xfree(d);
d = t; d = t;