alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: sutar.mounesh@gmail.com
To: patch@alsa-project.org
Cc: Mounesh Sutar <sutar.mounesh@gmail.com>,
	alsa-devel@alsa-project.org, Awais Belal <awais_belal@mentor.com>,
	mounesh_sutar@mentor.com
Subject: [PATCH 5/6] pcm:extplug: refinement of masks in extplug
Date: Fri, 17 Feb 2017 12:47:49 +0530	[thread overview]
Message-ID: <1487315869-9119-1-git-send-email-sutar.mounesh@gmail.com> (raw)

From: Awais Belal <awais_belal@mentor.com>

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>

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

             reply	other threads:[~2017-02-17  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  7:17 sutar.mounesh [this message]
2017-02-17 17:46 ` [PATCH 5/6] pcm:extplug: refinement of masks in extplug Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487315869-9119-1-git-send-email-sutar.mounesh@gmail.com \
    --to=sutar.mounesh@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=awais_belal@mentor.com \
    --cc=mounesh_sutar@mentor.com \
    --cc=patch@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).