From: Greg Kroah-Hartman Date: Tue, 31 Dec 2013 05:30:09 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.76~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33de2b52de6926ff82325943501addf7e0f3bc7b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch asoc-wm5110-correct-hpout3-dapm-route-typo.patch asoc-wm8904-fix-dsp-mode-b-configuration.patch asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch --- diff --git a/queue-3.10/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch b/queue-3.10/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch new file mode 100644 index 00000000000..16d332c3fa1 --- /dev/null +++ b/queue-3.10/alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch @@ -0,0 +1,33 @@ +From ed697e1aaf7237b1a62af39f64463b05c262808d Mon Sep 17 00:00:00 2001 +From: JongHo Kim +Date: Tue, 17 Dec 2013 23:02:24 +0900 +Subject: ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function + +From: JongHo Kim + +commit ed697e1aaf7237b1a62af39f64463b05c262808d upstream. + +When the process is sleeping at the SNDRV_PCM_STATE_PAUSED +state from the wait_for_avail function, the sleep process will be woken by +timeout(10 seconds). Even if the sleep process wake up by timeout, by this +patch, the process will continue with sleep and wait for the other state. + +Signed-off-by: JongHo Kim +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/pcm_lib.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/core/pcm_lib.c ++++ b/sound/core/pcm_lib.c +@@ -1936,6 +1936,8 @@ static int wait_for_avail(struct snd_pcm + case SNDRV_PCM_STATE_DISCONNECTED: + err = -EBADFD; + goto _endloop; ++ case SNDRV_PCM_STATE_PAUSED: ++ continue; + } + if (!tout) { + snd_printd("%s write error (DMA or IRQ trouble?)\n", diff --git a/queue-3.10/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch b/queue-3.10/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch new file mode 100644 index 00000000000..07b7f7c47f5 --- /dev/null +++ b/queue-3.10/asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch @@ -0,0 +1,102 @@ +From 241bf43321a10815225f477bba96a42285a2da73 Mon Sep 17 00:00:00 2001 +From: Stephen Warren +Date: Fri, 6 Dec 2013 13:34:50 -0700 +Subject: ASoC: tegra: fix uninitialized variables in set_fmt + +From: Stephen Warren + +commit 241bf43321a10815225f477bba96a42285a2da73 upstream. + +In tegra*_i2s_set_fmt(), in the (fmt == SND_SOC_DAIFMT_CBM_CFM) case, +"val" is never assigned to, but left uninitialized. The other case does +initialized it. Fix this by initializing val at the start of the +function, and only ever ORing into it. + +Update the handling of "mask" so it works the same way for consistency. + +Update tegra20_spdif.c to use the same code-style for consistency, even +though it doesn't happen to suffer from the same problem at present. + +Signed-off-by: Stephen Warren +Reviewed-by: Thierry Reding +Signed-off-by: Mark Brown +Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly") +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/tegra/tegra20_i2s.c | 6 +++--- + sound/soc/tegra/tegra20_spdif.c | 10 +++++----- + sound/soc/tegra/tegra30_i2s.c | 6 +++--- + 3 files changed, 11 insertions(+), 11 deletions(-) + +--- a/sound/soc/tegra/tegra20_i2s.c ++++ b/sound/soc/tegra/tegra20_i2s.c +@@ -74,7 +74,7 @@ static int tegra20_i2s_set_fmt(struct sn + unsigned int fmt) + { + struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: +@@ -83,10 +83,10 @@ static int tegra20_i2s_set_fmt(struct sn + return -EINVAL; + } + +- mask = TEGRA20_I2S_CTRL_MASTER_ENABLE; ++ mask |= TEGRA20_I2S_CTRL_MASTER_ENABLE; + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: +- val = TEGRA20_I2S_CTRL_MASTER_ENABLE; ++ val |= TEGRA20_I2S_CTRL_MASTER_ENABLE; + break; + case SND_SOC_DAIFMT_CBM_CFM: + break; +--- a/sound/soc/tegra/tegra20_spdif.c ++++ b/sound/soc/tegra/tegra20_spdif.c +@@ -67,15 +67,15 @@ static int tegra20_spdif_hw_params(struc + { + struct device *dev = dai->dev; + struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + int ret, spdifclock; + +- mask = TEGRA20_SPDIF_CTRL_PACK | +- TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; ++ mask |= TEGRA20_SPDIF_CTRL_PACK | ++ TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: +- val = TEGRA20_SPDIF_CTRL_PACK | +- TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; ++ val |= TEGRA20_SPDIF_CTRL_PACK | ++ TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; + break; + default: + return -EINVAL; +--- a/sound/soc/tegra/tegra30_i2s.c ++++ b/sound/soc/tegra/tegra30_i2s.c +@@ -117,7 +117,7 @@ static int tegra30_i2s_set_fmt(struct sn + unsigned int fmt) + { + struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); +- unsigned int mask, val; ++ unsigned int mask = 0, val = 0; + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: +@@ -126,10 +126,10 @@ static int tegra30_i2s_set_fmt(struct sn + return -EINVAL; + } + +- mask = TEGRA30_I2S_CTRL_MASTER_ENABLE; ++ mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE; + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: +- val = TEGRA30_I2S_CTRL_MASTER_ENABLE; ++ val |= TEGRA30_I2S_CTRL_MASTER_ENABLE; + break; + case SND_SOC_DAIFMT_CBM_CFM: + break; diff --git a/queue-3.10/asoc-wm5110-correct-hpout3-dapm-route-typo.patch b/queue-3.10/asoc-wm5110-correct-hpout3-dapm-route-typo.patch new file mode 100644 index 00000000000..8f44c3de636 --- /dev/null +++ b/queue-3.10/asoc-wm5110-correct-hpout3-dapm-route-typo.patch @@ -0,0 +1,29 @@ +From 280484e708a3cc38fe6807718caa460e744c0b20 Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Tue, 17 Dec 2013 13:16:16 +0000 +Subject: ASoC: wm5110: Correct HPOUT3 DAPM route typo + +From: Charles Keepax + +commit 280484e708a3cc38fe6807718caa460e744c0b20 upstream. + +Reported-by: Kyung-Kwee Ryu +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm5110.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm5110.c ++++ b/sound/soc/codecs/wm5110.c +@@ -897,7 +897,7 @@ static const struct snd_soc_dapm_route w + { "HPOUT2R", NULL, "OUT2R" }, + + { "HPOUT3L", NULL, "OUT3L" }, +- { "HPOUT3R", NULL, "OUT3L" }, ++ { "HPOUT3R", NULL, "OUT3R" }, + + { "SPKOUTLN", NULL, "OUT4L" }, + { "SPKOUTLP", NULL, "OUT4L" }, diff --git a/queue-3.10/asoc-wm8904-fix-dsp-mode-b-configuration.patch b/queue-3.10/asoc-wm8904-fix-dsp-mode-b-configuration.patch new file mode 100644 index 00000000000..1f6aa950290 --- /dev/null +++ b/queue-3.10/asoc-wm8904-fix-dsp-mode-b-configuration.patch @@ -0,0 +1,32 @@ +From f0199bc5e3a3ec13f9bc938556517ec430b36437 Mon Sep 17 00:00:00 2001 +From: Bo Shen +Date: Wed, 18 Dec 2013 11:26:23 +0800 +Subject: ASoC: wm8904: fix DSP mode B configuration + +From: Bo Shen + +commit f0199bc5e3a3ec13f9bc938556517ec430b36437 upstream. + +When wm8904 work in DSP mode B, we still need to configure it to +work in DSP mode. Or else, it will work in Right Justified mode. + +Signed-off-by: Bo Shen +Acked-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8904.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/wm8904.c ++++ b/sound/soc/codecs/wm8904.c +@@ -1449,7 +1449,7 @@ static int wm8904_set_fmt(struct snd_soc + + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_B: +- aif1 |= WM8904_AIF_LRCLK_INV; ++ aif1 |= 0x3 | WM8904_AIF_LRCLK_INV; + case SND_SOC_DAIFMT_DSP_A: + aif1 |= 0x3; + break; diff --git a/queue-3.10/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch b/queue-3.10/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch new file mode 100644 index 00000000000..1a077ca7e73 --- /dev/null +++ b/queue-3.10/asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch @@ -0,0 +1,44 @@ +From 939fd1e8d9deff206f12bd9d4e54aa7a4bd0ffd6 Mon Sep 17 00:00:00 2001 +From: Charles Keepax +Date: Wed, 18 Dec 2013 09:25:49 +0000 +Subject: ASoC: wm_adsp: Add small delay while polling DSP RAM start + +From: Charles Keepax + +commit 939fd1e8d9deff206f12bd9d4e54aa7a4bd0ffd6 upstream. + +Some devices are getting very close to the limit whilst polling the RAM +start, this patch adds a small delay to this loop to give a longer +startup timeout. + +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm_adsp.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/sound/soc/codecs/wm_adsp.c ++++ b/sound/soc/codecs/wm_adsp.c +@@ -1073,13 +1073,17 @@ static int wm_adsp2_ena(struct wm_adsp * + return ret; + + /* Wait for the RAM to start, should be near instantaneous */ +- count = 0; +- do { ++ for (count = 0; count < 10; ++count) { + ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, + &val); + if (ret != 0) + return ret; +- } while (!(val & ADSP2_RAM_RDY) && ++count < 10); ++ ++ if (val & ADSP2_RAM_RDY) ++ break; ++ ++ msleep(1); ++ } + + if (!(val & ADSP2_RAM_RDY)) { + adsp_err(dsp, "Failed to start DSP RAM\n"); diff --git a/queue-3.10/series b/queue-3.10/series index 855699fa386..6f06d5f4fd3 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -4,3 +4,8 @@ ceph-wake-up-safe-waiters-when-unregistering-request.patch powerpc-kvm-fix-rare-but-potential-deadlock-scene.patch tty-pmac_zilog-check-existence-of-ports-in-pmz_console_init.patch staging-comedi-8255_pci-fix-for-newer-pci-dio48h.patch +asoc-tegra-fix-uninitialized-variables-in-set_fmt.patch +asoc-wm8904-fix-dsp-mode-b-configuration.patch +asoc-wm_adsp-add-small-delay-while-polling-dsp-ram-start.patch +asoc-wm5110-correct-hpout3-dapm-route-typo.patch +alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch