mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 14:34:28 +08:00
ASoC: arizona: Add voice trigger output widget
In some situations the voice control firmware will by used to only provide a trigger notification event. In this case a compressed stream will not be opened by user-space, as such we need to provide a virtual output to power on the DSP in this use-case. This patch adds a virtual output 'DSP Voice Trigger' that can be used for this, and a switch that lets it be connected to the core when required. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9fc772eca1
commit
97126ce8ce
@ -810,6 +810,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);
|
||||
|
@ -248,6 +248,8 @@ extern const struct soc_enum arizona_anc_input_src[];
|
||||
extern const struct soc_enum arizona_anc_ng_enum;
|
||||
extern const struct soc_enum arizona_output_anc_src[];
|
||||
|
||||
extern const struct snd_kcontrol_new arizona_voice_trigger_switch[];
|
||||
|
||||
extern int arizona_in_ev(struct snd_soc_dapm_widget *w,
|
||||
struct snd_kcontrol *kcontrol,
|
||||
int event);
|
||||
|
@ -359,6 +359,11 @@ SND_SOC_DAPM_INPUT("IN2R"),
|
||||
SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
|
||||
SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
|
||||
|
||||
SND_SOC_DAPM_OUTPUT("DSP Voice Trigger"),
|
||||
|
||||
SND_SOC_DAPM_SWITCH("DSP3 Voice Trigger", SND_SOC_NOPM, 2, 0,
|
||||
&arizona_voice_trigger_switch[2]),
|
||||
|
||||
SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
|
||||
0, NULL, 0, arizona_in_ev,
|
||||
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
|
||||
@ -905,6 +910,10 @@ static const struct snd_soc_dapm_route cs47l24_dapm_routes[] = {
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1R" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2L" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2R" },
|
||||
|
||||
{ "DSP Voice Trigger", NULL, "SYSCLK" },
|
||||
{ "DSP Voice Trigger", NULL, "DSP3 Voice Trigger" },
|
||||
{ "DSP3 Voice Trigger", "Switch", "DSP3" },
|
||||
};
|
||||
|
||||
static int cs47l24_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
|
||||
|
@ -1104,6 +1104,11 @@ SND_SOC_DAPM_INPUT("IN4R"),
|
||||
SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
|
||||
SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
|
||||
|
||||
SND_SOC_DAPM_OUTPUT("DSP Voice Trigger"),
|
||||
|
||||
SND_SOC_DAPM_SWITCH("DSP3 Voice Trigger", SND_SOC_NOPM, 2, 0,
|
||||
&arizona_voice_trigger_switch[2]),
|
||||
|
||||
SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
|
||||
0, NULL, 0, wm5110_in_ev,
|
||||
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
|
||||
@ -2003,6 +2008,10 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1R" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2L" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2R" },
|
||||
|
||||
{ "DSP Voice Trigger", NULL, "SYSCLK" },
|
||||
{ "DSP Voice Trigger", NULL, "DSP3 Voice Trigger" },
|
||||
{ "DSP3 Voice Trigger", "Switch", "DSP3" },
|
||||
};
|
||||
|
||||
static int wm5110_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
|
||||
|
Loading…
Reference in New Issue
Block a user