Skip to content

Commit 1c2f954

Browse files
committed
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
2 parents 59068e3 + e9e7183 commit 1c2f954

File tree

8 files changed

+29
-17
lines changed

8 files changed

+29
-17
lines changed

Documentation/devicetree/bindings/sound/sgtl5000.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Required properties:
44
- compatible : "fsl,sgtl5000".
55

6+
- reg : the I2C address of the device
7+
68
Example:
79

810
codec: sgtl5000@0a {

sound/soc/blackfin/bf5xx-ssm2602.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
9999
.platform_name = "bfin-i2s-pcm-audio",
100100
.codec_name = "ssm2602.0-001b",
101101
.ops = &bf5xx_ssm2602_ops,
102+
.dai_fmt = BF5XX_SSM2602_DAIFMT,
102103
},
103104
{
104105
.name = "ssm2602",
@@ -108,6 +109,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
108109
.platform_name = "bfin-i2s-pcm-audio",
109110
.codec_name = "ssm2602.0-001b",
110111
.ops = &bf5xx_ssm2602_ops,
112+
.dai_fmt = BF5XX_SSM2602_DAIFMT,
111113
},
112114
};
113115

sound/soc/codecs/tlv320aic23.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
472472
static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
473473
enum snd_soc_bias_level level)
474474
{
475-
u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f;
475+
u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
476476

477477
switch (level) {
478478
case SND_SOC_BIAS_ON:
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
491491
case SND_SOC_BIAS_OFF:
492492
/* everything off, dac mute, inactive */
493493
snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
494-
snd_soc_write(codec, TLV320AIC23_PWR, 0xffff);
494+
snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
495495
break;
496496
}
497497
codec->dapm.bias_level = level;

sound/soc/codecs/wm8350.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct wm8350_jack_data {
6060
};
6161

6262
struct wm8350_data {
63-
struct snd_soc_codec codec;
63+
struct wm8350 *wm8350;
6464
struct wm8350_output out1;
6565
struct wm8350_output out2;
6666
struct wm8350_jack_data hpl;
@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv,
13091309
struct wm8350_jack_data *jack,
13101310
u16 mask)
13111311
{
1312-
struct wm8350 *wm8350 = priv->codec.control_data;
1312+
struct wm8350 *wm8350 = priv->wm8350;
13131313
u16 reg;
13141314
int report;
13151315

@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work)
13421342
static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
13431343
{
13441344
struct wm8350_data *priv = data;
1345-
struct wm8350 *wm8350 = priv->codec.control_data;
1345+
struct wm8350 *wm8350 = priv->wm8350;
13461346
struct wm8350_jack_data *jack = NULL;
13471347

13481348
switch (irq - wm8350->irq_base) {
@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect);
14271427
static irqreturn_t wm8350_mic_handler(int irq, void *data)
14281428
{
14291429
struct wm8350_data *priv = data;
1430-
struct wm8350 *wm8350 = priv->codec.control_data;
1430+
struct wm8350 *wm8350 = priv->wm8350;
14311431
u16 reg;
14321432
int report = 0;
14331433

@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
15361536
return -ENOMEM;
15371537
snd_soc_codec_set_drvdata(codec, priv);
15381538

1539+
priv->wm8350 = wm8350;
1540+
15391541
for (i = 0; i < ARRAY_SIZE(supply_names); i++)
15401542
priv->supplies[i].supply = supply_names[i];
15411543

@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
15441546
if (ret != 0)
15451547
return ret;
15461548

1547-
wm8350->codec.codec = codec;
15481549
codec->control_data = wm8350;
15491550

15501551
/* Put the codec into reset if it wasn't already */

sound/soc/codecs/wm_hubs.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10351035
enum snd_soc_bias_level level)
10361036
{
10371037
struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
1038-
int val;
1038+
int mask, val;
10391039

10401040
switch (level) {
10411041
case SND_SOC_BIAS_STANDBY:
@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10471047
case SND_SOC_BIAS_ON:
10481048
/* Turn off any unneded single ended outputs */
10491049
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;
10501057

10511058
if (hubs->lineout1_se && hubs->lineout1n_ena)
10521059
val |= WM8993_LINEOUT1N_ENA;
@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10611068
val |= WM8993_LINEOUT2P_ENA;
10621069

10631070
snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3,
1064-
WM8993_LINEOUT1N_ENA |
1065-
WM8993_LINEOUT1P_ENA |
1066-
WM8993_LINEOUT2N_ENA |
1067-
WM8993_LINEOUT2P_ENA,
1068-
val);
1071+
mask, val);
10691072

10701073
/* Remove the input clamps */
10711074
snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,

sound/soc/omap/omap-pcm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
401401
}
402402

403403
out:
404+
/* free preallocated buffers in case of error */
405+
if (ret)
406+
omap_pcm_free_dma_buffers(pcm);
407+
404408
return ret;
405409
}
406410

sound/soc/samsung/s3c2412-i2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
166166

167167
static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev)
168168
{
169-
return snd_soc_register_dai(&pdev->dev, &s3c2412_i2s_dai);
169+
return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
170170
}
171171

172172
static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)

sound/soc/soc-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3625,10 +3625,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
36253625
int i, ret;
36263626

36273627
num_routes = of_property_count_strings(np, propname);
3628-
if (num_routes & 1) {
3628+
if (num_routes < 0 || num_routes & 1) {
36293629
dev_err(card->dev,
3630-
"Property '%s's length is not even\n",
3631-
propname);
3630+
"Property '%s' does not exist or its length is not even\n",
3631+
propname);
36323632
return -EINVAL;
36333633
}
36343634
num_routes /= 2;

0 commit comments

Comments
 (0)