mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: rockchip: multicodecs: move PA control operation from supply to speaker/headphone widget
The dapm power sequences is
static int dapm_up_seq[] = {
[snd_soc_dapm_supply] = 3,
[snd_soc_dapm_dac] = 8,
[snd_soc_dapm_hp] = 12,
[snd_soc_dapm_spk] = 12,
};
static int dapm_down_seq[] = {
[snd_soc_dapm_hp] = 4,
[snd_soc_dapm_spk] = 4,
[snd_soc_dapm_dac] = 7,
[snd_soc_dapm_supply] = 13,
};
We should enable PA power after dac on and disable before dac off
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ie5b7d5736496061e8f7551bf7d40ffba83015144
This commit is contained in:
@@ -309,21 +309,12 @@ static int mc_spk_event(struct snd_soc_dapm_widget *w,
|
||||
}
|
||||
|
||||
static const struct snd_soc_dapm_widget mc_dapm_widgets[] = {
|
||||
|
||||
SND_SOC_DAPM_HP("Headphone", NULL),
|
||||
SND_SOC_DAPM_SPK("Speaker", NULL),
|
||||
SND_SOC_DAPM_HP("Headphone", mc_hp_event),
|
||||
SND_SOC_DAPM_SPK("Speaker", mc_spk_event),
|
||||
SND_SOC_DAPM_MIC("Main Mic", NULL),
|
||||
SND_SOC_DAPM_MIC("Headset Mic", NULL),
|
||||
SND_SOC_DAPM_SUPPLY("Speaker Power",
|
||||
SND_SOC_NOPM, 0, 0,
|
||||
mc_spk_event,
|
||||
SND_SOC_DAPM_POST_PMU |
|
||||
SND_SOC_DAPM_PRE_PMD),
|
||||
SND_SOC_DAPM_SUPPLY("Headphone Power",
|
||||
SND_SOC_NOPM, 0, 0,
|
||||
mc_hp_event,
|
||||
SND_SOC_DAPM_POST_PMU |
|
||||
SND_SOC_DAPM_PRE_PMD),
|
||||
SND_SOC_DAPM_SUPPLY("Speaker Power", SND_SOC_NOPM, 0, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY("Headphone Power", SND_SOC_NOPM, 0, 0, NULL, 0),
|
||||
};
|
||||
|
||||
static int mc_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
|
||||
Reference in New Issue
Block a user