Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223370
b: refs/heads/master
c: 8cd1fd2
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Dec 17, 2010
1 parent f80ab06 commit 36102a1
Show file tree
Hide file tree
Showing 38 changed files with 124 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53e8c3239bcc7b89c76179fd33fb6faa3413c00d
refs/heads/master: 8cd1fd2526a78eaa1785a8ae3fe9f45a8ddd0e17
2 changes: 1 addition & 1 deletion trunk/include/linux/mfd/wm8994/pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct wm8994_ldo_pdata {
#define WM8994_CONFIGURE_GPIO 0x8000

#define WM8994_DRC_REGS 5
#define WM8994_EQ_REGS 19
#define WM8994_EQ_REGS 20

/**
* DRC configurations are specified with a label and a set of register
Expand Down
9 changes: 6 additions & 3 deletions trunk/sound/soc/atmel/sam9g20_wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ static int __init at91sam9g20ek_init(void)
}

pllb = clk_get(NULL, "pllb");
if (IS_ERR(mclk)) {
if (IS_ERR(pllb)) {
printk(KERN_ERR "ASoC: Failed to get PLLB\n");
ret = PTR_ERR(mclk);
ret = PTR_ERR(pllb);
goto err_mclk;
}
ret = clk_set_parent(mclk, pllb);
Expand All @@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void)
if (!at91sam9g20ek_snd_device) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
ret = -ENOMEM;
goto err_mclk;
}

platform_set_drvdata(at91sam9g20ek_snd_device,
Expand All @@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void)
ret = platform_device_add(at91sam9g20ek_snd_device);
if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(at91sam9g20ek_snd_device);
goto err_device_add;
}

return ret;

err_device_add:
platform_device_put(at91sam9g20ek_snd_device);
err_mclk:
clk_put(mclk);
mclk = NULL;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/atmel/snd-soc-afeb9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ static int __init afeb9260_soc_init(void)

return 0;
err1:
platform_device_del(afeb9260_snd_device);
platform_device_put(afeb9260_snd_device);
return err;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/soc/codecs/max98088.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,10 @@ static int max98088_probe(struct snd_soc_codec *codec)

static int max98088_remove(struct snd_soc_codec *codec)
{
struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);

max98088_set_bias_level(codec, SND_SOC_BIAS_OFF);
kfree(max98088->eq_texts);

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/stac9766.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
.reg_cache_size = sizeof(stac9766_reg),
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = stac9766_reg,
};

static __devinit int stac9766_probe(struct platform_device *pdev)
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_gpio);
int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio)
{
u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG;
u8 val, bit = gpio ? 2: 1;
u8 val = 0, bit = gpio ? 2 : 1;

aic3x_read(codec, reg, &val);
return (val >> bit) & 1;
Expand Down Expand Up @@ -1204,15 +1204,15 @@ EXPORT_SYMBOL_GPL(aic3x_set_headset_detection);

int aic3x_headset_detected(struct snd_soc_codec *codec)
{
u8 val;
u8 val = 0;
aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
return (val >> 4) & 1;
}
EXPORT_SYMBOL_GPL(aic3x_headset_detected);

int aic3x_button_pressed(struct snd_soc_codec *codec)
{
u8 val;
u8 val = 0;
aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
return (val >> 5) & 1;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)

if (data->power_state) {
val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
if (val < 0)
if (val < 0) {
dev_err(&tpa6130a2_client->dev, "Write failed\n");
return val;
}
}

/* Either powered on or off, we save the context */
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8523.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ static int wm8523_startup(struct snd_pcm_substream *substream,
return -EINVAL;
}

return 0;
snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
&wm8523->rate_constraint);
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/soc/codecs/wm8580.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
paifa |= 0x8;
break;
case SNDRV_PCM_FORMAT_S20_3LE:
paifa |= 0x10;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_20;
break;
case SNDRV_PCM_FORMAT_S24_LE:
paifa |= 0x10;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_24;
break;
case SNDRV_PCM_FORMAT_S32_LE:
paifa |= 0x10;
paifb |= WM8580_AIF_LENGTH_24;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_32;
break;
default:
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static int wm8731_probe(struct snd_soc_codec *codec)
snd_soc_update_bits(codec, WM8731_RINVOL, 0x100, 0);

/* Disable bypass path by default */
snd_soc_update_bits(codec, WM8731_APANA, 0x4, 0);
snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0);

snd_soc_add_controls(codec, wm8731_snd_controls,
ARRAY_SIZE(wm8731_snd_controls));
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/soc/codecs/wm8904.c
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,8 @@ static int wm8904_remove(struct snd_soc_codec *codec)

