softvol - add missing name

softvol can be also a pass-thru when the given control already exists
as a hardware control, and the name isn't set properly because of
slave creation.  This patch fixes it.
This commit is contained in:
Takashi Iwai 2007-11-28 14:24:26 +01:00
parent 72ede8a12d
commit 2ae2bbf190

View file

@ -782,6 +782,8 @@ int snd_pcm_softvol_open(snd_pcm_t **pcmp, const char *name,
if (err > 0) { /* hardware control - no need for softvol! */ if (err > 0) { /* hardware control - no need for softvol! */
softvol_free(svol); softvol_free(svol);
*pcmp = slave; /* just pass the slave */ *pcmp = slave; /* just pass the slave */
if (!slave->name)
slave->name = strdup(name);
return 0; return 0;
} }