Commit 1c2f9548 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 59068e36 e9e7183f
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
Required properties: Required properties:
- compatible : "fsl,sgtl5000". - compatible : "fsl,sgtl5000".
- reg : the I2C address of the device
Example: Example:
codec: sgtl5000@0a { codec: sgtl5000@0a {
......
...@@ -99,6 +99,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = { ...@@ -99,6 +99,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
.platform_name = "bfin-i2s-pcm-audio", .platform_name = "bfin-i2s-pcm-audio",
.codec_name = "ssm2602.0-001b", .codec_name = "ssm2602.0-001b",
.ops = &bf5xx_ssm2602_ops, .ops = &bf5xx_ssm2602_ops,
.dai_fmt = BF5XX_SSM2602_DAIFMT,
}, },
{ {
.name = "ssm2602", .name = "ssm2602",
...@@ -108,6 +109,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = { ...@@ -108,6 +109,7 @@ static struct snd_soc_dai_link bf5xx_ssm2602_dai[] = {
.platform_name = "bfin-i2s-pcm-audio", .platform_name = "bfin-i2s-pcm-audio",
.codec_name = "ssm2602.0-001b", .codec_name = "ssm2602.0-001b",
.ops = &bf5xx_ssm2602_ops, .ops = &bf5xx_ssm2602_ops,
.dai_fmt = BF5XX_SSM2602_DAIFMT,
}, },
}; };
......
...@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai, ...@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level) enum snd_soc_bias_level level)
{ {
u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f; u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
switch (level) { switch (level) {
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
...@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, ...@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_OFF: case SND_SOC_BIAS_OFF:
/* everything off, dac mute, inactive */ /* everything off, dac mute, inactive */
snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
snd_soc_write(codec, TLV320AIC23_PWR, 0xffff); snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
break; break;
} }
codec->dapm.bias_level = level; codec->dapm.bias_level = level;
......
...@@ -60,7 +60,7 @@ struct wm8350_jack_data { ...@@ -60,7 +60,7 @@ struct wm8350_jack_data {
}; };
struct wm8350_data { struct wm8350_data {
struct snd_soc_codec codec; struct wm8350 *wm8350;
struct wm8350_output out1; struct wm8350_output out1;
struct wm8350_output out2; struct wm8350_output out2;
struct wm8350_jack_data hpl; struct wm8350_jack_data hpl;
...@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv, ...@@ -1309,7 +1309,7 @@ static void wm8350_hp_work(struct wm8350_data *priv,
struct wm8350_jack_data *jack, struct wm8350_jack_data *jack,
u16 mask) u16 mask)
{ {
struct wm8350 *wm8350 = priv->codec.control_data; struct wm8350 *wm8350 = priv->wm8350;
u16 reg; u16 reg;
int report; int report;
...@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work) ...@@ -1342,7 +1342,7 @@ static void wm8350_hpr_work(struct work_struct *work)
static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
{ {
struct wm8350_data *priv = data; struct wm8350_data *priv = data;
struct wm8350 *wm8350 = priv->codec.control_data; struct wm8350 *wm8350 = priv->wm8350;
struct wm8350_jack_data *jack = NULL; struct wm8350_jack_data *jack = NULL;
switch (irq - wm8350->irq_base) { switch (irq - wm8350->irq_base) {
...@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect); ...@@ -1427,7 +1427,7 @@ EXPORT_SYMBOL_GPL(wm8350_hp_jack_detect);
static irqreturn_t wm8350_mic_handler(int irq, void *data) static irqreturn_t wm8350_mic_handler(int irq, void *data)
{ {
struct wm8350_data *priv = data; struct wm8350_data *priv = data;
struct wm8350 *wm8350 = priv->codec.control_data; struct wm8350 *wm8350 = priv->wm8350;
u16 reg; u16 reg;
int report = 0; int report = 0;
...@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) ...@@ -1536,6 +1536,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
return -ENOMEM; return -ENOMEM;
snd_soc_codec_set_drvdata(codec, priv); snd_soc_codec_set_drvdata(codec, priv);
priv->wm8350 = wm8350;
for (i = 0; i < ARRAY_SIZE(supply_names); i++) for (i = 0; i < ARRAY_SIZE(supply_names); i++)
priv->supplies[i].supply = supply_names[i]; priv->supplies[i].supply = supply_names[i];
...@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) ...@@ -1544,7 +1546,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
if (ret != 0) if (ret != 0)
return ret; return ret;
wm8350->codec.codec = codec;
codec->control_data = wm8350; codec->control_data = wm8350;
/* Put the codec into reset if it wasn't already */ /* Put the codec into reset if it wasn't already */
......
...@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, ...@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level) enum snd_soc_bias_level level)
{ {
struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
int val; int mask, val;
switch (level) { switch (level) {
case SND_SOC_BIAS_STANDBY: case SND_SOC_BIAS_STANDBY:
...@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, ...@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_ON: case SND_SOC_BIAS_ON:
/* Turn off any unneded single ended outputs */ /* Turn off any unneded single ended outputs */
val = 0; val = 0;
mask = 0;
if (hubs->lineout1_se)
mask |= WM8993_LINEOUT1N_ENA | WM8993_LINEOUT1P_ENA;
if (hubs->lineout2_se)
mask |= WM8993_LINEOUT2N_ENA | WM8993_LINEOUT2P_ENA;
if (hubs->lineout1_se && hubs->lineout1n_ena) if (hubs->lineout1_se && hubs->lineout1n_ena)
val |= WM8993_LINEOUT1N_ENA; val |= WM8993_LINEOUT1N_ENA;
...@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec, ...@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
val |= WM8993_LINEOUT2P_ENA; val |= WM8993_LINEOUT2P_ENA;
snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3, snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3,
WM8993_LINEOUT1N_ENA | mask, val);
WM8993_LINEOUT1P_ENA |
WM8993_LINEOUT2N_ENA |
WM8993_LINEOUT2P_ENA,
val);
/* Remove the input clamps */ /* Remove the input clamps */
snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG, snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,
......
...@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) ...@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
} }
out: out:
/* free preallocated buffers in case of error */
if (ret)
omap_pcm_free_dma_buffers(pcm);
return ret; return ret;
} }
......
...@@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = { ...@@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev) static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev)
{ {
return snd_soc_register_dai(&pdev->dev, &s3c2412_i2s_dai); return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
} }
static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev) static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)
......
...@@ -3625,9 +3625,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, ...@@ -3625,9 +3625,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
int i, ret; int i, ret;
num_routes = of_property_count_strings(np, propname); num_routes = of_property_count_strings(np, propname);
if (num_routes & 1) { if (num_routes < 0 || num_routes & 1) {
dev_err(card->dev, dev_err(card->dev,
"Property '%s's length is not even\n", "Property '%s' does not exist or its length is not even\n",
propname); propname);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment