From patchwork Fri Feb 17 07:17:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sutar.mounesh@gmail.com X-Patchwork-Id: 9578989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B0E6660586 for ; Fri, 17 Feb 2017 07:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5F53286A2 for ; Fri, 17 Feb 2017 07:18:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AE5F286A7; Fri, 17 Feb 2017 07:18:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8266286A3 for ; Fri, 17 Feb 2017 07:18:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 82C40267121; Fri, 17 Feb 2017 08:18:23 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9B64526717C; Fri, 17 Feb 2017 08:18:21 +0100 (CET) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by alsa0.perex.cz (Postfix) with ESMTP id 257D1267121; Fri, 17 Feb 2017 08:17:57 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id r18so992817wmd.3; Thu, 16 Feb 2017 23:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Dd6nPidG8sU+Sn320/+UfWhaerPC5BtXqvbZWNo+fpQ=; b=a98DkhGBPA3KUzasc78a6Q6ZSXf8KlRupw83WSGQ8LrlRuqqqBrMfpdcwq1Tg/4o7M nnIMO6cZXMIwaTzKbk/SKiYy70bKysGDiQBcwWoKjwt0Oo7wuUGfDqCkSGCx819RWEq/ F9Q9MTikG9/biO0Bjt4EmFodxsSPLOyX12AU4w5mPUeKaBRY5evRhaiWiV5v1T57Dgmu Yq1P4QPiW9Ia4DNQbNKS473r1J5pTYqHieGVbPkL7OuZy2KKYrMDYvAFCgRvkhIiJLI/ 5Z/ySOJb9dIjC7ty/z93S5jZlmKjE8mI4TiOp4LPgNwxNFoUnBB59LTl73vXL+QxKh8U HNRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Dd6nPidG8sU+Sn320/+UfWhaerPC5BtXqvbZWNo+fpQ=; b=pVYC+cUu9vH/dFZF76K1JBJwGOcbRevofQ8vCoshkaZicPzWZEEbKVtszXSf1/pCHq kKBCBg9bJr5ae+aJsDUdJS08t97CKyJmCoy9VpQfnyuFcIVekwoe3kfOqQ6Ty1RU/Wuc LQaI9YWAwlATPRUiLkczGb/C4umC/n+YbECHq0zytTFg3i+8Ky52P3L/SdLzDx6RlR80 DcHGcrIYtd38qNPA8vuRZFS+DCIBM9WRBvcxA02KysKtixmgAHEI0GIp4VOaPJK7TOtO 2MkNxjfGqtJdaTqy1GhhtvpanJQvMZWt0zrPCj37b2vYPuov2R/sSR3tgzTX1n3oAKCd Oglw== X-Gm-Message-State: AMke39mdaDrMtec5cWf2O6zvLbxKGSoX/0y5fpa0faL3JpxrTeL41SR1C0Tg6MJ7Q8sWiQ== X-Received: by 10.28.125.149 with SMTP id y143mr1597462wmc.16.1487315876677; Thu, 16 Feb 2017 23:17:56 -0800 (PST) Received: from msutar-VirtualBox.inp.mentorg.com ([139.181.35.34]) by smtp.gmail.com with ESMTPSA id q12sm569270wmd.8.2017.02.16.23.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Feb 2017 23:17:56 -0800 (PST) From: sutar.mounesh@gmail.com To: patch@alsa-project.org Date: Fri, 17 Feb 2017 12:47:49 +0530 Message-Id: <1487315869-9119-1-git-send-email-sutar.mounesh@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: Mounesh Sutar , alsa-devel@alsa-project.org, Awais Belal , mounesh_sutar@mentor.com Subject: [alsa-devel] [PATCH 5/6] pcm:extplug: refinement of masks in extplug X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Awais Belal 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 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);