--- /dev/null
+From ed697e1aaf7237b1a62af39f64463b05c262808d Mon Sep 17 00:00:00 2001
+From: JongHo Kim <furmuwon@gmail.com>
+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 <furmuwon@gmail.com>
+
+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 <furmuwon@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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",
--- /dev/null
+From 241bf43321a10815225f477bba96a42285a2da73 Mon Sep 17 00:00:00 2001
+From: Stephen Warren <swarren@nvidia.com>
+Date: Fri, 6 Dec 2013 13:34:50 -0700
+Subject: ASoC: tegra: fix uninitialized variables in set_fmt
+
+From: Stephen Warren <swarren@nvidia.com>
+
+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 <swarren@nvidia.com>
+Reviewed-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Fixes: 0f163546a772 ("ASoC: tegra: use regmap more directly")
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
--- /dev/null
+From 280484e708a3cc38fe6807718caa460e744c0b20 Mon Sep 17 00:00:00 2001
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Date: Tue, 17 Dec 2013 13:16:16 +0000
+Subject: ASoC: wm5110: Correct HPOUT3 DAPM route typo
+
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+
+commit 280484e708a3cc38fe6807718caa460e744c0b20 upstream.
+
+Reported-by: Kyung-Kwee Ryu <kyung-kwee.ryu@wolfsonmicro.com>
+Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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" },
--- /dev/null
+From f0199bc5e3a3ec13f9bc938556517ec430b36437 Mon Sep 17 00:00:00 2001
+From: Bo Shen <voice.shen@atmel.com>
+Date: Wed, 18 Dec 2013 11:26:23 +0800
+Subject: ASoC: wm8904: fix DSP mode B configuration
+
+From: Bo Shen <voice.shen@atmel.com>
+
+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 <voice.shen@atmel.com>
+Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
--- /dev/null
+From 939fd1e8d9deff206f12bd9d4e54aa7a4bd0ffd6 Mon Sep 17 00:00:00 2001
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+Date: Wed, 18 Dec 2013 09:25:49 +0000
+Subject: ASoC: wm_adsp: Add small delay while polling DSP RAM start
+
+From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
+
+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 <ckeepax@opensource.wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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");
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