From: Takashi Iwai <tiwai@suse.de>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH 1/3] ALSA: Fix handling of multiple msbits constraints on the same runtime
Date: Tue, 30 Dec 2014 16:48:22 +0100 [thread overview]
Message-ID: <s5hwq59gmux.wl-tiwai@suse.de> (raw)
In-Reply-To: <1419875018-30812-1-git-send-email-lars@metafoo.de>
At Mon, 29 Dec 2014 18:43:36 +0100,
Lars-Peter Clausen wrote:
>
> If the sound card is made up of discrete components, each with their own
> driver (e.g. like in the ASoC case), we might end up with multiple msbits
> constraint rules installed. Currently this will result in msbits being set
> to whatever the last rule set it to.
>
> This patch updates the behavior of the rule to choose the minimum (other
> than zero) of all the installed rules.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks, applied all three patches now. They were applied to
topic/msbits branch so that Mark can merge these more easily.
Takashi
> ---
> sound/core/pcm_lib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
> index ec9e786..b0c1535 100644
> --- a/sound/core/pcm_lib.c
> +++ b/sound/core/pcm_lib.c
> @@ -1300,7 +1300,7 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,
> unsigned int msbits = l >> 16;
> struct snd_interval *i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);
> if (snd_interval_single(i) && snd_interval_value(i) == width)
> - params->msbits = msbits;
> + params->msbits = min_not_zero(params->msbits, msbits);
> return 0;
> }
>
> --
> 1.8.0
>
prev parent reply other threads:[~2014-12-30 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 17:43 [PATCH 1/3] ALSA: Fix handling of multiple msbits constraints on the same runtime Lars-Peter Clausen
2014-12-29 17:43 ` [PATCH 2/3] ALSA: Add support for wildcard msbits constraints Lars-Peter Clausen
2014-12-29 17:43 ` [PATCH 3/3] ASoC: pcm: Use " Lars-Peter Clausen
2014-12-29 18:25 ` Mark Brown
2014-12-31 16:16 ` Takashi Iwai
2014-12-31 16:24 ` Lars-Peter Clausen
2014-12-30 15:48 ` Takashi Iwai [this message]
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=s5hwq59gmux.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
/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