]> git.alsa-project.org Git - alsa-lib.git/commitdiff
softvol - add missing name
authorTakashi Iwai <tiwai@suse.de>
Wed, 28 Nov 2007 13:24:26 +0000 (14:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Nov 2007 13:24:26 +0000 (14:24 +0100)
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.

src/pcm/pcm_softvol.c

index df6404afa2b27a6b4fd4f6e16f310894dc0eb257..97894bb4338f74454903acfe93ffc577650daea8 100644 (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! */
                softvol_free(svol);
                *pcmp = slave; /* just pass the slave */
+               if (!slave->name)
+                       slave->name = strdup(name);
                return 0;
        }