[PATCH 5/6] pcm:extplug: refinement of masks in extplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Awais Belal <awais_belal@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Mounesh Sutar <sutar.mounesh@xxxxxxxxx>

diff --git a/src/pcm/pcm_extplug.c b/src/pcm/pcm_extplug.c
index a04f826..1004f54 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.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux