Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283963
b: refs/heads/master
c: d78930f
h: refs/heads/master
i:
  283961: 025b221
  283959: 1911831
v: v3
  • Loading branch information
Mark Brown committed Dec 17, 2011
1 parent 2efc876 commit 9dbde51
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 70 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: c45471eac2bdc271df40963ac8448d76ac434872
refs/heads/master: d78930f42247ceacd83a7f1c0ca37ab2e0a3fd5b
14 changes: 14 additions & 0 deletions trunk/drivers/mfd/wm8994-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,20 @@ static int wm8994_suspend(struct device *dev)
break;
}

switch (wm8994->type) {
case WM1811:
ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2);
if (ret < 0) {
dev_err(dev, "Failed to read jackdet: %d\n", ret);
} else if (ret & WM1811_JACKDET_MODE_MASK) {
dev_dbg(dev, "CODEC still active, ignoring suspend\n");
return 0;
}
break;
default:
break;
}

/* Disable LDO pulldowns while the device is suspended if we
* don't know that something will be driving them. */
if (!wm8994->ldo_ena_always_driven)
Expand Down
29 changes: 3 additions & 26 deletions trunk/sound/soc/codecs/wm8993.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,28 +934,6 @@ static const struct snd_soc_dapm_route routes[] = {
{ "Right Headphone Mux", "DAC", "DACR" },
};

static void wm8993_cache_restore(struct snd_soc_codec *codec)
{
u16 *cache = codec->reg_cache;
int i;

if (!codec->cache_sync)
return;

/* Reenable hardware writes */
codec->cache_only = 0;

/* Restore the register settings */
for (i = 1; i < WM8993_MAX_REGISTER; i++) {
if (cache[i] == wm8993_reg_defaults[i])
continue;
snd_soc_write(codec, i, cache[i]);
}

/* We're in sync again */
codec->cache_sync = 0;
}

static int wm8993_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
Expand All @@ -979,7 +957,7 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec,
if (ret != 0)
return ret;

wm8993_cache_restore(codec);
snd_soc_cache_sync(codec);

/* Tune DC servo configuration */
snd_soc_write(codec, 0x44, 3);
Expand Down Expand Up @@ -1613,16 +1591,15 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
struct wm8993_priv *wm8993;
int ret;

wm8993 = kzalloc(sizeof(struct wm8993_priv), GFP_KERNEL);
wm8993 = devm_kzalloc(&i2c->dev, sizeof(struct wm8993_priv),
GFP_KERNEL);
if (wm8993 == NULL)
return -ENOMEM;

i2c_set_clientdata(i2c, wm8993);

ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8993, &wm8993_dai, 1);
if (ret < 0)
kfree(wm8993);
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/wm8995.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,7 @@ static int wm8995_probe(struct snd_soc_codec *codec)
wm8995 = snd_soc_codec_get_drvdata(codec);
wm8995->codec = codec;

codec->control_data = wm8995->regmap;
ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
if (ret < 0) {
dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
Expand Down
18 changes: 12 additions & 6 deletions trunk/sound/soc/codecs/wm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -2572,8 +2572,10 @@ static void wm8996_micd(struct snd_soc_codec *codec)
SND_JACK_BTN_0);

snd_soc_update_bits(codec, WM8996_MIC_DETECT_1,
WM8996_MICD_RATE_MASK,
WM8996_MICD_RATE_MASK);
WM8996_MICD_RATE_MASK |
WM8996_MICD_BIAS_STARTTIME_MASK,
WM8996_MICD_RATE_MASK |
9 << WM8996_MICD_BIAS_STARTTIME_SHIFT);
return;
}

Expand All @@ -2590,8 +2592,10 @@ static void wm8996_micd(struct snd_soc_codec *codec)
/* Increase poll rate to give better responsiveness
* for buttons */
snd_soc_update_bits(codec, WM8996_MIC_DETECT_1,
WM8996_MICD_RATE_MASK,
5 << WM8996_MICD_RATE_SHIFT);
WM8996_MICD_RATE_MASK |
WM8996_MICD_BIAS_STARTTIME_MASK,
5 << WM8996_MICD_RATE_SHIFT |
7 << WM8996_MICD_BIAS_STARTTIME_SHIFT);
} else {
dev_dbg(codec->dev, "Mic button up\n");
snd_soc_jack_report(wm8996->jack, 0, SND_JACK_BTN_0);
Expand Down Expand Up @@ -2639,8 +2643,10 @@ static void wm8996_micd(struct snd_soc_codec *codec)
* responsiveness.
*/
snd_soc_update_bits(codec, WM8996_MIC_DETECT_1,
WM8996_MICD_RATE_MASK,
7 << WM8996_MICD_RATE_SHIFT);
WM8996_MICD_RATE_MASK |
WM8996_MICD_BIAS_STARTTIME_MASK,
7 << WM8996_MICD_RATE_SHIFT |
7 << WM8996_MICD_BIAS_STARTTIME_SHIFT);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm9081.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "wm9081.h"

