From: Greg Kroah-Hartman Date: Tue, 4 Mar 2014 00:48:58 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.10.33~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc8f264d3dc6cd6fb6d11754bd084cff2e5e082c;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: asoc-sta32x-fix-array-access-overflow.patch asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch asoc-wm8770-fix-wrong-number-of-enum-items.patch asoc-wm8958-dsp-fix-firmware-block-loading.patch --- diff --git a/queue-3.4/asoc-sta32x-fix-array-access-overflow.patch b/queue-3.4/asoc-sta32x-fix-array-access-overflow.patch new file mode 100644 index 00000000000..b279a31d7d1 --- /dev/null +++ b/queue-3.4/asoc-sta32x-fix-array-access-overflow.patch @@ -0,0 +1,105 @@ +From 025c3fa9256d4c54506b7a29dc3befac54f5c68d Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 18 Feb 2014 09:24:12 +0100 +Subject: ASoC: sta32x: Fix array access overflow + +From: Takashi Iwai + +commit 025c3fa9256d4c54506b7a29dc3befac54f5c68d upstream. + +Preset EQ enum of sta32x codec driver declares too many number of +items and it may lead to the access over the actual array size. + +Use SOC_ENUM_SINGLE_DECL() helper and it's automatically fixed. + +Signed-off-by: Takashi Iwai +Acked-by: Liam Girdwood +Acked-by: Lars-Peter Clausen +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/sta32x.c | 72 +++++++++++++++++++++++----------------------- + 1 file changed, 36 insertions(+), 36 deletions(-) + +--- a/sound/soc/codecs/sta32x.c ++++ b/sound/soc/codecs/sta32x.c +@@ -147,42 +147,42 @@ static const unsigned int sta32x_limiter + 13, 16, TLV_DB_SCALE_ITEM(-1500, 300, 0), + }; + +-static const struct soc_enum sta32x_drc_ac_enum = +- SOC_ENUM_SINGLE(STA32X_CONFD, STA32X_CONFD_DRC_SHIFT, +- 2, sta32x_drc_ac); +-static const struct soc_enum sta32x_auto_eq_enum = +- SOC_ENUM_SINGLE(STA32X_AUTO1, STA32X_AUTO1_AMEQ_SHIFT, +- 3, sta32x_auto_eq_mode); +-static const struct soc_enum sta32x_auto_gc_enum = +- SOC_ENUM_SINGLE(STA32X_AUTO1, STA32X_AUTO1_AMGC_SHIFT, +- 4, sta32x_auto_gc_mode); +-static const struct soc_enum sta32x_auto_xo_enum = +- SOC_ENUM_SINGLE(STA32X_AUTO2, STA32X_AUTO2_XO_SHIFT, +- 16, sta32x_auto_xo_mode); +-static const struct soc_enum sta32x_preset_eq_enum = +- SOC_ENUM_SINGLE(STA32X_AUTO3, STA32X_AUTO3_PEQ_SHIFT, +- 32, sta32x_preset_eq_mode); +-static const struct soc_enum sta32x_limiter_ch1_enum = +- SOC_ENUM_SINGLE(STA32X_C1CFG, STA32X_CxCFG_LS_SHIFT, +- 3, sta32x_limiter_select); +-static const struct soc_enum sta32x_limiter_ch2_enum = +- SOC_ENUM_SINGLE(STA32X_C2CFG, STA32X_CxCFG_LS_SHIFT, +- 3, sta32x_limiter_select); +-static const struct soc_enum sta32x_limiter_ch3_enum = +- SOC_ENUM_SINGLE(STA32X_C3CFG, STA32X_CxCFG_LS_SHIFT, +- 3, sta32x_limiter_select); +-static const struct soc_enum sta32x_limiter1_attack_rate_enum = +- SOC_ENUM_SINGLE(STA32X_L1AR, STA32X_LxA_SHIFT, +- 16, sta32x_limiter_attack_rate); +-static const struct soc_enum sta32x_limiter2_attack_rate_enum = +- SOC_ENUM_SINGLE(STA32X_L2AR, STA32X_LxA_SHIFT, +- 16, sta32x_limiter_attack_rate); +-static const struct soc_enum sta32x_limiter1_release_rate_enum = +- SOC_ENUM_SINGLE(STA32X_L1AR, STA32X_LxR_SHIFT, +- 16, sta32x_limiter_release_rate); +-static const struct soc_enum sta32x_limiter2_release_rate_enum = +- SOC_ENUM_SINGLE(STA32X_L2AR, STA32X_LxR_SHIFT, +- 16, sta32x_limiter_release_rate); ++static SOC_ENUM_SINGLE_DECL(sta32x_drc_ac_enum, ++ STA32X_CONFD, STA32X_CONFD_DRC_SHIFT, ++ sta32x_drc_ac); ++static SOC_ENUM_SINGLE_DECL(sta32x_auto_eq_enum, ++ STA32X_AUTO1, STA32X_AUTO1_AMEQ_SHIFT, ++ sta32x_auto_eq_mode); ++static SOC_ENUM_SINGLE_DECL(sta32x_auto_gc_enum, ++ STA32X_AUTO1, STA32X_AUTO1_AMGC_SHIFT, ++ sta32x_auto_gc_mode); ++static SOC_ENUM_SINGLE_DECL(sta32x_auto_xo_enum, ++ STA32X_AUTO2, STA32X_AUTO2_XO_SHIFT, ++ sta32x_auto_xo_mode); ++static SOC_ENUM_SINGLE_DECL(sta32x_preset_eq_enum, ++ STA32X_AUTO3, STA32X_AUTO3_PEQ_SHIFT, ++ sta32x_preset_eq_mode); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch1_enum, ++ STA32X_C1CFG, STA32X_CxCFG_LS_SHIFT, ++ sta32x_limiter_select); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch2_enum, ++ STA32X_C2CFG, STA32X_CxCFG_LS_SHIFT, ++ sta32x_limiter_select); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch3_enum, ++ STA32X_C3CFG, STA32X_CxCFG_LS_SHIFT, ++ sta32x_limiter_select); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter1_attack_rate_enum, ++ STA32X_L1AR, STA32X_LxA_SHIFT, ++ sta32x_limiter_attack_rate); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_attack_rate_enum, ++ STA32X_L2AR, STA32X_LxA_SHIFT, ++ sta32x_limiter_attack_rate); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter1_release_rate_enum, ++ STA32X_L1AR, STA32X_LxR_SHIFT, ++ sta32x_limiter_release_rate); ++static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum, ++ STA32X_L2AR, STA32X_LxR_SHIFT, ++ sta32x_limiter_release_rate); + + /* byte array controls for setting biquad, mixer, scaling coefficients; + * for biquads all five coefficients need to be set in one go, diff --git a/queue-3.4/asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch b/queue-3.4/asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch new file mode 100644 index 00000000000..e81b3039e1f --- /dev/null +++ b/queue-3.4/asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch @@ -0,0 +1,46 @@ +From b3619b288b621e63f66908045f48495869a996a6 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 27 Feb 2014 07:41:32 +0100 +Subject: ASoC: sta32x: Fix wrong enum for limiter2 release rate +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Takashi Iwai + +commit b3619b288b621e63f66908045f48495869a996a6 upstream. + +There is a typo in the Limiter2 Release Rate control, a wrong enum for +Limiter1 is assigned. It must point to Limiter2. +Spotted by a compile warning: + +In file included from sound/soc/codecs/sta32x.c:34:0: +sound/soc/codecs/sta32x.c:223:29: warning: ‘sta32x_limiter2_release_rate_enum’ defined but not used [-Wunused-variable] + static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum, + ^ +include/sound/soc.h:275:18: note: in definition of macro ‘SOC_ENUM_DOUBLE_DECL’ + struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \ + ^ +sound/soc/codecs/sta32x.c:223:8: note: in expansion of macro ‘SOC_ENUM_SINGLE_DECL’ + static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum, + ^ + +Signed-off-by: Takashi Iwai +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/sta32x.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/sta32x.c ++++ b/sound/soc/codecs/sta32x.c +@@ -394,7 +394,7 @@ SOC_SINGLE_TLV("Treble Tone Control", ST + SOC_ENUM("Limiter1 Attack Rate (dB/ms)", sta32x_limiter1_attack_rate_enum), + SOC_ENUM("Limiter2 Attack Rate (dB/ms)", sta32x_limiter2_attack_rate_enum), + SOC_ENUM("Limiter1 Release Rate (dB/ms)", sta32x_limiter1_release_rate_enum), +-SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta32x_limiter1_release_rate_enum), ++SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta32x_limiter2_release_rate_enum), + + /* depending on mode, the attack/release thresholds have + * two different enum definitions; provide both diff --git a/queue-3.4/asoc-wm8770-fix-wrong-number-of-enum-items.patch b/queue-3.4/asoc-wm8770-fix-wrong-number-of-enum-items.patch new file mode 100644 index 00000000000..598f9598380 --- /dev/null +++ b/queue-3.4/asoc-wm8770-fix-wrong-number-of-enum-items.patch @@ -0,0 +1,37 @@ +From 7a6c0a58dc824523966f212c76322d47c5b0e6fe Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 18 Feb 2014 09:37:30 +0100 +Subject: ASoC: wm8770: Fix wrong number of enum items + +From: Takashi Iwai + +commit 7a6c0a58dc824523966f212c76322d47c5b0e6fe upstream. + +wm8770 codec driver defines ain_enum with a wrong number of items. + +Use SOC_ENUM_DOUBLE_DECL() macro and it's automatically fixed. + +Signed-off-by: Takashi Iwai +Acked-by: Liam Girdwood +Acked-by: Charles Keepax +Acked-by: Lars-Peter Clausen +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8770.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/wm8770.c ++++ b/sound/soc/codecs/wm8770.c +@@ -162,8 +162,8 @@ static const char *ain_text[] = { + "AIN5", "AIN6", "AIN7", "AIN8" + }; + +-static const struct soc_enum ain_enum = +- SOC_ENUM_DOUBLE(WM8770_ADCMUX, 0, 4, 8, ain_text); ++static SOC_ENUM_DOUBLE_DECL(ain_enum, ++ WM8770_ADCMUX, 0, 4, ain_text); + + static const struct snd_kcontrol_new ain_mux = + SOC_DAPM_ENUM("Capture Mux", ain_enum); diff --git a/queue-3.4/asoc-wm8958-dsp-fix-firmware-block-loading.patch b/queue-3.4/asoc-wm8958-dsp-fix-firmware-block-loading.patch new file mode 100644 index 00000000000..cebcee90ad7 --- /dev/null +++ b/queue-3.4/asoc-wm8958-dsp-fix-firmware-block-loading.patch @@ -0,0 +1,35 @@ +From 548da08fc1e245faf9b0d7c41ecd8e07984fc332 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Sat, 22 Feb 2014 18:30:13 +0100 +Subject: ASoC: wm8958-dsp: Fix firmware block loading + +From: Lars-Peter Clausen + +commit 548da08fc1e245faf9b0d7c41ecd8e07984fc332 upstream. + +The codec->control_data contains a pointer to the device's regmap struct. But +wm8994_bulk_write() expects a pointer to the parent wm8998 device. + +The issue was introduced in commit d9a7666f ("ASoC: Remove ASoC-specific +WM8994 I/O code"). + +Fixes: d9a7666f ("ASoC: Remove ASoC-specific WM8994 I/O code") +Signed-off-by: Lars-Peter Clausen +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8958-dsp2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm8958-dsp2.c ++++ b/sound/soc/codecs/wm8958-dsp2.c +@@ -153,7 +153,7 @@ static int wm8958_dsp2_fw(struct snd_soc + + data32 &= 0xffffff; + +- wm8994_bulk_write(codec->control_data, ++ wm8994_bulk_write(wm8994->wm8994, + data32 & 0xffffff, + block_len / 2, + (void *)(data + 8)); diff --git a/queue-3.4/series b/queue-3.4/series index 8c1b9bb1b40..ecb658264dc 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -17,3 +17,7 @@ net-sctp-fix-sctp_connectx-abi-for-ia32-emulation-compat-mode.patch net-add-and-use-skb_gso_transport_seglen.patch net-ip-ipv6-handle-gso-skbs-in-forwarding-path.patch alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch +asoc-wm8770-fix-wrong-number-of-enum-items.patch +asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch +asoc-sta32x-fix-array-access-overflow.patch +asoc-wm8958-dsp-fix-firmware-block-loading.patch