aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-05 03:12:21 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-05 03:12:21 -0400
commit4e29402fe4b2006c994eed5020c42b2cc87d9b42 (patch)
treec0229c107045ab21487729f6a6cab6b70ed30bfa /sound
parentf8852b12200df393b0a4db1a7052454bbc335443 (diff)
parent00b317a41c5428b13eb7e5b4bbc691b1aa7afa80 (diff)
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc
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 8808b82311b1..76e0d5695075 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)
140 if (!prtd || !prtd->params) 140 if (!prtd || !prtd->params)
141 return 0; 141 return 0;
142 142
143 if (prtd->dma_ch == -1)
144 return -EINVAL;
145
143 DCSR(prtd->dma_ch) &= ~DCSR_RUN; 146 DCSR(prtd->dma_ch) &= ~DCSR_RUN;
144 DCSR(prtd->dma_ch) = 0; 147 DCSR(prtd->dma_ch) = 0;
145 DCMD(prtd->dma_ch) = 0; 148 DCMD(prtd->dma_ch) = 0;
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 02fb66416ddc..2ce0b2d891d5 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)
65 if (prtd->dma_ch >= 0) { 65 if (prtd->dma_ch >= 0) {
66 pxa_free_dma(prtd->dma_ch); 66 pxa_free_dma(prtd->dma_ch);
67 prtd->dma_ch = -1; 67 prtd->dma_ch = -1;
68 prtd->params = NULL;
68 } 69 }
69 70
70 return 0; 71 return 0;
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index ac577263b3e3..b6445757fc54 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[] = {
167 .codec_name = "wm9713-codec", 167 .codec_name = "wm9713-codec",
168 .platform_name = "pxa-pcm-audio", 168 .platform_name = "pxa-pcm-audio",
169 .cpu_dai_name = "pxa2xx-ac97", 169 .cpu_dai_name = "pxa2xx-ac97",
170 .codec_name = "wm9713-hifi", 170 .codec_dai_name = "wm9713-hifi",
171 .init = zylonite_wm9713_init, 171 .init = zylonite_wm9713_init,
172}, 172},
173{ 173{
@@ -176,7 +176,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
176 .codec_name = "wm9713-codec", 176 .codec_name = "wm9713-codec",
177 .platform_name = "pxa-pcm-audio", 177 .platform_name = "pxa-pcm-audio",
178 .cpu_dai_name = "pxa2xx-ac97-aux", 178 .cpu_dai_name = "pxa2xx-ac97-aux",
179 .codec_name = "wm9713-aux", 179 .codec_dai_name = "wm9713-aux",
180}, 180},
181{ 181{
182 .name = "WM9713 Voice", 182 .name = "WM9713 Voice",
@@ -184,7 +184,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
184 .codec_name = "wm9713-codec", 184 .codec_name = "wm9713-codec",
185 .platform_name = "pxa-pcm-audio", 185 .platform_name = "pxa-pcm-audio",
186 .cpu_dai_name = "pxa-ssp-dai.2", 186 .cpu_dai_name = "pxa-ssp-dai.2",
187 .codec_name = "wm9713-voice", 187 .codec_dai_name = "wm9713-voice",
188 .ops = &zylonite_voice_ops, 188 .ops = &zylonite_voice_ops,
189}, 189},
190}; 190};
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4dda58926bc5..b76b74db0968 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)
92static int format_register_str(struct snd_soc_codec *codec, 92static int format_register_str(struct snd_soc_codec *codec,
93 unsigned int reg, char *buf, size_t len) 93 unsigned int reg, char *buf, size_t len)
94{ 94{
95 int wordsize = codec->driver->reg_word_size * 2; 95 int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
96 int regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; 96 int regsize = codec->driver->reg_word_size * 2;
97 int ret; 97 int ret;
98 char tmpbuf[len + 1]; 98 char tmpbuf[len + 1];
99 char regbuf[regsize + 1]; 99 char regbuf[regsize + 1];
@@ -132,8 +132,8 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf,
132 size_t total = 0; 132 size_t total = 0;
133 loff_t p = 0; 133 loff_t p = 0;
134 134
135 wordsize = codec->driver->reg_word_size * 2; 135 wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2;
136 regsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; 136 regsize = codec->driver->reg_word_size * 2;
137 137
138 len = wordsize + regsize + 2 + 1; 138 len = wordsize + regsize + 2 + 1;
139 139