From fbb957138135e09ed9fd0180dcad549aad815465 Mon Sep 17 00:00:00 2001 From: Awais Belal Date: Fri, 17 Feb 2017 12:47:49 +0530 Subject: [PATCH] pcm: extplug: refinement of masks in extplug 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 Signed-off-by: Mounesh Sutar Signed-off-by: Takashi Iwai --- src/pcm/pcm_extplug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pcm/pcm_extplug.c b/src/pcm/pcm_extplug.c index a04f826c..1004f542 100644 --- a/src/pcm/pcm_extplug.c +++ b/src/pcm/pcm_extplug.c @@ -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); -- 2.47.1