[alsa-devel] [PATCH 0/5] ASoC: pxa: Fix enum ctl accesses
Hi,
here is a patchset to correct the wrong type accesses in pxa drivers for enum ctls. I didn't put Cc to stable for them, supposing these are only for 32bit systems. If not, feel free to put Cc to stable.
thanks,
Takashi
===
Takashi Iwai (5): ASoC: pxa: corgi: Fix enum ctl accesses in a wrong type ASoC: pxa: magician: Fix enum ctl accesses in a wrong type ASoC: pxa: poodle: Fix enum ctl accesses in a wrong type ASoC: pxa: spitz: Fix enum ctl accesses in a wrong type ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type
sound/soc/pxa/corgi.c | 12 ++++++------ sound/soc/pxa/magician.c | 6 +++--- sound/soc/pxa/poodle.c | 12 ++++++------ sound/soc/pxa/spitz.c | 12 ++++++------ sound/soc/pxa/tosa.c | 12 ++++++------ 5 files changed, 27 insertions(+), 27 deletions(-)
"Jack Function" and "Speaker Function" ctls in corgi 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/pxa/corgi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index c97dc13d3608..dcbb7aa9830c 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -163,7 +163,7 @@ static struct snd_soc_ops corgi_ops = { static int corgi_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = corgi_jack_func; + ucontrol->value.enumerated.item[0] = corgi_jack_func; return 0; }
@@ -172,10 +172,10 @@ static int corgi_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (corgi_jack_func == ucontrol->value.integer.value[0]) + if (corgi_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- corgi_jack_func = ucontrol->value.integer.value[0]; + corgi_jack_func = ucontrol->value.enumerated.item[0]; corgi_ext_control(&card->dapm); return 1; } @@ -183,7 +183,7 @@ static int corgi_set_jack(struct snd_kcontrol *kcontrol, static int corgi_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = corgi_spk_func; + ucontrol->value.enumerated.item[0] = corgi_spk_func; return 0; }
@@ -192,10 +192,10 @@ static int corgi_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (corgi_spk_func == ucontrol->value.integer.value[0]) + if (corgi_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- corgi_spk_func = ucontrol->value.integer.value[0]; + corgi_spk_func = ucontrol->value.enumerated.item[0]; corgi_ext_control(&card->dapm); return 1; }
The patch
ASoC: pxa: corgi: 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 1457ad0e99dc5b1fe3fe3123d5135c95c00ed74b Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de Date: Mon, 29 Feb 2016 17:23:49 +0100 Subject: [PATCH] ASoC: pxa: corgi: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in corgi 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/pxa/corgi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index c97dc13d3608..dcbb7aa9830c 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -163,7 +163,7 @@ static struct snd_soc_ops corgi_ops = { static int corgi_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = corgi_jack_func; + ucontrol->value.enumerated.item[0] = corgi_jack_func; return 0; }
@@ -172,10 +172,10 @@ static int corgi_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (corgi_jack_func == ucontrol->value.integer.value[0]) + if (corgi_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- corgi_jack_func = ucontrol->value.integer.value[0]; + corgi_jack_func = ucontrol->value.enumerated.item[0]; corgi_ext_control(&card->dapm); return 1; } @@ -183,7 +183,7 @@ static int corgi_set_jack(struct snd_kcontrol *kcontrol, static int corgi_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = corgi_spk_func; + ucontrol->value.enumerated.item[0] = corgi_spk_func; return 0; }
@@ -192,10 +192,10 @@ static int corgi_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (corgi_spk_func == ucontrol->value.integer.value[0]) + if (corgi_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- corgi_spk_func = ucontrol->value.integer.value[0]; + corgi_spk_func = ucontrol->value.enumerated.item[0]; corgi_ext_control(&card->dapm); return 1; }
"Input Select" ctl in magician driver is an enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead.
(Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so they should stay to access via value.integer.value[] as is.)
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/soc/pxa/magician.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 241d0be42d7a..62b8377a9d2b 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c @@ -308,17 +308,17 @@ static int magician_set_spk(struct snd_kcontrol *kcontrol, static int magician_get_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = magician_in_sel; + ucontrol->value.enumerated.item[0] = magician_in_sel; return 0; }
static int magician_set_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - if (magician_in_sel == ucontrol->value.integer.value[0]) + if (magician_in_sel == ucontrol->value.enumerated.item[0]) return 0;
- magician_in_sel = ucontrol->value.integer.value[0]; + magician_in_sel = ucontrol->value.enumerated.item[0];
switch (magician_in_sel) { case MAGICIAN_MIC:
The patch
ASoC: pxa: magician: 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 127ee199d5d232f29ad64bace3b441127fce6cd3 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de Date: Mon, 29 Feb 2016 17:23:50 +0100 Subject: [PATCH] ASoC: pxa: magician: Fix enum ctl accesses in a wrong type
"Input Select" ctl in magician driver is an enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead.
(Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so they should stay to access via value.integer.value[] as is.)
Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/pxa/magician.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 241d0be42d7a..62b8377a9d2b 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c @@ -308,17 +308,17 @@ static int magician_set_spk(struct snd_kcontrol *kcontrol, static int magician_get_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = magician_in_sel; + ucontrol->value.enumerated.item[0] = magician_in_sel; return 0; }
static int magician_set_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - if (magician_in_sel == ucontrol->value.integer.value[0]) + if (magician_in_sel == ucontrol->value.enumerated.item[0]) return 0;
- magician_in_sel = ucontrol->value.integer.value[0]; + magician_in_sel = ucontrol->value.enumerated.item[0];
switch (magician_in_sel) { case MAGICIAN_MIC:
"Jack Function" and "Speaker Function" ctls in poodle 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/pxa/poodle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index 84d0e2e50808..4b3b714f5ee7 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -138,7 +138,7 @@ static struct snd_soc_ops poodle_ops = { static int poodle_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = poodle_jack_func; + ucontrol->value.enumerated.item[0] = poodle_jack_func; return 0; }
@@ -147,10 +147,10 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (poodle_jack_func == ucontrol->value.integer.value[0]) + if (poodle_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- poodle_jack_func = ucontrol->value.integer.value[0]; + poodle_jack_func = ucontrol->value.enumerated.item[0]; poodle_ext_control(&card->dapm); return 1; } @@ -158,7 +158,7 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol, static int poodle_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = poodle_spk_func; + ucontrol->value.enumerated.item[0] = poodle_spk_func; return 0; }
@@ -167,10 +167,10 @@ static int poodle_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (poodle_spk_func == ucontrol->value.integer.value[0]) + if (poodle_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- poodle_spk_func = ucontrol->value.integer.value[0]; + poodle_spk_func = ucontrol->value.enumerated.item[0]; poodle_ext_control(&card->dapm); return 1; }
The patch
ASoC: pxa: poodle: 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 7a3f4b488ce366de6ab2cf19d95353da9814bdd9 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de Date: Mon, 29 Feb 2016 17:23:51 +0100 Subject: [PATCH] ASoC: pxa: poodle: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in poodle 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/pxa/poodle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index 84d0e2e50808..4b3b714f5ee7 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -138,7 +138,7 @@ static struct snd_soc_ops poodle_ops = { static int poodle_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = poodle_jack_func; + ucontrol->value.enumerated.item[0] = poodle_jack_func; return 0; }
@@ -147,10 +147,10 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (poodle_jack_func == ucontrol->value.integer.value[0]) + if (poodle_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- poodle_jack_func = ucontrol->value.integer.value[0]; + poodle_jack_func = ucontrol->value.enumerated.item[0]; poodle_ext_control(&card->dapm); return 1; } @@ -158,7 +158,7 @@ static int poodle_set_jack(struct snd_kcontrol *kcontrol, static int poodle_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = poodle_spk_func; + ucontrol->value.enumerated.item[0] = poodle_spk_func; return 0; }
@@ -167,10 +167,10 @@ static int poodle_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (poodle_spk_func == ucontrol->value.integer.value[0]) + if (poodle_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- poodle_spk_func = ucontrol->value.integer.value[0]; + poodle_spk_func = ucontrol->value.enumerated.item[0]; poodle_ext_control(&card->dapm); return 1; }
"Jack Function" and "Speaker Function" ctls in spitz 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/pxa/spitz.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index b00222620fd0..0e02634c8b7f 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -164,7 +164,7 @@ static struct snd_soc_ops spitz_ops = { static int spitz_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = spitz_jack_func; + ucontrol->value.enumerated.item[0] = spitz_jack_func; return 0; }
@@ -173,10 +173,10 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (spitz_jack_func == ucontrol->value.integer.value[0]) + if (spitz_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- spitz_jack_func = ucontrol->value.integer.value[0]; + spitz_jack_func = ucontrol->value.enumerated.item[0]; spitz_ext_control(&card->dapm); return 1; } @@ -184,7 +184,7 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol, static int spitz_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = spitz_spk_func; + ucontrol->value.enumerated.item[0] = spitz_spk_func; return 0; }
@@ -193,10 +193,10 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (spitz_spk_func == ucontrol->value.integer.value[0]) + if (spitz_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- spitz_spk_func = ucontrol->value.integer.value[0]; + spitz_spk_func = ucontrol->value.enumerated.item[0]; spitz_ext_control(&card->dapm); return 1; }
The patch
ASoC: pxa: spitz: 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 49a1ba16ab15b9a572c188fe0d9d79017d2fef99 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de Date: Mon, 29 Feb 2016 17:23:52 +0100 Subject: [PATCH] ASoC: pxa: spitz: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in spitz 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/pxa/spitz.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index b00222620fd0..0e02634c8b7f 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -164,7 +164,7 @@ static struct snd_soc_ops spitz_ops = { static int spitz_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = spitz_jack_func; + ucontrol->value.enumerated.item[0] = spitz_jack_func; return 0; }
@@ -173,10 +173,10 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (spitz_jack_func == ucontrol->value.integer.value[0]) + if (spitz_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- spitz_jack_func = ucontrol->value.integer.value[0]; + spitz_jack_func = ucontrol->value.enumerated.item[0]; spitz_ext_control(&card->dapm); return 1; } @@ -184,7 +184,7 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol, static int spitz_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = spitz_spk_func; + ucontrol->value.enumerated.item[0] = spitz_spk_func; return 0; }
@@ -193,10 +193,10 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (spitz_spk_func == ucontrol->value.integer.value[0]) + if (spitz_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- spitz_spk_func = ucontrol->value.integer.value[0]; + spitz_spk_func = ucontrol->value.enumerated.item[0]; spitz_ext_control(&card->dapm); return 1; }
"Jack Function" and "Speaker Function" ctls in tosa 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/pxa/tosa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 49518dd642aa..c508f024ecfb 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -95,7 +95,7 @@ static struct snd_soc_ops tosa_ops = { static int tosa_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = tosa_jack_func; + ucontrol->value.enumerated.item[0] = tosa_jack_func; return 0; }
@@ -104,10 +104,10 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (tosa_jack_func == ucontrol->value.integer.value[0]) + if (tosa_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- tosa_jack_func = ucontrol->value.integer.value[0]; + tosa_jack_func = ucontrol->value.enumerated.item[0]; tosa_ext_control(&card->dapm); return 1; } @@ -115,7 +115,7 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol, static int tosa_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = tosa_spk_func; + ucontrol->value.enumerated.item[0] = tosa_spk_func; return 0; }
@@ -124,10 +124,10 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (tosa_spk_func == ucontrol->value.integer.value[0]) + if (tosa_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- tosa_spk_func = ucontrol->value.integer.value[0]; + tosa_spk_func = ucontrol->value.enumerated.item[0]; tosa_ext_control(&card->dapm); return 1; }
The patch
ASoC: pxa: tosa: 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 419396d5a1d12003a18a58785687697800d2f02a Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de Date: Mon, 29 Feb 2016 17:23:53 +0100 Subject: [PATCH] ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in tosa 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/pxa/tosa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 49518dd642aa..c508f024ecfb 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -95,7 +95,7 @@ static struct snd_soc_ops tosa_ops = { static int tosa_get_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = tosa_jack_func; + ucontrol->value.enumerated.item[0] = tosa_jack_func; return 0; }
@@ -104,10 +104,10 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (tosa_jack_func == ucontrol->value.integer.value[0]) + if (tosa_jack_func == ucontrol->value.enumerated.item[0]) return 0;
- tosa_jack_func = ucontrol->value.integer.value[0]; + tosa_jack_func = ucontrol->value.enumerated.item[0]; tosa_ext_control(&card->dapm); return 1; } @@ -115,7 +115,7 @@ static int tosa_set_jack(struct snd_kcontrol *kcontrol, static int tosa_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - ucontrol->value.integer.value[0] = tosa_spk_func; + ucontrol->value.enumerated.item[0] = tosa_spk_func; return 0; }
@@ -124,10 +124,10 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol, { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
- if (tosa_spk_func == ucontrol->value.integer.value[0]) + if (tosa_spk_func == ucontrol->value.enumerated.item[0]) return 0;
- tosa_spk_func = ucontrol->value.integer.value[0]; + tosa_spk_func = ucontrol->value.enumerated.item[0]; tosa_ext_control(&card->dapm); return 1; }
Takashi Iwai tiwai@suse.de writes:
Hi,
here is a patchset to correct the wrong type accesses in pxa drivers for enum ctls. I didn't put Cc to stable for them, supposing these are only for 32bit systems. If not, feel free to put Cc to stable.
thanks,
Takashi
For the whole serie: Acked-by: Robert Jarzmik robert.jarzmik@free.fr
And yes, these are only 32 bits systems :)
Cheers.
-- Robert
participants (3)
-
Mark Brown
-
Robert Jarzmik
-
Takashi Iwai