* [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses
@ 2016-02-29 17:01 Takashi Iwai
2016-02-29 17:01 ` [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type Takashi Iwai
` (9 more replies)
0 siblings, 10 replies; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
Hi,
here is a patchset for correcting the wrong access types to the enum
ctl values in various wm* codec drivers.
I didn't put Cc to stable. If they might be used for 64 bit
architectures, it's a real problem. In that case, feel free to put Cc
to stable.
thanks,
Takashi
===
Takashi Iwai (9):
ASoC: wm8753: Fix enum ctl accesses in a wrong type
ASoC: wm8904: Fix enum ctl accesses in a wrong type
ASoC: wm8958: Fix enum ctl accesses in a wrong type
ASoC: wm8983: Fix enum ctl accesses in a wrong type
ASoC: wm8985: Fix enum ctl accesses in a wrong type
ASoC: wm8994: Fix enum ctl accesses in a wrong type
ASoC: wm8996: Fix enum ctl accesses in a wrong type
ASoC: wm9081: Fix enum ctl accesses in a wrong type
ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
sound/soc/codecs/wm8753.c | 6 +++---
sound/soc/codecs/wm8904.c | 4 ++--
sound/soc/codecs/wm8958-dsp2.c | 8 ++++----
sound/soc/codecs/wm8983.c | 14 +++++++-------
sound/soc/codecs/wm8985.c | 14 +++++++-------
sound/soc/codecs/wm8994.c | 4 ++--
sound/soc/codecs/wm8996.c | 2 +-
sound/soc/codecs/wm9081.c | 8 ++++----
sound/soc/codecs/wm_adsp.c | 8 ++++----
9 files changed, 34 insertions(+), 34 deletions(-)
--
2.7.2
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8753: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 2/9] ASoC: wm8904: Fix enum ctl accesses in a wrong type Takashi Iwai
` (8 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"DAI Mode" ctl in wm8753 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[]. They have to be
via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8753.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 61299ca372ff..6f1024f48b19 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -233,7 +233,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
- ucontrol->value.integer.value[0] = wm8753->dai_func;
+ ucontrol->value.enumerated.item[0] = wm8753->dai_func;
return 0;
}
@@ -244,7 +244,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
u16 ioctl;
- if (wm8753->dai_func == ucontrol->value.integer.value[0])
+ if (wm8753->dai_func == ucontrol->value.enumerated.item[0])
return 0;
if (snd_soc_codec_is_active(codec))
@@ -252,7 +252,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
ioctl = snd_soc_read(codec, WM8753_IOCTL);
- wm8753->dai_func = ucontrol->value.integer.value[0];
+ wm8753->dai_func = ucontrol->value.enumerated.item[0];
if (((ioctl >> 2) & 0x3) == wm8753->dai_func)
return 1;
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/9] ASoC: wm8904: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
2016-02-29 17:01 ` [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8904: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 3/9] ASoC: wm8958: Fix enum ctl accesses in a wrong type Takashi Iwai
` (7 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"DRC Mode" and "EQ Mode" ctls in wm8904 codec driver are enum, while
the current driver accesses wrongly via value.integer.value[]. They
have to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8904.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 8172e499e6ed..edd7a7709194 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -396,7 +396,7 @@ static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
struct wm8904_pdata *pdata = wm8904->pdata;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (value >= pdata->num_drc_cfgs)
return -EINVAL;
@@ -467,7 +467,7 @@ static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
struct wm8904_pdata *pdata = wm8904->pdata;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (value >= pdata->num_retune_mobile_cfgs)
return -EINVAL;
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/9] ASoC: wm8958: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
2016-02-29 17:01 ` [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-02-29 17:01 ` [PATCH 2/9] ASoC: wm8904: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8958: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 4/9] ASoC: wm8983: Fix enum ctl accesses in a wrong type Takashi Iwai
` (6 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in
wm8958 codec driver are enum, while the current driver accesses
wrongly via value.integer.value[]. They have to be via
value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8958-dsp2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index c799cca5abeb..6b864c0fc2b6 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -459,7 +459,7 @@ static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -549,7 +549,7 @@ static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -582,7 +582,7 @@ static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -749,7 +749,7 @@ static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/9] ASoC: wm8983: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (2 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 3/9] ASoC: wm8958: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:20 ` Applied "ASoC: wm8983: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 5/9] ASoC: wm8985: Fix enum ctl accesses in a wrong type Takashi Iwai
` (5 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"Equalizer Function" ctl in wm8983 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[]. They have
to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8983.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index 7350ff654bbf..0c002a5712cb 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -497,9 +497,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF);
if (reg & WM8983_EQ3DMODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -511,18 +511,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3;
unsigned int reg_eq;
- if (ucontrol->value.integer.value[0] != 0
- && ucontrol->value.integer.value[0] != 1)
+ if (ucontrol->value.enumerated.item[0] != 0
+ && ucontrol->value.enumerated.item[0] != 1)
return -EINVAL;
reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF);
switch ((reg_eq & WM8983_EQ3DMODE) >> WM8983_EQ3DMODE_SHIFT) {
case 0:
- if (!ucontrol->value.integer.value[0])
+ if (!ucontrol->value.enumerated.item[0])
return 0;
break;
case 1:
- if (ucontrol->value.integer.value[0])
+ if (ucontrol->value.enumerated.item[0])
return 0;
break;
}
@@ -537,7 +537,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */
snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF,
WM8983_EQ3DMODE_MASK,
- ucontrol->value.integer.value[0]
+ ucontrol->value.enumerated.item[0]
<< WM8983_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */
snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2);
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/9] ASoC: wm8985: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (3 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 4/9] ASoC: wm8983: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:20 ` Applied "ASoC: wm8985: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 6/9] ASoC: wm8994: Fix enum ctl accesses in a wrong type Takashi Iwai
` (4 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"Equalizer Function" ctl in wm8985 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[]. They have
to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8985.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 9918152a03c7..6ac76fe116b0 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -531,9 +531,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
if (reg & WM8985_EQ3DMODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -545,18 +545,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3;
unsigned int reg_eq;
- if (ucontrol->value.integer.value[0] != 0
- && ucontrol->value.integer.value[0] != 1)
+ if (ucontrol->value.enumerated.item[0] != 0
+ && ucontrol->value.enumerated.item[0] != 1)
return -EINVAL;
reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) {
case 0:
- if (!ucontrol->value.integer.value[0])
+ if (!ucontrol->value.enumerated.item[0])
return 0;
break;
case 1:
- if (ucontrol->value.integer.value[0])
+ if (ucontrol->value.enumerated.item[0])
return 0;
break;
}
@@ -573,7 +573,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */
snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF,
WM8985_EQ3DMODE_MASK,
- ucontrol->value.integer.value[0]
+ ucontrol->value.enumerated.item[0]
<< WM8985_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */
snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2);
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 6/9] ASoC: wm8994: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (4 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 5/9] ASoC: wm8985: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm8994: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 7/9] ASoC: wm8996: Fix enum ctl accesses in a wrong type Takashi Iwai
` (3 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
The DRC Mode like "AIF1DRC1 Mode" and EQ Mode like "AIF1.1 EQ Mode" in
wm8994 codec driver are enum ctls, while the current driver accesses
wrongly via value.integer.value[]. They have to be via
value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8994.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 2ccbb322df77..a18aecb49935 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -362,7 +362,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
int drc = wm8994_get_drc(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (drc < 0)
return drc;
@@ -469,7 +469,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (block < 0)
return block;
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 7/9] ASoC: wm8996: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (5 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 6/9] ASoC: wm8994: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm8996: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 8/9] ASoC: wm9081: Fix enum ctl accesses in a wrong type Takashi Iwai
` (2 subsequent siblings)
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"DSP1 EQ Mode" and "DSP2 EQ Mode" ctls in wm8996 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[]. They have to be via value.enumerated.item[]
instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm8996.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 8d7d6c01a2f7..f99b34f7647b 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -416,7 +416,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
struct wm8996_pdata *pdata = &wm8996->pdata;
int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (block < 0)
return block;
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 8/9] ASoC: wm9081: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (6 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 7/9] ASoC: wm8996: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm9081: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 9/9] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-08 9:02 ` [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Charles Keepax
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
"Speaker Mode "ctl in wm9081 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[]. They have to be
via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm9081.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index ccb3b15139ad..363b3b667616 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
if (reg & WM9081_SPK_MODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -365,7 +365,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
/* Are we changing anything? */
- if (ucontrol->value.integer.value[0] ==
+ if (ucontrol->value.enumerated.item[0] ==
((reg2 & WM9081_SPK_MODE) != 0))
return 0;
@@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
if (reg_pwr & WM9081_SPK_ENA)
return -EINVAL;
- if (ucontrol->value.integer.value[0]) {
+ if (ucontrol->value.enumerated.item[0]) {
/* Class AB */
reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL);
reg2 |= WM9081_SPK_MODE;
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 9/9] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (7 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 8/9] ASoC: wm9081: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-02-29 17:01 ` Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm_adsp: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-03-08 9:02 ` [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Charles Keepax
9 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2016-02-29 17:01 UTC (permalink / raw)
To: alsa-devel; +Cc: Charles Keepax, Mark Brown, Richard Fitzgerald, Liam Girdwood
The firmware ctls like "DSP1 Firmware" in wm_adsp codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[]. They have to be via value.enumerated.item[]
instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/codecs/wm_adsp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 33806d487b8a..b9195b9c2b05 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -586,7 +586,7 @@ static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol,
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec);
- ucontrol->value.integer.value[0] = dsp[e->shift_l].fw;
+ ucontrol->value.enumerated.item[0] = dsp[e->shift_l].fw;
return 0;
}
@@ -599,10 +599,10 @@ static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec);
int ret = 0;
- if (ucontrol->value.integer.value[0] == dsp[e->shift_l].fw)
+ if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw)
return 0;
- if (ucontrol->value.integer.value[0] >= WM_ADSP_NUM_FW)
+ if (ucontrol->value.enumerated.item[0] >= WM_ADSP_NUM_FW)
return -EINVAL;
mutex_lock(&dsp[e->shift_l].pwr_lock);
@@ -610,7 +610,7 @@ static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
if (dsp[e->shift_l].running || dsp[e->shift_l].compr)
ret = -EBUSY;
else
- dsp[e->shift_l].fw = ucontrol->value.integer.value[0];
+ dsp[e->shift_l].fw = ucontrol->value.enumerated.item[0];
mutex_unlock(&dsp[e->shift_l].pwr_lock);
--
2.7.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm_adsp: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 9/9] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:19 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:19 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown, stable; +Cc: alsa-devel
The patch
ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 15c665700bf6f4543f003ac0fbb1e9ec692e93f2 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:18 +0100
Subject: [PATCH] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
The firmware ctls like "DSP1 Firmware" in wm_adsp codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[]. They have to be via value.enumerated.item[]
instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
---
sound/soc/codecs/wm_adsp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 33806d487b8a..b9195b9c2b05 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -586,7 +586,7 @@ static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol,
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec);
- ucontrol->value.integer.value[0] = dsp[e->shift_l].fw;
+ ucontrol->value.enumerated.item[0] = dsp[e->shift_l].fw;
return 0;
}
@@ -599,10 +599,10 @@ static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec);
int ret = 0;
- if (ucontrol->value.integer.value[0] == dsp[e->shift_l].fw)
+ if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw)
return 0;
- if (ucontrol->value.integer.value[0] >= WM_ADSP_NUM_FW)
+ if (ucontrol->value.enumerated.item[0] >= WM_ADSP_NUM_FW)
return -EINVAL;
mutex_lock(&dsp[e->shift_l].pwr_lock);
@@ -610,7 +610,7 @@ static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
if (dsp[e->shift_l].running || dsp[e->shift_l].compr)
ret = -EBUSY;
else
- dsp[e->shift_l].fw = ucontrol->value.integer.value[0];
+ dsp[e->shift_l].fw = ucontrol->value.enumerated.item[0];
mutex_unlock(&dsp[e->shift_l].pwr_lock);
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm9081: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 8/9] ASoC: wm9081: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:19 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:19 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm9081: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 39a79fe10482572ce76fd724b7915b3ee4cbd81e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:17 +0100
Subject: [PATCH] ASoC: wm9081: Fix enum ctl accesses in a wrong type
"Speaker Mode "ctl in wm9081 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[]. They have to be
via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm9081.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index ccb3b15139ad..363b3b667616 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -344,9 +344,9 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
if (reg & WM9081_SPK_MODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -365,7 +365,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
/* Are we changing anything? */
- if (ucontrol->value.integer.value[0] ==
+ if (ucontrol->value.enumerated.item[0] ==
((reg2 & WM9081_SPK_MODE) != 0))
return 0;
@@ -373,7 +373,7 @@ static int speaker_mode_put(struct snd_kcontrol *kcontrol,
if (reg_pwr & WM9081_SPK_ENA)
return -EINVAL;
- if (ucontrol->value.integer.value[0]) {
+ if (ucontrol->value.enumerated.item[0]) {
/* Class AB */
reg2 &= ~(WM9081_SPK_INV_MUTE | WM9081_OUT_SPK_CTRL);
reg2 |= WM9081_SPK_MODE;
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8996: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 7/9] ASoC: wm8996: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:19 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:19 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm8996: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 8293004c81dd33e6e91afe2f9a773fe6796893cc Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:16 +0100
Subject: [PATCH] ASoC: wm8996: Fix enum ctl accesses in a wrong type
"DSP1 EQ Mode" and "DSP2 EQ Mode" ctls in wm8996 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[]. They have to be via value.enumerated.item[]
instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm8996.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 8d7d6c01a2f7..f99b34f7647b 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -416,7 +416,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
struct wm8996_pdata *pdata = &wm8996->pdata;
int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (block < 0)
return block;
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8994: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 6/9] ASoC: wm8994: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:19 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:19 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown, stable; +Cc: alsa-devel
The patch
ASoC: wm8994: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 8019c0b37cd5a87107808300a496388b777225bf Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:15 +0100
Subject: [PATCH] ASoC: wm8994: Fix enum ctl accesses in a wrong type
The DRC Mode like "AIF1DRC1 Mode" and EQ Mode like "AIF1.1 EQ Mode" in
wm8994 codec driver are enum ctls, while the current driver accesses
wrongly via value.integer.value[]. They have to be via
value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
---
sound/soc/codecs/wm8994.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 2ccbb322df77..a18aecb49935 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -362,7 +362,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
int drc = wm8994_get_drc(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (drc < 0)
return drc;
@@ -469,7 +469,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8994 *control = wm8994->wm8994;
struct wm8994_pdata *pdata = &control->pdata;
int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (block < 0)
return block;
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8985: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 5/9] ASoC: wm8985: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:20 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:20 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm8985: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 251d604778f1f7bbf29672a79cccc4663a7efd62 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:14 +0100
Subject: [PATCH] ASoC: wm8985: Fix enum ctl accesses in a wrong type
"Equalizer Function" ctl in wm8985 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[]. They have
to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm8985.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 9918152a03c7..6ac76fe116b0 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -531,9 +531,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
if (reg & WM8985_EQ3DMODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -545,18 +545,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3;
unsigned int reg_eq;
- if (ucontrol->value.integer.value[0] != 0
- && ucontrol->value.integer.value[0] != 1)
+ if (ucontrol->value.enumerated.item[0] != 0
+ && ucontrol->value.enumerated.item[0] != 1)
return -EINVAL;
reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) {
case 0:
- if (!ucontrol->value.integer.value[0])
+ if (!ucontrol->value.enumerated.item[0])
return 0;
break;
case 1:
- if (ucontrol->value.integer.value[0])
+ if (ucontrol->value.enumerated.item[0])
return 0;
break;
}
@@ -573,7 +573,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */
snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF,
WM8985_EQ3DMODE_MASK,
- ucontrol->value.integer.value[0]
+ ucontrol->value.enumerated.item[0]
<< WM8985_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */
snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2);
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8983: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 4/9] ASoC: wm8983: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:20 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:20 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm8983: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From b5ab265905b3e07ad9dc7d553a074404b25e9200 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:13 +0100
Subject: [PATCH] ASoC: wm8983: Fix enum ctl accesses in a wrong type
"Equalizer Function" ctl in wm8983 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[]. They have
to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm8983.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index 7350ff654bbf..0c002a5712cb 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -497,9 +497,9 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF);
if (reg & WM8983_EQ3DMODE)
- ucontrol->value.integer.value[0] = 1;
+ ucontrol->value.enumerated.item[0] = 1;
else
- ucontrol->value.integer.value[0] = 0;
+ ucontrol->value.enumerated.item[0] = 0;
return 0;
}
@@ -511,18 +511,18 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
unsigned int regpwr2, regpwr3;
unsigned int reg_eq;
- if (ucontrol->value.integer.value[0] != 0
- && ucontrol->value.integer.value[0] != 1)
+ if (ucontrol->value.enumerated.item[0] != 0
+ && ucontrol->value.enumerated.item[0] != 1)
return -EINVAL;
reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF);
switch ((reg_eq & WM8983_EQ3DMODE) >> WM8983_EQ3DMODE_SHIFT) {
case 0:
- if (!ucontrol->value.integer.value[0])
+ if (!ucontrol->value.enumerated.item[0])
return 0;
break;
case 1:
- if (ucontrol->value.integer.value[0])
+ if (ucontrol->value.enumerated.item[0])
return 0;
break;
}
@@ -537,7 +537,7 @@ static int eqmode_put(struct snd_kcontrol *kcontrol,
/* set the desired eqmode */
snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF,
WM8983_EQ3DMODE_MASK,
- ucontrol->value.integer.value[0]
+ ucontrol->value.enumerated.item[0]
<< WM8983_EQ3DMODE_SHIFT);
/* restore DAC/ADC configuration */
snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2);
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8958: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 3/9] ASoC: wm8958: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:21 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:21 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown, stable; +Cc: alsa-devel
The patch
ASoC: wm8958: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From d0784829ae3b0beeb69b476f017d5c8a2eb95198 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:12 +0100
Subject: [PATCH] ASoC: wm8958: Fix enum ctl accesses in a wrong type
"MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in
wm8958 codec driver are enum, while the current driver accesses
wrongly via value.integer.value[]. They have to be via
value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
---
sound/soc/codecs/wm8958-dsp2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index c799cca5abeb..6b864c0fc2b6 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -459,7 +459,7 @@ static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -549,7 +549,7 @@ static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -582,7 +582,7 @@ static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
@@ -749,7 +749,7 @@ static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
struct wm8994 *control = wm8994->wm8994;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
int reg;
/* Don't allow on the fly reconfiguration */
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8904: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 2/9] ASoC: wm8904: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:21 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:21 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm8904: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From c41a024c4e770fff999f4164cc4d1696e5f17437 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:11 +0100
Subject: [PATCH] ASoC: wm8904: Fix enum ctl accesses in a wrong type
"DRC Mode" and "EQ Mode" ctls in wm8904 codec driver are enum, while
the current driver accesses wrongly via value.integer.value[]. They
have to be via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm8904.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 8172e499e6ed..edd7a7709194 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -396,7 +396,7 @@ static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
struct wm8904_pdata *pdata = wm8904->pdata;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (value >= pdata->num_drc_cfgs)
return -EINVAL;
@@ -467,7 +467,7 @@ static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
struct wm8904_pdata *pdata = wm8904->pdata;
- int value = ucontrol->value.integer.value[0];
+ int value = ucontrol->value.enumerated.item[0];
if (value >= pdata->num_retune_mobile_cfgs)
return -EINVAL;
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Applied "ASoC: wm8753: Fix enum ctl accesses in a wrong type" to the asoc tree
2016-02-29 17:01 ` [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-01 3:21 ` Mark Brown
0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2016-03-01 3:21 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: alsa-devel
The patch
ASoC: wm8753: Fix enum ctl accesses in a wrong type
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 0cad10539b281e88335afd765afaf9885dcfc3ef Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 29 Feb 2016 18:01:10 +0100
Subject: [PATCH] ASoC: wm8753: Fix enum ctl accesses in a wrong type
"DAI Mode" ctl in wm8753 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[]. They have to be
via value.enumerated.item[] instead.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/wm8753.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 61299ca372ff..6f1024f48b19 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -233,7 +233,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
- ucontrol->value.integer.value[0] = wm8753->dai_func;
+ ucontrol->value.enumerated.item[0] = wm8753->dai_func;
return 0;
}
@@ -244,7 +244,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
u16 ioctl;
- if (wm8753->dai_func == ucontrol->value.integer.value[0])
+ if (wm8753->dai_func == ucontrol->value.enumerated.item[0])
return 0;
if (snd_soc_codec_is_active(codec))
@@ -252,7 +252,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
ioctl = snd_soc_read(codec, WM8753_IOCTL);
- wm8753->dai_func = ucontrol->value.integer.value[0];
+ wm8753->dai_func = ucontrol->value.enumerated.item[0];
if (((ioctl >> 2) & 0x3) == wm8753->dai_func)
return 1;
--
2.7.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
` (8 preceding siblings ...)
2016-02-29 17:01 ` [PATCH 9/9] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type Takashi Iwai
@ 2016-03-08 9:02 ` Charles Keepax
9 siblings, 0 replies; 20+ messages in thread
From: Charles Keepax @ 2016-03-08 9:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Mark Brown, Richard Fitzgerald, Liam Girdwood
On Mon, Feb 29, 2016 at 06:01:09PM +0100, Takashi Iwai wrote:
> Hi,
>
> here is a patchset for correcting the wrong access types to the enum
> ctl values in various wm* codec drivers.
>
> I didn't put Cc to stable. If they might be used for 64 bit
> architectures, it's a real problem. In that case, feel free to put Cc
> to stable.
>
>
> thanks,
>
> Takashi
>
> ===
For the whole series:
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2016-03-08 9:02 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 17:01 [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses Takashi Iwai
2016-02-29 17:01 ` [PATCH 1/9] ASoC: wm8753: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8753: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 2/9] ASoC: wm8904: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8904: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 3/9] ASoC: wm8958: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:21 ` Applied "ASoC: wm8958: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 4/9] ASoC: wm8983: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:20 ` Applied "ASoC: wm8983: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 5/9] ASoC: wm8985: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:20 ` Applied "ASoC: wm8985: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 6/9] ASoC: wm8994: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm8994: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 7/9] ASoC: wm8996: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm8996: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 8/9] ASoC: wm9081: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm9081: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-02-29 17:01 ` [PATCH 9/9] ASoC: wm_adsp: Fix enum ctl accesses in a wrong type Takashi Iwai
2016-03-01 3:19 ` Applied "ASoC: wm_adsp: Fix enum ctl accesses in a wrong type" to the asoc tree Mark Brown
2016-03-08 9:02 ` [PATCH 0/9] ASoC: wm*: Fix enum ctl accesses 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).