Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic…
Browse files Browse the repository at this point in the history
…', 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next
  • Loading branch information
broonie committed Oct 6, 2014
6 parents 9919bad + f114ce6 + 8a36eaa + 5d5e63a + 8d01370 + c05a11f commit 565fefd
Show file tree
Hide file tree
Showing 28 changed files with 438 additions and 239 deletions.
8 changes: 8 additions & 0 deletions include/sound/rt5677.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@
#ifndef __LINUX_SND_RT5677_H
#define __LINUX_SND_RT5677_H

enum rt5677_dmic2_clk {
RT5677_DMIC_CLK1 = 0,
RT5677_DMIC_CLK2 = 1,
};


struct rt5677_platform_data {
/* IN1 IN2 can optionally be differential */
bool in1_diff;
bool in2_diff;
/* DMIC2 clock source selection */
enum rt5677_dmic2_clk dmic2_clk_pin;
};

#endif
3 changes: 2 additions & 1 deletion include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ struct snd_soc_dapm_context {
enum snd_soc_bias_level suspend_bias_level;
struct delayed_work delayed_work;
unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */

/* Go to BIAS_OFF in suspend if the DAPM context is idle */
unsigned int suspend_bias_off:1;
void (*seq_notifier)(struct snd_soc_dapm_context *,
enum snd_soc_dapm_type, int);

Expand Down
1 change: 1 addition & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ struct snd_soc_codec_driver {
int (*set_bias_level)(struct snd_soc_codec *,
enum snd_soc_bias_level level);
bool idle_bias_off;
bool suspend_bias_off;

void (*seq_notifier)(struct snd_soc_dapm_context *,
enum snd_soc_dapm_type, int);
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_DA7213 if I2C
select SND_SOC_DA732X if I2C
select SND_SOC_DA9055 if I2C
select SND_SOC_DMIC
select SND_SOC_BT_SCO
select SND_SOC_ES8328_SPI if SPI_MASTER
select SND_SOC_ES8328_I2C if I2C
Expand Down
21 changes: 0 additions & 21 deletions sound/soc/codecs/adau1373.c
Original file line number Diff line number Diff line change
Expand Up @@ -1448,29 +1448,10 @@ static int adau1373_set_bias_level(struct snd_soc_codec *codec,
return 0;
}

static int adau1373_remove(struct snd_soc_codec *codec)
{
adau1373_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static int adau1373_suspend(struct snd_soc_codec *codec)
{
struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec);
int ret;

ret = adau1373_set_bias_level(codec, SND_SOC_BIAS_OFF);
regcache_cache_only(adau1373->regmap, true);

return ret;
}

static int adau1373_resume(struct snd_soc_codec *codec)
{
struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec);

regcache_cache_only(adau1373->regmap, false);
adau1373_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
regcache_sync(adau1373->regmap);

return 0;
Expand Down Expand Up @@ -1501,8 +1482,6 @@ static const struct regmap_config adau1373_regmap_config = {

static struct snd_soc_codec_driver adau1373_codec_driver = {
.probe = adau1373_probe,
.remove = adau1373_remove,
.suspend = adau1373_suspend,
.resume = adau1373_resume,
.set_bias_level = adau1373_set_bias_level,
.idle_bias_off = true,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/adau1761.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,9 @@ static int adau1761_codec_probe(struct snd_soc_codec *codec)

static const struct snd_soc_codec_driver adau1761_codec_driver = {
.probe = adau1761_codec_probe,
.suspend = adau17x1_suspend,
.resume = adau17x1_resume,
.set_bias_level = adau1761_set_bias_level,
.suspend_bias_off = true,

.controls = adau1761_controls,
.num_controls = ARRAY_SIZE(adau1761_controls),
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/adau1781.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ static int adau1781_codec_probe(struct snd_soc_codec *codec)

static const struct snd_soc_codec_driver adau1781_codec_driver = {
.probe = adau1781_codec_probe,
.suspend = adau17x1_suspend,
.resume = adau17x1_resume,
.set_bias_level = adau1781_set_bias_level,
.suspend_bias_off = true,

.controls = adau1781_controls,
.num_controls = ARRAY_SIZE(adau1781_controls),
Expand Down
8 changes: 0 additions & 8 deletions sound/soc/codecs/adau17x1.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,21 +815,13 @@ int adau17x1_add_routes(struct snd_soc_codec *codec)
}
EXPORT_SYMBOL_GPL(adau17x1_add_routes);

int adau17x1_suspend(struct snd_soc_codec *codec)
{
codec->driver->set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
EXPORT_SYMBOL_GPL(adau17x1_suspend);

int adau17x1_resume(struct snd_soc_codec *codec)
{
struct adau *adau = snd_soc_codec_get_drvdata(codec);

if (adau->switch_mode)
adau->switch_mode(codec->dev);

codec->driver->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
regcache_sync(adau->regmap);

return 0;
Expand Down
1 change: 0 additions & 1 deletion sound/soc/codecs/adau17x1.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ int adau17x1_set_micbias_voltage(struct snd_soc_codec *codec,
enum adau17x1_micbias_voltage micbias);
bool adau17x1_readable_register(struct device *dev, unsigned int reg);
bool adau17x1_volatile_register(struct device *dev, unsigned int reg);
int adau17x1_suspend(struct snd_soc_codec *codec);
int adau17x1_resume(struct snd_soc_codec *codec);

extern const struct snd_soc_dai_ops adau17x1_dai_ops;
Expand Down
23 changes: 2 additions & 21 deletions sound/soc/codecs/adav80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,42 +812,23 @@ static int adav80x_probe(struct snd_soc_codec *codec)
/* Disable DAC zero flag */
regmap_write(adav80x->regmap, ADAV80X_DAC_CTRL3, 0x6);

return adav80x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
}

static int adav80x_suspend(struct snd_soc_codec *codec)
{
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
int ret;

ret = adav80x_set_bias_level(codec, SND_SOC_BIAS_OFF);
regcache_cache_only(adav80x->regmap, true);

return ret;
return 0;
}

static int adav80x_resume(struct snd_soc_codec *codec)
{
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);

regcache_cache_only(adav80x->regmap, false);
adav80x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
regcache_sync(adav80x->regmap);

return 0;
}

static int adav80x_remove(struct snd_soc_codec *codec)
{
return adav80x_set_bias_level(codec, SND_SOC_BIAS_OFF);
}

static struct snd_soc_codec_driver adav80x_codec_driver = {
.probe = adav80x_probe,
.remove = adav80x_remove,
.suspend = adav80x_suspend,
.resume = adav80x_resume,
.set_bias_level = adav80x_set_bias_level,
.suspend_bias_off = true,

.set_pll = adav80x_set_pll,
.set_sysclk = adav80x_set_sysclk,
Expand Down
6 changes: 3 additions & 3 deletions sound/soc/codecs/es8328.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,6 @@ static int es8328_suspend(struct snd_soc_codec *codec)

es8328 = snd_soc_codec_get_drvdata(codec);

es8328_set_bias_level(codec, SND_SOC_BIAS_OFF);

clk_disable_unprepare(es8328->clk);

ret = regulator_bulk_disable(ARRAY_SIZE(es8328->supplies),
Expand Down Expand Up @@ -643,7 +641,6 @@ static int es8328_resume(struct snd_soc_codec *codec)
return ret;
}

es8328_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}

Expand All @@ -665,6 +662,7 @@ static int es8328_codec_probe(struct snd_soc_codec *codec)
es8328->clk = devm_clk_get(codec->dev, NULL);
if (IS_ERR(es8328->clk)) {
dev_err(codec->dev, "codec clock missing or invalid\n");
ret = PTR_ERR(es8328->clk);
goto clk_fail;
}

Expand Down Expand Up @@ -711,6 +709,8 @@ static struct snd_soc_codec_driver es8328_codec_driver = {
.resume = es8328_resume,
.remove = es8328_remove,
.set_bias_level = es8328_set_bias_level,
.suspend_bias_off = true,

.controls = es8328_snd_controls,
.num_controls = ARRAY_SIZE(es8328_snd_controls),
.dapm_widgets = es8328_dapm_widgets,
Expand Down
14 changes: 0 additions & 14 deletions sound/soc/codecs/lm49453.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,18 +1395,6 @@ static struct snd_soc_dai_driver lm49453_dai[] = {
},
};

static int lm49453_suspend(struct snd_soc_codec *codec)
{
lm49453_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}

static int lm49453_resume(struct snd_soc_codec *codec)
{
lm49453_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}

/* power down chip */
static int lm49453_remove(struct snd_soc_codec *codec)
{
Expand All @@ -1416,8 +1404,6 @@ static int lm49453_remove(struct snd_soc_codec *codec)

static struct snd_soc_codec_driver soc_codec_dev_lm49453 = {
.remove = lm49453_remove,
.suspend = lm49453_suspend,
.resume = lm49453_resume,
.set_bias_level = lm49453_set_bias_level,
.controls = lm49453_snd_controls,
.num_controls = ARRAY_SIZE(lm49453_snd_controls),
Expand Down
Loading

0 comments on commit 565fefd

Please sign in to comment.