diff options
author | Shyam Krishnan M <shyam.moni@stericsson.com> | 2011-08-09 18:24:42 +0530 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 22:09:45 +0800 |
commit | 518579fb78a99a3434c297c273800b45c9175995 (patch) | |
tree | 003042942188274e11ecfbc978016d91fc512472 /sound/core/pcm_lib.c | |
parent | eff7c034cfedcd9d62de5d912a461d77ddd860af (diff) |
Ux500 ASoC: Fix to set max/min in h/w setting
The maximum and minimum value in
snd_pcm_hw_constraint_minmax is not
checked when the maximum goes less than
minimum. This check is put in place
ST-Ericsson Linux next: NA
ST-Ericsson ID: 348589
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10006
Change-Id: I3abc645d64c0c7f9914609468e74b5256495bda6
Signed-off-by: Shyam Krishnan M <shyam.moni@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31694
Reviewed-by: Avinash A <avinash.a@stericsson.com>
Tested-by: Avinash A <avinash.a@stericsson.com>
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 3420bd3da5d..cfadbb6a879 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -649,6 +649,8 @@ int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v) } } else if (!i->openmin && !i->openmax && i->min == i->max) i->integer = 1; + if (i->max < i->min) + i->max = i->min; if (snd_interval_checkempty(i)) { snd_interval_none(i); return -EINVAL; |