summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-09 10:05:30 +0200
committerTakashi Iwai <tiwai@suse.de>2011-04-09 10:05:30 +0200
commit664cee46e755b37204f1731cb8726db610f3486d (patch)
tree11ed0d43eff14123534785cf25c0a2143e134e7e /sound
parenta0334c50bf0ba7c720ed00f931e721c989efd233 (diff)
parent4e29402fe4b2006c994eed5020c42b2cc87d9b42 (diff)
downloadlinux-3.10-664cee46e755b37204f1731cb8726db610f3486d.tar.gz
linux-3.10-664cee46e755b37204f1731cb8726db610f3486d.tar.bz2
linux-3.10-664cee46e755b37204f1731cb8726db610f3486d.zip
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'sound')
-rw-r--r--sound/arm/pxa2xx-pcm-lib.c3
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c1
-rw-r--r--sound/soc/pxa/zylonite.c6
-rw-r--r--sound/soc/soc-core.c8
4 files changed, 11 insertions, 7 deletions
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index 8808b82311b..76e0d569507 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -140,6 +140,9 @@ int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream)
if (!prtd || !prtd->params)
return 0;
+ if (prtd->dma_ch == -1)
+ return -EINVAL;
+
DCSR(prtd->dma_ch) &= ~DCSR_RUN;
DCSR(prtd->dma_ch) = 0;
DCMD(prtd->dma_ch) = 0;
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 02fb66416dd..2ce0b2d891d 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -65,6 +65,7 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
if (prtd->dma_ch >= 0) {
pxa_free_dma(prtd->dma_ch);
prtd->dma_ch = -1;
+ prtd->params = NULL;
}
return 0;
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index ac577263b3e..b6445757fc5 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -167,7 +167,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
.codec_name = "wm9713-codec",
.platform_name = "pxa-pcm-audio",
.cpu_dai_name = "pxa2xx-ac97",
- .codec_name = "wm9713-hifi",
+ .codec_dai_name = "wm9713-hifi",
.init = zylonite_wm9713_init,
},
{
@@ -176,7 +176,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
.codec_name = "wm9713-codec",
.platform_name = "pxa-pcm-audio",
.cpu_dai_name = "pxa2xx-ac97-aux",
- .codec_name = "wm9713-aux",
+ .codec_dai_name = "wm9713-aux",
},
{
.name = "WM9713 Voice",
@@ -184,7 +184,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
.codec_name = "wm9713-codec",
.platform_name = "pxa-pcm-audio",
.cpu_dai_name = "pxa-ssp-dai.2",
- .codec_name = "wm9713-voice",
+ .codec_dai_name = "wm9713-voice",
.ops = &zylonite_voice_ops,
},
};
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4dda58926bc..b76b74db096 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -92,8 +92,8 @@ static int min_bytes_needed(unsigned long val)
static int format_register_str(struct snd_soc_codec *codec,
unsigned int reg, char *buf, size_t len)
{
- int wordsize = codec->driver->reg_word_size * 2;
- int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+ int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+ int regsize = codec->driver->reg_word_size * 2;
int ret;
char tmpbuf[len + 1];
char regbuf[regsize + 1];
@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
size_t total = 0;
loff_t p = 0;
- wordsize = codec->driver->reg_word_size * 2;
- regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+ wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
+ regsize = codec->driver->reg_word_size * 2;
len = wordsize + regsize + 2 + 1;