Merge remote-tracking branches 'asoc/topic/twl6040', 'asoc/topic/uda134x', 'asoc/topic/uda1380' and 'asoc/topic/wl1273' into asoc-next
This commit is contained in:
commit
45cbdda46b
|
@ -18,18 +18,6 @@ struct uda134x_platform_data {
|
|||
struct l3_pins l3;
|
||||
void (*power) (int);
|
||||
int model;
|
||||
/*
|
||||
ALSA SOC usually puts the device in standby mode when it's not used
|
||||
for sometime. If you unset is_powered_on_standby the driver will
|
||||
turn off the ADC/DAC when this callback is invoked and turn it back
|
||||
on when needed. Unfortunately this will result in a very light bump
|
||||
(it can be audible only with good earphones). If this bothers you
|
||||
set is_powered_on_standby, you will have slightly higher power
|
||||
consumption. Please note that sending the L3 command for ADC is
|
||||
enough to make the bump, so it doesn't make difference if you
|
||||
completely take off power from the codec.
|
||||
*/
|
||||
int is_powered_on_standby;
|
||||
#define UDA134X_UDA1340 1
|
||||
#define UDA134X_UDA1341 2
|
||||
#define UDA134X_UDA1344 3
|
||||
|
|
|
@ -1095,25 +1095,6 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
|
|||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int twl6040_suspend(struct snd_soc_codec *codec)
|
||||
{
|
||||
twl6040_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int twl6040_resume(struct snd_soc_codec *codec)
|
||||
{
|
||||
twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define twl6040_suspend NULL
|
||||
#define twl6040_resume NULL
|
||||
#endif
|
||||
|
||||
static int twl6040_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct twl6040_data *priv;
|
||||
|
@ -1160,7 +1141,6 @@ static int twl6040_remove(struct snd_soc_codec *codec)
|
|||
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
free_irq(priv->plug_irq, codec);
|
||||
twl6040_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1168,11 +1148,10 @@ static int twl6040_remove(struct snd_soc_codec *codec)
|
|||
static struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
|
||||
.probe = twl6040_probe,
|
||||
.remove = twl6040_remove,
|
||||
.suspend = twl6040_suspend,
|
||||
.resume = twl6040_resume,
|
||||
.read = twl6040_read,
|
||||
.write = twl6040_write,
|
||||
.set_bias_level = twl6040_set_bias_level,
|
||||
.suspend_bias_off = true,
|
||||
.ignore_pmdown_time = true,
|
||||
|
||||
.controls = twl6040_snd_controls,
|
||||
|
|
|
@ -518,11 +518,6 @@ static int uda134x_soc_probe(struct snd_soc_codec *codec)
|
|||
|
||||
uda134x_reset(codec);
|
||||
|
||||
if (pd->is_powered_on_standby)
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_ON);
|
||||
else
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
if (pd->model == UDA134X_UDA1341) {
|
||||
widgets = uda1341_dapm_widgets;
|
||||
num_widgets = ARRAY_SIZE(uda1341_dapm_widgets);
|
||||
|
@ -574,44 +569,21 @@ static int uda134x_soc_remove(struct snd_soc_codec *codec)
|
|||
{
|
||||
struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
kfree(uda134x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PM)
|
||||
static int uda134x_soc_suspend(struct snd_soc_codec *codec)
|
||||
{
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uda134x_soc_resume(struct snd_soc_codec *codec)
|
||||
{
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_PREPARE);
|
||||
uda134x_set_bias_level(codec, SND_SOC_BIAS_ON);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#define uda134x_soc_suspend NULL
|
||||
#define uda134x_soc_resume NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static struct snd_soc_codec_driver soc_codec_dev_uda134x = {
|
||||
.probe = uda134x_soc_probe,
|
||||
.remove = uda134x_soc_remove,
|
||||
.suspend = uda134x_soc_suspend,
|
||||
.resume = uda134x_soc_resume,
|
||||
.reg_cache_size = sizeof(uda134x_reg),
|
||||
.reg_word_size = sizeof(u8),
|
||||
.reg_cache_default = uda134x_reg,
|
||||
.reg_cache_step = 1,
|
||||
.read = uda134x_read_reg_cache,
|
||||
.write = uda134x_write,
|
||||
.set_bias_level = uda134x_set_bias_level,
|
||||
.suspend_bias_off = true,
|
||||
|
||||
.dapm_widgets = uda134x_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(uda134x_dapm_widgets),
|
||||
.dapm_routes = uda134x_dapm_routes,
|
||||
|
|
|
@ -693,18 +693,6 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int uda1380_suspend(struct snd_soc_codec *codec)
|
||||
{
|
||||
uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uda1380_resume(struct snd_soc_codec *codec)
|
||||
{
|
||||
uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uda1380_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct uda1380_platform_data *pdata =codec->dev->platform_data;
|
||||
|
@ -739,8 +727,6 @@ static int uda1380_probe(struct snd_soc_codec *codec)
|
|||
|
||||
INIT_WORK(&uda1380->work, uda1380_flush_work);
|
||||
|
||||
/* power on device */
|
||||
uda1380_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
/* set clock input */
|
||||
switch (pdata->dac_clk) {
|
||||
case UDA1380_DAC_CLK_SYSCLK:
|
||||
|
@ -766,8 +752,6 @@ static int uda1380_remove(struct snd_soc_codec *codec)
|
|||
{
|
||||
struct uda1380_platform_data *pdata =codec->dev->platform_data;
|
||||
|
||||
uda1380_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
gpio_free(pdata->gpio_reset);
|
||||
gpio_free(pdata->gpio_power);
|
||||
|
||||
|
@ -777,11 +761,11 @@ static int uda1380_remove(struct snd_soc_codec *codec)
|
|||
static struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
|
||||
.probe = uda1380_probe,
|
||||
.remove = uda1380_remove,
|
||||
.suspend = uda1380_suspend,
|
||||
.resume = uda1380_resume,
|
||||
.read = uda1380_read_reg_cache,
|
||||
.write = uda1380_write,
|
||||
.set_bias_level = uda1380_set_bias_level,
|
||||
.suspend_bias_off = true,
|
||||
|
||||
.reg_cache_size = ARRAY_SIZE(uda1380_reg),
|
||||
.reg_word_size = sizeof(u16),
|
||||
.reg_cache_default = uda1380_reg,
|
||||
|
|
|
@ -452,7 +452,6 @@ static int wl1273_probe(struct snd_soc_codec *codec)
|
|||
{
|
||||
struct wl1273_core **core = codec->dev->platform_data;
|
||||
struct wl1273_priv *wl1273;
|
||||
int r;
|
||||
|
||||
dev_dbg(codec->dev, "%s.\n", __func__);
|
||||
|
||||
|
@ -470,12 +469,7 @@ static int wl1273_probe(struct snd_soc_codec *codec)
|
|||
|
||||
snd_soc_codec_set_drvdata(codec, wl1273);
|
||||
|
||||
r = snd_soc_add_codec_controls(codec, wl1273_controls,
|
||||
ARRAY_SIZE(wl1273_controls));
|
||||
if (r)
|
||||
kfree(wl1273);
|
||||
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wl1273_remove(struct snd_soc_codec *codec)
|
||||
|
@ -492,6 +486,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wl1273 = {
|
|||
.probe = wl1273_probe,
|
||||
.remove = wl1273_remove,
|
||||
|
||||
.controls = wl1273_controls,
|
||||
.num_controls = ARRAY_SIZE(wl1273_controls),
|
||||
.dapm_widgets = wl1273_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(wl1273_dapm_widgets),
|
||||
.dapm_routes = wl1273_dapm_routes,
|
||||
|
|
Loading…
Reference in New Issue