aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-05 05:25:17 -0400
committerTakashi Iwai <tiwai@suse.de>2012-05-05 05:25:17 -0400
commit20c76945d05e26dc24eabcfc2f61f3929590cc29 (patch)
tree73238b71823f829413a51923df6179e7fd122ab6 /sound
parentcff7873554eedc044029c41a9fd694245d97eff8 (diff)
parent06412088ce98f745405b8f65cfc51ddd6b842bbf (diff)
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for 3.4 Nothing terribly exciting here, a bunch of small and simple fixes scattered around the place.
Diffstat (limited to 'sound')
-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/samsung/s3c2412-i2s.c2
-rw-r--r--sound/soc/soc-core.c6
6 files changed, 23 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/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 3a4e93e52b6d..b390f00b4e99 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3631,10 +3631,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
3631 int i, ret; 3631 int i, ret;
3632 3632
3633 num_routes = of_property_count_strings(np, propname); 3633 num_routes = of_property_count_strings(np, propname);
3634 if (num_routes & 1) { 3634 if (num_routes < 0 || num_routes & 1) {
3635 dev_err(card->dev, 3635 dev_err(card->dev,
3636 "Property '%s's length is not even\n", 3636 "Property '%s' does not exist or its length is not even\n",
3637 propname); 3637 propname);
3638 return -EINVAL; 3638 return -EINVAL;
3639 } 3639 }
3640 num_routes /= 2; 3640 num_routes /= 2;