wm8904_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_free(ARRAY_SIZE(wm8904->supplies), wm8904->supplies);
kfree(wm8904->retune_mobile_texts);
kfree(wm8904->drc_texts);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/codecs/wm8961.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ static int wm8961_hw_params(struct snd_pcm_substream *substream,
if (fs <= 24000)
reg |= WM8961_DACSLOPE;
else
reg &= WM8961_DACSLOPE;
reg &= ~WM8961_DACSLOPE;
snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg);

return 0;
Expand All @@ -736,7 +736,7 @@ static int wm8961_set_sysclk(struct snd_soc_dai *dai, int clk_id,
freq /= 2;
} else {
dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq);
reg &= WM8961_MCLKDIV;
reg &= ~WM8961_MCLKDIV;
}

snd_soc_write(codec, WM8961_CLOCKING1, reg);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
int mask;
int active;

mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2);
mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK);

active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2);
active &= ~mask;
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,8 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994);
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994);
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994);
kfree(wm8994->retune_mobile_texts);
kfree(wm8994->drc_texts);
kfree(wm8994);

return 0;
Expand All @@ -4073,6 +4075,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8994 = {
.resume = wm8994_resume,
.read = wm8994_read,
.write = wm8994_write,
.readable_register = wm8994_readable,
.volatile_register = wm8994_volatile,
.set_bias_level = wm8994_set_bias_level,
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ SOC_DOUBLE_R("Speaker Switch",
SOC_DOUBLE_R("Speaker ZC Switch",
WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT,
7, 1, 0),
SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 0, 3, 7, 0,
SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0,
spkboost_tlv),
SOC_ENUM("Speaker Reference", speaker_ref),
SOC_ENUM("Speaker Mode", speaker_mode),
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/soc/davinci/davinci-vcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ static int davinci_vcif_probe(struct platform_device *pdev)

static int davinci_vcif_remove(struct platform_device *pdev)
{
struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);

snd_soc_unregister_dai(&pdev->dev);
kfree(davinci_vcif_dev);

return 0;
}
Expand Down
18 changes: 10 additions & 8 deletions trunk/sound/soc/ep93xx/simone.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,26 @@ static int __init simone_init(void)

ret = platform_device_add(simone_snd_ac97_device);
if (ret)
goto fail;
goto fail1;

simone_snd_device = platform_device_alloc("soc-audio", -1);
if (!simone_snd_device) {
ret = -ENOMEM;
goto fail;
goto fail2;
}

platform_set_drvdata(simone_snd_device, &snd_soc_simone);
ret = platform_device_add(simone_snd_device);
if (ret) {
platform_device_put(simone_snd_device);
goto fail;
}
if (ret)
goto fail3;

return ret;
return 0;

fail:
fail3:
platform_device_put(simone_snd_device);
fail2:
platform_device_del(simone_snd_ac97_device);
fail1:
platform_device_put(simone_snd_ac97_device);
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/efika-audio-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static __init int efika_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("efika_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/fsl/mpc5200_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/slab.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>

#include <sound/soc.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "platform device add failed\n");
goto error;
}
dev_set_drvdata(&pdev->dev, sound_device);

of_node_put(codec_np);

Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/p1022_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ static int p1022_ds_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "platform device add failed\n");
goto error;
}
dev_set_drvdata(&pdev->dev, sound_device);

of_node_put(codec_np);

Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/fsl/pcm030-audio-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("pcm030_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;
Expand Down
15 changes: 11 additions & 4 deletions trunk/sound/soc/imx/imx-ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}

ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev_fiq)
if (!ssi->soc_platform_pdev_fiq) {
ret = -ENOMEM;
goto failed_pdev_fiq_alloc;
}

platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
ret = platform_device_add(ssi->soc_platform_pdev_fiq);
if (ret) {
Expand All @@ -689,8 +692,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}

ssi->soc_platform_pdev = platform_device_alloc("imx-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev)
if (!ssi->soc_platform_pdev) {
ret = -ENOMEM;
goto failed_pdev_alloc;
}

platform_set_drvdata(ssi->soc_platform_pdev, ssi);
ret = platform_device_add(ssi->soc_platform_pdev);
if (ret) {
Expand All @@ -703,6 +709,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
failed_pdev_add:
platform_device_put(ssi->soc_platform_pdev);
failed_pdev_alloc:
platform_device_del(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_add:
platform_device_put(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_alloc:
Expand All @@ -726,8 +733,8 @@ static int __devexit imx_ssi_remove(struct platform_device *pdev)
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct imx_ssi *ssi = platform_get_drvdata(pdev);

platform_device_del(ssi->soc_platform_pdev);
platform_device_put(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev_fiq);

snd_soc_unregister_dai(&pdev->dev);

Expand Down
Loading

0 comments on commit 36102a1

Please sign in to comment.