aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-05 13:07:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-05 13:07:06 -0400
commit1c2f95480648ed7326ab2288ca0e2d35551db4be (patch)
treefa69d267423242eaad195e60c74570152e6c3d84 /sound/soc
parent59068e369b6a2a0a15b93624887525d9ec0f36e5 (diff)
parente9e7183fd2677aca24e90ca1556d4afe7436d42d (diff)
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound sound fixes from Takashi Iwai: "As good as nothing exciting here; just a few trivial fixes for various ASoC stuff." * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: omap-pcm: Free dma buffers in case of error. ASoC: s3c2412-i2s: Fix dai registration ASoC: wm8350: Don't use locally allocated codec struct ASoC: tlv312aic23: unbreak resume ASoC: bf5xx-ssm2602: Set DAI format ASoC: core: check of_property_count_strings failure ASoC: dt: sgtl5000.txt: Add description for 'reg' field ASoC: wm_hubs: Make sure we don't disable differential line outputs
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/blackfin/bf5xx-ssm2602.c2
-rw-r--r--sound/soc/codecs/tlv320aic23.c4
-rw-r--r--sound/soc/codecs/wm8350.c11
-rw-r--r--sound/soc/codecs/wm_hubs.c15
-rw-r--r--sound/soc/omap/omap-pcm.c4
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c2
-rw-r--r--sound/soc/soc-core.c6
7 files changed, 27 insertions, 17 deletions
diff --git a/sound/soc/blackfin/bf5xx-ssm2602.c b/sound/soc/blackfin/bf5xx-ssm2602.c
index df3ac73f8778..b39ad356b92b 100644
--- a/sound/soc/blackfin/bf5xx-ssm2602.c
+++ b/sound/soc/blackfin/bf5xx-ssm2602.c
@@ -99,6 +99,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
99 .platform_name = "bfin-i2s-pcm-audio", 99 .platform_name = "bfin-i2s-pcm-audio",
100 .codec_name = "ssm2602.0-001b", 100 .codec_name = "ssm2602.0-001b",
101 .ops = &bf5xx_ssm2602_ops, 101 .ops = &bf5xx_ssm2602_ops,
102 .dai_fmt = BF5XX_SSM2602_DAIFMT,
102 }, 103 },
103 { 104 {
104 .name = "ssm2602", 105 .name = "ssm2602",
@@ -108,6 +109,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
108 .platform_name = "bfin-i2s-pcm-audio", 109 .platform_name = "bfin-i2s-pcm-audio",
109 .codec_name = "ssm2602.0-001b", 110 .codec_name = "ssm2602.0-001b",
110 .ops = &bf5xx_ssm2602_ops, 111 .ops = &bf5xx_ssm2602_ops,
112 .dai_fmt = BF5XX_SSM2602_DAIFMT,
111 }, 113 },
112}; 114};
113 115
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 16d55f91a653..df1e07ffac32 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
472static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, 472static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
473 enum snd_soc_bias_level level) 473 enum snd_soc_bias_level level)
474{ 474{
475 u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f; 475 u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
476 476
477 switch (level) { 477 switch (level) {
478 case SND_SOC_BIAS_ON: 478 case SND_SOC_BIAS_ON:
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
491 case SND_SOC_BIAS_OFF: 491 case SND_SOC_BIAS_OFF:
492 /* everything off, dac mute, inactive */ 492 /* everything off, dac mute, inactive */
493 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); 493 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
494 snd_soc_write(codec, TLV320AIC23_PWR, 0xffff); 494 snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
495 break; 495 break;
496 } 496 }
497 codec->dapm.bias_level = level; 497 codec->dapm.bias_level = level;
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 8c4c9591ec05..aa12c6b6beeb 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -60,7 +60,7 @@ struct wm8350_jack_data {
60}; 60};
61 61
62struct wm8350_data { 62struct wm8350_data {
63 struct snd_soc_codec codec; 63 struct wm8350 *wm8350;
64 struct wm8350_output out1; 64 struct wm8350_output out1;
65 struct wm8350_output out2; 65 struct wm8350_output out2;
66 struct wm8350_jack_data hpl; 66 struct wm8350_jack_data hpl;
@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv,
1309 struct wm8350_jack_data *jack, 1309 struct wm8350_jack_data *jack,
1310 u16 mask) 1310 u16 mask)
1311{ 1311{
1312 struct wm8350 *wm8350 = priv->codec.control_data; 1312 struct wm8350 *wm8350 = priv->wm8350;
1313 u16 reg; 1313 u16 reg;
1314 int report; 1314 int report;
1315 1315
@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work)
1342static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) 1342static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
1343{ 1343{
1344 struct wm8350_data *priv = data; 1344 struct wm8350_data *priv = data;
1345 struct wm8350 *wm8350 = priv->codec.control_data; 1345 struct wm8350 *wm8350 = priv->wm8350;
1346 struct wm8350_jack_data *jack = NULL; 1346 struct wm8350_jack_data *jack = NULL;
1347 1347
1348 switch (irq - wm8350->irq_base) { 1348 switch (irq - wm8350->irq_base) {
@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect);
1427static irqreturn_t wm8350_mic_handler(int irq, void *data) 1427static irqreturn_t wm8350_mic_handler(int irq, void *data)
1428{ 1428{
1429 struct wm8350_data *priv = data; 1429 struct wm8350_data *priv = data;
1430 struct wm8350 *wm8350 = priv->codec.control_data; 1430 struct wm8350 *wm8350 = priv->wm8350;
1431 u16 reg; 1431 u16 reg;
1432 int report = 0; 1432 int report = 0;
1433 1433
@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
1536 return -ENOMEM; 1536 return -ENOMEM;
1537 snd_soc_codec_set_drvdata(codec, priv); 1537 snd_soc_codec_set_drvdata(codec, priv);
1538 1538
1539 priv->wm8350 = wm8350;
1540
1539 for (i = 0; i < ARRAY_SIZE(supply_names); i++) 1541 for (i = 0; i < ARRAY_SIZE(supply_names); i++)
1540 priv->supplies[i].supply = supply_names[i]; 1542 priv->supplies[i].supply = supply_names[i];
1541 1543
@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
1544 if (ret != 0) 1546 if (ret != 0)
1545 return ret; 1547 return ret;
1546 1548
1547 wm8350->codec.codec = codec;
1548 codec->control_data = wm8350; 1549 codec->control_data = wm8350;
1549 1550
1550 /* Put the codec into reset if it wasn't already */ 1551 /* Put the codec into reset if it wasn't already */
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index f13f2886339c..6c028c470601 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
1035 enum snd_soc_bias_level level) 1035 enum snd_soc_bias_level level)
1036{ 1036{
1037 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); 1037 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
1038 int val; 1038 int mask, val;
1039 1039
1040 switch (level) { 1040 switch (level) {
1041 case SND_SOC_BIAS_STANDBY: 1041 case SND_SOC_BIAS_STANDBY:
@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
1047 case SND_SOC_BIAS_ON: 1047 case SND_SOC_BIAS_ON:
1048 /* Turn off any unneded single ended outputs */ 1048 /* Turn off any unneded single ended outputs */
1049 val = 0; 1049 val = 0;
1050 mask = 0;
1051
1052 if (hubs->lineout1_se)
1053 mask |= WM8993_LINEOUT1N_ENA | WM8993_LINEOUT1P_ENA;
1054
1055 if (hubs->lineout2_se)
1056 mask |= WM8993_LINEOUT2N_ENA | WM8993_LINEOUT2P_ENA;
1050 1057
1051 if (hubs->lineout1_se && hubs->lineout1n_ena) 1058 if (hubs->lineout1_se && hubs->lineout1n_ena)
1052 val |= WM8993_LINEOUT1N_ENA; 1059 val |= WM8993_LINEOUT1N_ENA;
@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
1061 val |= WM8993_LINEOUT2P_ENA; 1068 val |= WM8993_LINEOUT2P_ENA;
1062 1069
1063 snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3, 1070 snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3,
1064 WM8993_LINEOUT1N_ENA | 1071 mask, val);
1065 WM8993_LINEOUT1P_ENA |
1066 WM8993_LINEOUT2N_ENA |
1067 WM8993_LINEOUT2P_ENA,
1068 val);
1069 1072
1070 /* Remove the input clamps */ 1073 /* Remove the input clamps */
1071 snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, 1074 snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index a59bd352d342..5a649da9122a 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
401 } 401 }
402 402
403out: 403out:
404 /* free preallocated buffers in case of error */
405 if (ret)
406 omap_pcm_free_dma_buffers(pcm);
407
404 return ret; 408 return ret;
405} 409}
406 410
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 72185078ddf8..79fbeea99d46 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
166 166
167static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) 167static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev)
168{ 168{
169 return snd_soc_register_dai(&pdev->dev, &s3c2412_i2s_dai); 169 return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
170} 170}
171 171
172static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) 172static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1d6a80c9f4c2..c88d9741b9e7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3625,10 +3625,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
3625 int i, ret; 3625 int i, ret;
3626 3626
3627 num_routes = of_property_count_strings(np, propname); 3627 num_routes = of_property_count_strings(np, propname);
3628 if (num_routes & 1) { 3628 if (num_routes < 0 || num_routes & 1) {
3629 dev_err(card->dev, 3629 dev_err(card->dev,
3630 "Property '%s's length is not even\n", 3630 "Property '%s' does not exist or its length is not even\n",
3631 propname); 3631 propname);
3632 return -EINVAL; 3632 return -EINVAL;
3633 } 3633 }
3634 num_routes /= 2; 3634 num_routes /= 2;