Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/tpa6130a2', 'asoc/topic/ux…
Browse files Browse the repository at this point in the history
…500', 'asoc/topic/wm8960', 'asoc/topic/wm8962' and 'asoc/topic/wm8991' into asoc-next
  • Loading branch information
Mark Brown committed Sep 29, 2016
6 parents 84b720f + 3cadd22 + c3d7abc + b269ceb + ab387b4 + c7e9426 commit 513e43e
Showing 5 changed files with 38 additions and 23 deletions.
20 changes: 13 additions & 7 deletions sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
@@ -71,26 +71,32 @@ 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
* is off, any register updates (i.e. volume changes) should
* 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,
5 changes: 2 additions & 3 deletions sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
@@ -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);
}

28 changes: 19 additions & 9 deletions sound/soc/codecs/wm8991.c
Original file line number Diff line number Diff line change
@@ -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[] = {
6 changes: 3 additions & 3 deletions sound/soc/ux500/ux500_msp_dai.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 513e43e

Please sign in to comment.