aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-25 08:58:37 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-06-25 08:58:37 -0400
commitd5fc3b5fe374f24b6773c22e90ef4bdda718b845 (patch)
tree3d8f2cfe059e418ad7eb37ababbc2f2cafe213c6 /sound/soc
parente2f551dacbdff8e40365a989ab66104b03316f4d (diff)
parentdd5e8e6b1d4c218d2bafe002231ec460459ab5c4 (diff)
Merge branch 'for-2.6.31' into for-2.6.32
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c10
-rw-r--r--sound/soc/codecs/ssm2602.c4
-rw-r--r--sound/soc/codecs/wm8903.c4
-rw-r--r--sound/soc/pxa/magician.c2
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c16
-rw-r--r--sound/soc/soc-core.c3
-rw-r--r--sound/soc/txx9/txx9aclc.c4
7 files changed, 23 insertions, 20 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 964824419678..af06904bab0f 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -50,6 +50,7 @@ struct bf5xx_i2s_port {
50 u16 tcr2; 50 u16 tcr2;
51 u16 rcr2; 51 u16 rcr2;
52 int counter; 52 int counter;
53 int configured;
53}; 54};
54 55
55static struct bf5xx_i2s_port bf5xx_i2s; 56static struct bf5xx_i2s_port bf5xx_i2s;
@@ -168,7 +169,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
168 break; 169 break;
169 } 170 }
170 171
171 if (bf5xx_i2s.counter == 1) { 172 if (!bf5xx_i2s.configured) {
172 /* 173 /*
173 * TX and RX are not independent,they are enabled at the 174 * TX and RX are not independent,they are enabled at the
174 * same time, even if only one side is running. So, we 175 * same time, even if only one side is running. So, we
@@ -177,6 +178,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
177 * 178 *
178 * CPU DAI:slave mode. 179 * CPU DAI:slave mode.
179 */ 180 */
181 bf5xx_i2s.configured = 1;
180 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1, 182 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
181 bf5xx_i2s.rcr2, 0, 0); 183 bf5xx_i2s.rcr2, 0, 0);
182 if (ret) { 184 if (ret) {
@@ -200,6 +202,9 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream,
200{ 202{
201 pr_debug("%s enter\n", __func__); 203 pr_debug("%s enter\n", __func__);
202 bf5xx_i2s.counter--; 204 bf5xx_i2s.counter--;
205 /* No active stream, SPORT is allowed to be configured again. */
206 if (!bf5xx_i2s.counter)
207 bf5xx_i2s.configured = 0;
203} 208}
204 209
205static int bf5xx_i2s_probe(struct platform_device *pdev, 210static int bf5xx_i2s_probe(struct platform_device *pdev,
@@ -244,8 +249,7 @@ static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
244 return 0; 249 return 0;
245} 250}
246 251
247static int bf5xx_i2s_resume(struct platform_device *pdev, 252static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
248 struct snd_soc_dai *dai)
249{ 253{
250 int ret; 254 int ret;
251 struct sport_device *sport = 255 struct sport_device *sport =
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 1fc4c8e0899c..c550750c79c0 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -375,10 +375,6 @@ static void ssm2602_shutdown(struct snd_pcm_substream *substream,
375 struct snd_soc_codec *codec = socdev->card->codec; 375 struct snd_soc_codec *codec = socdev->card->codec;
376 struct ssm2602_priv *ssm2602 = codec->private_data; 376 struct ssm2602_priv *ssm2602 = codec->private_data;
377 377
378 if (ssm2602->master_substream == substream)
379 ssm2602->master_substream = ssm2602->slave_substream;
380
381 ssm2602->slave_substream = NULL;
382 /* deactivate */ 378 /* deactivate */
383 if (!codec->active) 379 if (!codec->active)
384 ssm2602_write(codec, SSM2602_ACTIVE, 0); 380 ssm2602_write(codec, SSM2602_ACTIVE, 0);
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 6239af8fdf71..c9baeae3e275 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1255,22 +1255,18 @@ static struct {
1255 int div; 1255 int div;
1256} bclk_divs[] = { 1256} bclk_divs[] = {
1257 { 10, 0 }, 1257 { 10, 0 },
1258 { 15, 1 },
1259 { 20, 2 }, 1258 { 20, 2 },
1260 { 30, 3 }, 1259 { 30, 3 },
1261 { 40, 4 }, 1260 { 40, 4 },
1262 { 50, 5 }, 1261 { 50, 5 },
1263 { 55, 6 },
1264 { 60, 7 }, 1262 { 60, 7 },
1265 { 80, 8 }, 1263 { 80, 8 },
1266 { 100, 9 }, 1264 { 100, 9 },
1267 { 110, 10 },
1268 { 120, 11 }, 1265 { 120, 11 },
1269 { 160, 12 }, 1266 { 160, 12 },
1270 { 200, 13 }, 1267 { 200, 13 },
1271 { 220, 14 }, 1268 { 220, 14 },
1272 { 240, 15 }, 1269 { 240, 15 },
1273 { 250, 16 },
1274 { 300, 17 }, 1270 { 300, 17 },
1275 { 320, 18 }, 1271 { 320, 18 },
1276 { 440, 19 }, 1272 { 440, 19 },
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
index 9fe4ad20615c..8889cd371608 100644
--- a/sound/soc/pxa/magician.c
+++ b/sound/soc/pxa/magician.c
@@ -186,7 +186,7 @@ static int magician_playback_hw_params(struct snd_pcm_substream *substream,
186 186
187 /* set cpu DAI configuration */ 187 /* set cpu DAI configuration */
188 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_A | 188 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_A |
189 SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBS_CFS); 189 SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_CBS_CFS);
190 if (ret < 0) 190 if (ret < 0)
191 return ret; 191 return ret;
192 192
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 289fadf60b10..906709e6dd5f 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -345,9 +345,11 @@ static void lm4857_write_regs(void)
345static int lm4857_get_reg(struct snd_kcontrol *kcontrol, 345static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
346 struct snd_ctl_elem_value *ucontrol) 346 struct snd_ctl_elem_value *ucontrol)
347{ 347{
348 int reg = kcontrol->private_value & 0xFF; 348 struct soc_mixer_control *mc =
349 int shift = (kcontrol->private_value >> 8) & 0x0F; 349 (struct soc_mixer_control *)kcontrol->private_value;
350 int mask = (kcontrol->private_value >> 16) & 0xFF; 350 int reg = mc->reg;
351 int shift = mc->shift;
352 int mask = mc->max;
351 353
352 pr_debug("Entered %s\n", __func__); 354 pr_debug("Entered %s\n", __func__);
353 355
@@ -358,9 +360,11 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol,
358static int lm4857_set_reg(struct snd_kcontrol *kcontrol, 360static int lm4857_set_reg(struct snd_kcontrol *kcontrol,
359 struct snd_ctl_elem_value *ucontrol) 361 struct snd_ctl_elem_value *ucontrol)
360{ 362{
361 int reg = kcontrol->private_value & 0xFF; 363 struct soc_mixer_control *mc =
362 int shift = (kcontrol->private_value >> 8) & 0x0F; 364 (struct soc_mixer_control *)kcontrol->private_value;
363 int mask = (kcontrol->private_value >> 16) & 0xFF; 365 int reg = mc->reg;
366 int shift = mc->shift;
367 int mask = mc->max;
364 368
365 if (((lm4857_regs[reg] >> shift) & mask) == 369 if (((lm4857_regs[reg] >> shift) & mask) ==
366 ucontrol->value.integer.value[0]) 370 ucontrol->value.integer.value[0])
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 55d45c43ba16..235503230fe7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1444,6 +1444,9 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
1444 snprintf(codec->card->longname, sizeof(codec->card->longname), 1444 snprintf(codec->card->longname, sizeof(codec->card->longname),
1445 "%s (%s)", card->name, codec->name); 1445 "%s (%s)", card->name, codec->name);
1446 1446
1447 /* Make sure all DAPM widgets are instantiated */
1448 snd_soc_dapm_new_widgets(codec);
1449
1447 ret = snd_card_register(codec->card); 1450 ret = snd_card_register(codec->card);
1448 if (ret < 0) { 1451 if (ret < 0) {
1449 printk(KERN_ERR "asoc: failed to register soundcard for %s\n", 1452 printk(KERN_ERR "asoc: failed to register soundcard for %s\n",
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c
index fa336616152e..938a58a5a244 100644
--- a/sound/soc/txx9/txx9aclc.c
+++ b/sound/soc/txx9/txx9aclc.c
@@ -297,9 +297,9 @@ static int txx9aclc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
297static bool filter(struct dma_chan *chan, void *param) 297static bool filter(struct dma_chan *chan, void *param)
298{ 298{
299 struct txx9aclc_dmadata *dmadata = param; 299 struct txx9aclc_dmadata *dmadata = param;
300 char devname[BUS_ID_SIZE + 2]; 300 char devname[20 + 2]; /* FIXME: old BUS_ID_SIZE + 2 */
301 301
302 sprintf(devname, "%s.%d", dmadata->dma_res->name, 302 snprintf(devname, sizeof(devname), "%s.%d", dmadata->dma_res->name,
303 (int)dmadata->dma_res->start); 303 (int)dmadata->dma_res->start);
304 if (strcmp(dev_name(chan->device->dev), devname) == 0) { 304 if (strcmp(dev_name(chan->device->dev), devname) == 0) {
305 chan->private = &dmadata->dma_slave; 305 chan->private = &dmadata->dma_slave;