alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: core: fix shift used for second item in snd_soc_get_enum_double
@ 2016-08-29 15:06 Jaswinder Jassal
  2016-08-30  8:41 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: Jaswinder Jassal @ 2016-08-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel

Incorrect shift value was being used to extract the second item.

Signed-off-by: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com>
---
 sound/soc/soc-ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index a513a34..9fc1a7b 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -77,7 +77,7 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
 	item = snd_soc_enum_val_to_item(e, val);
 	ucontrol->value.enumerated.item[0] = item;
 	if (e->shift_l != e->shift_r) {
-		val = (reg_val >> e->shift_l) & e->mask;
+		val = (reg_val >> e->shift_r) & e->mask;
 		item = snd_soc_enum_val_to_item(e, val);
 		ucontrol->value.enumerated.item[1] = item;
 	}
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ASoC: core: fix shift used for second item in snd_soc_get_enum_double
  2016-08-29 15:06 [PATCH v2] ASoC: core: fix shift used for second item in snd_soc_get_enum_double Jaswinder Jassal
@ 2016-08-30  8:41 ` Charles Keepax
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2016-08-30  8:41 UTC (permalink / raw)
  To: Jaswinder Jassal; +Cc: tiwai, broonie, lgirdwood, alsa-devel

On Mon, Aug 29, 2016 at 04:06:58PM +0100, Jaswinder Jassal wrote:
> Incorrect shift value was being used to extract the second item.
> 
> Signed-off-by: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-30  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 15:06 [PATCH v2] ASoC: core: fix shift used for second item in snd_soc_get_enum_double Jaswinder Jassal
2016-08-30  8:41 ` Charles Keepax

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).