Merge remote-tracking branches 'asoc/topic/tpa6130a2', 'asoc/topic/ux500', 'asoc/topic/wm8960', 'asoc/topic/wm8962' and 'asoc/topic/wm8991' into asoc-next

This commit is contained in:
Mark Brown 2016-09-29 12:44:49 -07:00
5 changed files with 38 additions and 23 deletions

View File

@ -71,7 +71,14 @@ static int tpa6130a2_power(struct tpa6130a2_data *data, bool enable)
if (ret != 0) {
dev_err(data->dev,
"Failed to sync registers: %d\n", ret);
goto regcache_sync_failed;
regcache_cache_only(data->regmap, true);
if (data->power_gpio >= 0)
gpio_set_value(data->power_gpio, 0);
ret2 = regulator_disable(data->supply);
if (ret2 != 0)
dev_err(data->dev,
"Failed to disable supply: %d\n", ret2);
return ret;
}
} else {
/* Powered off device does not retain registers. While device
@ -79,18 +86,17 @@ static int tpa6130a2_power(struct tpa6130a2_data *data, bool enable)
* happen in cache only.
*/
regcache_mark_dirty(data->regmap);
regcache_sync_failed:
regcache_cache_only(data->regmap, true);
/* Power off */
if (data->power_gpio >= 0)
gpio_set_value(data->power_gpio, 0);
ret2 = regulator_disable(data->supply);
if (ret2 != 0) {
ret = regulator_disable(data->supply);
if (ret != 0) {
dev_err(data->dev,
"Failed to disable supply: %d\n", ret2);
return ret ? ret : ret2;
"Failed to disable supply: %d\n", ret);
return ret;
}
}
@ -193,7 +199,7 @@ static const struct snd_soc_dapm_route tpa6130a2_dapm_routes[] = {
{ "Right PGA", NULL, "Power" },
};
struct snd_soc_component_driver tpa6130a2_component_driver = {
static const struct snd_soc_component_driver tpa6130a2_component_driver = {
.name = "tpa6130a2",
.probe = tpa6130a2_component_probe,
.dapm_widgets = tpa6130a2_dapm_widgets,

View File

@ -226,11 +226,10 @@ static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(bypass_tlv, -2100, 300, 0);
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(lineinboost_tlv, -1500, 300, 1);
static const unsigned int micboost_tlv[] = {
TLV_DB_RANGE_HEAD(2),
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(micboost_tlv,
0, 1, TLV_DB_SCALE_ITEM(0, 1300, 0),
2, 3, TLV_DB_SCALE_ITEM(2000, 900, 0),
};
);
static const struct snd_kcontrol_new wm8960_snd_controls[] = {
SOC_DOUBLE_R_TLV("Capture Volume", WM8960_LINVOL, WM8960_RINVOL,

View File

@ -3713,7 +3713,7 @@ static int wm8962_i2c_probe(struct i2c_client *i2c,
ARRAY_SIZE(wm8962_dc_measure));
if (ret != 0)
dev_err(&i2c->dev,
"Failed to configure for DC mesurement: %d\n",
"Failed to configure for DC measurement: %d\n",
ret);
}

View File

@ -111,14 +111,24 @@ static bool wm8991_volatile(struct device *dev, unsigned int reg)
}
}
static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600);
static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000);
static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, 0, -2100);
static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600);
static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0);
static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0);
static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763);
static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(in_pga_tlv, -1650, 150, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(out_mix_tlv, -2100, 300, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(out_pga_tlv,
0x00, 0x2f, SNDRV_CTL_TLVD_DB_SCALE_ITEM(SNDRV_CTL_TLVD_DB_GAIN_MUTE, 0, 1),
0x30, 0x7f, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-7300, 100, 0),
);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(out_dac_tlv,
0x00, 0xbf, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-71625, 375, 1),
0xc0, 0xff, SNDRV_CTL_TLVD_DB_SCALE_ITEM(0, 0, 0),
);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(in_adc_tlv,
0x00, 0xef, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-71625, 375, 1),
0xf0, 0xff, SNDRV_CTL_TLVD_DB_SCALE_ITEM(17625, 0, 0),
);
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(out_sidetone_tlv,
0x00, 0x0c, SNDRV_CTL_TLVD_DB_SCALE_ITEM(-3600, 300, 0),
0x0d, 0x0f, SNDRV_CTL_TLVD_DB_SCALE_ITEM(0, 0, 0),
);
static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
@ -398,7 +408,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
}
/* INMIX dB values */
static const DECLARE_TLV_DB_LINEAR(in_mix_tlv, -1200, 600);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(in_mix_tlv, -1200, 300, 1);
/* Left In PGA Connections */
static const struct snd_kcontrol_new wm8991_dapm_lin12_pga_controls[] = {

View File

@ -187,7 +187,7 @@ static int setup_clocking(struct snd_soc_dai *dai,
default:
dev_err(dai->dev,
"%s: Error: Unsopported inversion (fmt = 0x%x)!\n",
"%s: Error: Unsupported inversion (fmt = 0x%x)!\n",
__func__, fmt);
return -EINVAL;
@ -218,7 +218,7 @@ static int setup_clocking(struct snd_soc_dai *dai,
break;
default:
dev_err(dai->dev, "%s: Error: Unsopported master (fmt = 0x%x)!\n",
dev_err(dai->dev, "%s: Error: Unsupported master (fmt = 0x%x)!\n",
__func__, fmt);
return -EINVAL;
@ -374,7 +374,7 @@ static int setup_msp_config(struct snd_pcm_substream *substream,
break;
default:
dev_err(dai->dev, "%s: Error: Unsopported format (%d)!\n",
dev_err(dai->dev, "%s: Error: Unsupported format (%d)!\n",
__func__, fmt);
return -EINVAL;
}