]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: extplug: refinement of masks in extplug
authorAwais Belal <awais_belal@mentor.com>
Fri, 17 Feb 2017 07:17:49 +0000 (12:47 +0530)
committerTakashi Iwai <tiwai@suse.de>
Fri, 17 Feb 2017 17:41:48 +0000 (18:41 +0100)
It should be possible to use empty mask format with extplug.
The refinement of mask via extplug is now modified,
to accept empty masks as well to work properly.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Mounesh Sutar <sutar.mounesh@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_extplug.c

index a04f826c90a010a75c66d007aa1a7d206c99db5a..1004f5427369a08c20b5518ab6b00056b897d590 100644 (file)
@@ -172,6 +172,8 @@ int snd_ext_parm_mask_refine(snd_mask_t *mask, struct snd_ext_parm *parm, int ty
        unsigned int i;
 
        parm += type;
+       if (!parm->active)
+               return 0;
        memset(&bits, 0, sizeof(bits));
        for (i = 0; i < parm->num_list; i++)
                bits.bits[parm->list[i] / 32] |= 1U << (parm->list[i] % 32);