Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/wm8776', 'asoc/topic/wm880…
Browse files Browse the repository at this point in the history
…4', 'asoc/topic/wm8900', 'asoc/topic/wm8903' and 'asoc/topic/wm8940' into asoc-next
  • Loading branch information
Mark Brown committed Dec 8, 2014
6 parents d7e05f9 + 6c286af + a4235a1 + d2a9bc6 + b0d55b1 + 5fdf082 commit 7bff3b6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 94 deletions.
31 changes: 1 addition & 30 deletions sound/soc/codecs/wm8776.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,24 +408,6 @@ static struct snd_soc_dai_driver wm8776_dai[] = {
},
};

#ifdef CONFIG_PM
static int wm8776_suspend(struct snd_soc_codec *codec)
{
wm8776_set_bias_level(codec, SND_SOC_BIAS_OFF);

return 0;
}

static int wm8776_resume(struct snd_soc_codec *codec)
{
wm8776_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
#else
#define wm8776_suspend NULL
#define wm8776_resume NULL
#endif

static int wm8776_probe(struct snd_soc_codec *codec)
{
int ret = 0;
Expand All @@ -436,8 +418,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)
return ret;
}

wm8776_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

/* Latch the update bits; right channel only since we always
* update both. */
snd_soc_update_bits(codec, WM8776_HPRVOL, 0x100, 0x100);
Expand All @@ -446,19 +426,10 @@ static int wm8776_probe(struct snd_soc_codec *codec)
return ret;
}

/* power down chip */
static int wm8776_remove(struct snd_soc_codec *codec)
{
wm8776_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_wm8776 = {
.probe = wm8776_probe,
.remove = wm8776_remove,
.suspend = wm8776_suspend,
.resume = wm8776_resume,
.set_bias_level = wm8776_set_bias_level,
.suspend_bias_off = true,

.controls = wm8776_snd_controls,
.num_controls = ARRAY_SIZE(wm8776_snd_controls),
Expand Down
3 changes: 0 additions & 3 deletions sound/soc/codecs/wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@ static int wm8804_remove(struct snd_soc_codec *codec)
int i;

wm8804 = snd_soc_codec_get_drvdata(codec);
wm8804_set_bias_level(codec, SND_SOC_BIAS_OFF);

for (i = 0; i < ARRAY_SIZE(wm8804->supplies); ++i)
regulator_unregister_notifier(wm8804->supplies[i].consumer,
Expand Down Expand Up @@ -606,8 +605,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)
goto err_reg_enable;
}

wm8804_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;

err_reg_enable:
Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/wm8900.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,16 +1209,8 @@ static int wm8900_probe(struct snd_soc_codec *codec)
return 0;
}

/* power down chip */
static int wm8900_remove(struct snd_soc_codec *codec)
{
wm8900_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_wm8900 = {
.probe = wm8900_probe,
.remove = wm8900_remove,
.suspend = wm8900_suspend,
.resume = wm8900_resume,
.set_bias_level = wm8900_set_bias_level,
Expand Down
35 changes: 2 additions & 33 deletions sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ static const struct reg_default wm8903_reg_defaults[] = {
struct wm8903_priv {
struct wm8903_platform_data *pdata;
struct device *dev;
struct snd_soc_codec *codec;
struct regmap *regmap;

int sysclk;
Expand Down Expand Up @@ -1759,21 +1758,12 @@ static struct snd_soc_dai_driver wm8903_dai = {
.symmetric_rates = 1,
};

static int wm8903_suspend(struct snd_soc_codec *codec)
{
wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);

return 0;
}

static int wm8903_resume(struct snd_soc_codec *codec)
{
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);

regcache_sync(wm8903->regmap);

wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;
}

Expand Down Expand Up @@ -1891,33 +1881,12 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903)
}
#endif

static int wm8903_probe(struct snd_soc_codec *codec)
{
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);

wm8903->codec = codec;

/* power on device */
wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;
}

/* power down chip */
static int wm8903_remove(struct snd_soc_codec *codec)
{
wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);

return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_wm8903 = {
.probe = wm8903_probe,
.remove = wm8903_remove,
.suspend = wm8903_suspend,
.resume = wm8903_resume,
.set_bias_level = wm8903_set_bias_level,
.seq_notifier = wm8903_seq_notifier,
.suspend_bias_off = true,

.controls = wm8903_snd_controls,
.num_controls = ARRAY_SIZE(wm8903_snd_controls),
.dapm_widgets = wm8903_dapm_widgets,
Expand Down
22 changes: 2 additions & 20 deletions sound/soc/codecs/wm8940.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,17 +695,6 @@ static struct snd_soc_dai_driver wm8940_dai = {
.symmetric_rates = 1,
};

static int wm8940_suspend(struct snd_soc_codec *codec)
{
return wm8940_set_bias_level(codec, SND_SOC_BIAS_OFF);
}

static int wm8940_resume(struct snd_soc_codec *codec)
{
wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}

static int wm8940_probe(struct snd_soc_codec *codec)
{
struct wm8940_setup_data *pdata = codec->dev->platform_data;
Expand Down Expand Up @@ -736,18 +725,11 @@ static int wm8940_probe(struct snd_soc_codec *codec)
return ret;
}

static int wm8940_remove(struct snd_soc_codec *codec)
{
wm8940_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static struct snd_soc_codec_driver soc_codec_dev_wm8940 = {
.probe = wm8940_probe,
.remove = wm8940_remove,
.suspend = wm8940_suspend,
.resume = wm8940_resume,
.set_bias_level = wm8940_set_bias_level,
.suspend_bias_off = true,

.controls = wm8940_snd_controls,
.num_controls = ARRAY_SIZE(wm8940_snd_controls),
.dapm_widgets = wm8940_dapm_widgets,
Expand Down

0 comments on commit 7bff3b6

Please sign in to comment.