static struct reg_default wm9081_reg[] = {
{ 0, 0x9081 }, /* R0 - Software Reset */
{ 2, 0x00B9 }, /* R2 - Analogue Lineout */
{ 3, 0x00B9 }, /* R3 - Analogue Speaker PGA */
{ 4, 0x0001 }, /* R4 - VMID Control */
Expand Down
13 changes: 1 addition & 12 deletions trunk/sound/soc/codecs/wm9090.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,18 +513,7 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
case SND_SOC_BIAS_STANDBY:
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
/* Restore the register cache */
for (i = 1; i < codec->driver->reg_cache_size; i++) {
if (reg_cache[i] == wm9090_reg_defaults[i])
continue;
if (wm9090_volatile(codec, i))
continue;

ret = snd_soc_write(codec, i, reg_cache[i]);
if (ret != 0)
dev_warn(codec->dev,
"Failed to restore register %d: %d\n",
i, ret);
}
snd_soc_cache_sync(codec);
}

/* We keep VMID off during standby since the combination of
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/mid-x86/mfld_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
return ret_val;
}

struct snd_soc_dai_link mfld_msic_dailink[] = {
static struct snd_soc_dai_link mfld_msic_dailink[] = {
{
.name = "Medfield Headset",
.stream_name = "Headset",
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/mid-x86/sst_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ static void sst_pcm_free(struct snd_pcm *pcm)
snd_pcm_lib_preallocate_free_for_all(pcm);
}

int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_dai *dai = rtd->cpu_dai;
struct snd_pcm *pcm = rtd->pcm;
Expand All @@ -464,7 +464,7 @@ int sst_pcm_new(struct snd_soc_pcm_runtime *rtd)
}
return retval;
}
struct snd_soc_platform_driver sst_soc_platform_drv = {
static struct snd_soc_platform_driver sst_soc_platform_drv = {
.ops = &sst_platform_ops,
.pcm_new = sst_pcm_new,
.pcm_free = sst_pcm_free,
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/samsung/idma.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr)
idma.lp_tx_addr = addr;
}

struct snd_soc_platform_driver asoc_idma_platform = {
static struct snd_soc_platform_driver asoc_idma_platform = {
.ops = &idma_ops,
.pcm_new = idma_new,
.pcm_free = idma_free,
Expand Down
12 changes: 6 additions & 6 deletions trunk/sound/soc/samsung/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,6 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
}
clk_enable(pcm->pclk);

ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get pcm_clock\n");
goto err5;
}

s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start
+ S3C_PCM_RXFIFO;
s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start
Expand All @@ -587,6 +581,12 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];

ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
if (ret != 0) {
dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
goto err5;
}

return 0;

err5:
Expand Down
4 changes: 0 additions & 4 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,6 @@ static int fsi_hw_startup(struct fsi_priv *fsi,
u32 flags = fsi_get_info_flags(fsi);
u32 data = 0;

pm_runtime_get_sync(dev);

/* clock setting */
if (fsi_is_clk_master(fsi))
data = DIMD | DOMD;
Expand Down Expand Up @@ -951,8 +949,6 @@ static void fsi_hw_shutdown(struct fsi_priv *fsi,
{
if (fsi_is_clk_master(fsi))
fsi_set_master_clk(dev, fsi, fsi->rate, 0);

pm_runtime_put_sync(dev);
}

static int fsi_dai_startup(struct snd_pcm_substream *substream,
Expand Down
4 changes: 0 additions & 4 deletions trunk/sound/soc/sh/sh7760-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#define IPSEL 0xFE400034

/* platform specific structs can be declared here */
extern struct snd_soc_dai_driver sh4_hac_dai[2];
extern struct snd_soc_platform_driver sh7760_soc_platform;

static struct snd_soc_dai_link sh7760_ac97_dai = {
.name = "AC97",
.stream_name = "AC97 HiFi",
Expand Down
6 changes: 0 additions & 6 deletions trunk/sound/soc/sh/siu_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ static void siu_dai_start(struct siu_port *port_info)

dev_dbg(port_info->pcm->card->dev, "%s\n", __func__);

/* Turn on SIU clock */
pm_runtime_get_sync(info->dev);

/* Issue software reset to siu */
siu_write32(base + SIU_SRCTL, 0);

Expand Down Expand Up @@ -158,9 +155,6 @@ static void siu_dai_stop(struct siu_port *port_info)

/* SIU software reset */
siu_write32(base + SIU_SRCTL, 0);

/* Turn off SIU clock */
pm_runtime_put_sync(info->dev);
}

static void siu_dai_spbAselect(struct siu_port *port_info)
Expand Down

0 comments on commit 9dbde51

Please sign in to comment.