Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/bt-sco', 'asoc/topic/compress' and 'asoc/topic/cs35l33' into asoc-next
This commit is contained in:
@ -85,30 +85,9 @@ static int arizona_spk_ev(struct snd_soc_dapm_widget *w,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
|
||||
struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
|
||||
struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
bool manual_ena = false;
|
||||
int val;
|
||||
|
||||
switch (arizona->type) {
|
||||
case WM5102:
|
||||
switch (arizona->rev) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
manual_ena = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_PRE_PMU:
|
||||
if (!priv->spk_ena && manual_ena) {
|
||||
regmap_write_async(arizona->regmap, 0x4f5, 0x25a);
|
||||
priv->spk_ena_pending = true;
|
||||
}
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
val = snd_soc_read(codec, ARIZONA_INTERRUPT_RAW_STATUS_3);
|
||||
if (val & ARIZONA_SPK_OVERHEAT_STS) {
|
||||
@ -120,33 +99,12 @@ static int arizona_spk_ev(struct snd_soc_dapm_widget *w,
|
||||
regmap_update_bits_async(arizona->regmap,
|
||||
ARIZONA_OUTPUT_ENABLES_1,
|
||||
1 << w->shift, 1 << w->shift);
|
||||
|
||||
if (priv->spk_ena_pending) {
|
||||
msleep(75);
|
||||
regmap_write_async(arizona->regmap, 0x4f5, 0xda);
|
||||
priv->spk_ena_pending = false;
|
||||
priv->spk_ena++;
|
||||
}
|
||||
break;
|
||||
case SND_SOC_DAPM_PRE_PMD:
|
||||
if (manual_ena) {
|
||||
priv->spk_ena--;
|
||||
if (!priv->spk_ena)
|
||||
regmap_write_async(arizona->regmap,
|
||||
0x4f5, 0x25a);
|
||||
}
|
||||
|
||||
regmap_update_bits_async(arizona->regmap,
|
||||
ARIZONA_OUTPUT_ENABLES_1,
|
||||
1 << w->shift, 0);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
if (manual_ena) {
|
||||
if (!priv->spk_ena)
|
||||
regmap_write_async(arizona->regmap,
|
||||
0x4f5, 0x0da);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -630,7 +588,7 @@ const struct soc_enum arizona_asrc_rate1 =
|
||||
arizona_rate_text, arizona_rate_val);
|
||||
EXPORT_SYMBOL_GPL(arizona_asrc_rate1);
|
||||
|
||||
static const char *arizona_vol_ramp_text[] = {
|
||||
static const char * const arizona_vol_ramp_text[] = {
|
||||
"0ms/6dB", "0.5ms/6dB", "1ms/6dB", "2ms/6dB", "4ms/6dB", "8ms/6dB",
|
||||
"15ms/6dB", "30ms/6dB",
|
||||
};
|
||||
@ -659,7 +617,7 @@ SOC_ENUM_SINGLE_DECL(arizona_out_vi_ramp,
|
||||
arizona_vol_ramp_text);
|
||||
EXPORT_SYMBOL_GPL(arizona_out_vi_ramp);
|
||||
|
||||
static const char *arizona_lhpf_mode_text[] = {
|
||||
static const char * const arizona_lhpf_mode_text[] = {
|
||||
"Low-pass", "High-pass"
|
||||
};
|
||||
|
||||
@ -687,7 +645,7 @@ SOC_ENUM_SINGLE_DECL(arizona_lhpf4_mode,
|
||||
arizona_lhpf_mode_text);
|
||||
EXPORT_SYMBOL_GPL(arizona_lhpf4_mode);
|
||||
|
||||
static const char *arizona_ng_hold_text[] = {
|
||||
static const char * const arizona_ng_hold_text[] = {
|
||||
"30ms", "120ms", "250ms", "500ms",
|
||||
};
|
||||
|
||||
@ -821,6 +779,14 @@ const struct soc_enum arizona_output_anc_src[] = {
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(arizona_output_anc_src);
|
||||
|
||||
const struct snd_kcontrol_new arizona_voice_trigger_switch[] = {
|
||||
SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 0, 1, 0),
|
||||
SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 1, 1, 0),
|
||||
SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 2, 1, 0),
|
||||
SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 3, 1, 0),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(arizona_voice_trigger_switch);
|
||||
|
||||
static void arizona_in_set_vu(struct snd_soc_codec *codec, int ena)
|
||||
{
|
||||
struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
Reference in New Issue
Block a user