diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8993.c | 29 | ||||
-rw-r--r-- | sound/soc/codecs/wm8995.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8996.c | 18 | ||||
-rw-r--r-- | sound/soc/codecs/wm9081.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm9090.c | 13 | ||||
-rw-r--r-- | sound/soc/mid-x86/mfld_machine.c | 2 | ||||
-rw-r--r-- | sound/soc/mid-x86/sst_platform.c | 4 | ||||
-rw-r--r-- | sound/soc/samsung/idma.c | 2 | ||||
-rw-r--r-- | sound/soc/samsung/pcm.c | 12 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/sh7760-ac97.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/siu_dai.c | 6 |
12 files changed, 27 insertions, 69 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index f472ea6ecf6b..2b40c93601ed 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c @@ -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) { @@ -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); @@ -1613,7 +1591,8 @@ 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; @@ -1621,8 +1600,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c, ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm8993, &wm8993_dai, 1); - if (ret < 0) - kfree(wm8993); return ret; } diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 5863406b459d..c8aada597d70 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -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); diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 8f88f5a9c985..da7acaefa9d9 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -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; } @@ -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); @@ -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); } } } diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 1f2672b1e03e..a6bab392700e 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c @@ -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 */ diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index d1d2c703eab2..41ebe0dce772 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -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 diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c index e53f8e473a78..8ae057433968 100644 --- a/sound/soc/mid-x86/mfld_machine.c +++ b/sound/soc/mid-x86/mfld_machine.c @@ -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", diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index 11c39c548a06..c2bf172a196e 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -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; @@ -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, diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index baf97ebadd48..2bcf75815624 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -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, diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index beef63fca052..3a29c268ea5d 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -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 @@ -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: diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index a27c30636b82..db6c89a28bda 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -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; @@ -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, diff --git a/sound/soc/sh/sh7760-ac97.c b/sound/soc/sh/sh7760-ac97.c index c62ae689c4a1..df651e8e38de 100644 --- a/sound/soc/sh/sh7760-ac97.c +++ b/sound/soc/sh/sh7760-ac97.c @@ -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", diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c index 11c608570820..52d4c17b1232 100644 --- a/sound/soc/sh/siu_dai.c +++ b/sound/soc/sh/siu_dai.c @@ -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); @@ -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) |