From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH v5] ASoC: Apply msbits constraint for sample size bigger than the msbits
Date: Thu, 19 Jan 2012 13:40:35 +0100 [thread overview]
Message-ID: <4F180F43.40706@ti.com> (raw)
In-Reply-To: <20120119104800.GC3178@opensource.wolfsonmicro.com>
On 01/19/2012 11:48 AM, Mark Brown wrote:
> On Thu, Jan 19, 2012 at 09:27:33AM +0100, Peter Ujfalusi wrote:
>
>> Are you going to take the for version of patch, or should I resend it?
>> I can add a comment to explain that we bail out, and not checking the
>> sample sizes lower than the requested msbits, if it helps.
>
> I'd just replace it with a continue on sizes we don't want, much
> simpler.
If I can do this (bits == 24):
i = 0
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
apply constraint
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
go out
--------------------------------------
I will not do this (bits == 24):
static int sample_sizes[] = {
8, 16, 24, 32,
};
i = 0
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] > bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] > bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] > bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] > bits)
apply constraint
i++
check (i < ARRAY_SIZE(sample_sizes))
go out
--------------------------------------
nor this (bits == 24):
static int sample_sizes[] = {
32, 24, 16, 8,
};
i = 0
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
apply constraint
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
check (sample_sizes[i] <= bits)
i++
check (i < ARRAY_SIZE(sample_sizes))
go out
--
Péter
next prev parent reply other threads:[~2012-01-19 12:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 15:05 [PATCH v5] ASoC: Apply msbits constraint for sample size bigger than the msbits Peter Ujfalusi
2012-01-18 15:29 ` Mark Brown
2012-01-18 16:43 ` Peter Ujfalusi
2012-01-18 17:46 ` Mark Brown
2012-01-19 8:27 ` Peter Ujfalusi
2012-01-19 10:48 ` Mark Brown
2012-01-19 12:40 ` Peter Ujfalusi [this message]
2012-01-19 15:39 ` Mark Brown
2012-01-18 15:35 ` Clemens Ladisch
2012-01-18 15:43 ` Peter Ujfalusi
2012-01-18 15:49 ` Peter Ujfalusi
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=4F180F43.40706@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.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;
as well as URLs for NNTP newsgroup(s).