Commit bb9963b8 authored by Kirill Marinushkin's avatar Kirill Marinushkin Committed by Mark Brown

ASoC: pcm3060: Add powersaving widgets for DAC and ADC

Enable DAC/ADC only when playing/capturing
Signed-off-by: default avatarKirill Marinushkin <kmarinushkin@birdec.tech>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 33f8db9a
...@@ -198,19 +198,25 @@ static const struct snd_kcontrol_new pcm3060_dapm_controls[] = { ...@@ -198,19 +198,25 @@ static const struct snd_kcontrol_new pcm3060_dapm_controls[] = {
}; };
static const struct snd_soc_dapm_widget pcm3060_dapm_widgets[] = { static const struct snd_soc_dapm_widget pcm3060_dapm_widgets[] = {
SND_SOC_DAPM_DAC("DAC", "Playback", PCM3060_REG64,
PCM3060_REG_SHIFT_DAPSV, 1),
SND_SOC_DAPM_OUTPUT("OUTL"), SND_SOC_DAPM_OUTPUT("OUTL"),
SND_SOC_DAPM_OUTPUT("OUTR"), SND_SOC_DAPM_OUTPUT("OUTR"),
SND_SOC_DAPM_INPUT("INL"), SND_SOC_DAPM_INPUT("INL"),
SND_SOC_DAPM_INPUT("INR"), SND_SOC_DAPM_INPUT("INR"),
SND_SOC_DAPM_ADC("ADC", "Capture", PCM3060_REG64,
PCM3060_REG_SHIFT_ADPSV, 1),
}; };
static const struct snd_soc_dapm_route pcm3060_dapm_map[] = { static const struct snd_soc_dapm_route pcm3060_dapm_map[] = {
{ "OUTL", NULL, "Playback" }, { "OUTL", NULL, "DAC" },
{ "OUTR", NULL, "Playback" }, { "OUTR", NULL, "DAC" },
{ "Capture", NULL, "INL" }, { "ADC", NULL, "INL" },
{ "Capture", NULL, "INR" }, { "ADC", NULL, "INR" },
}; };
/* soc component */ /* soc component */
......
...@@ -37,7 +37,9 @@ int pcm3060_remove(struct device *dev); ...@@ -37,7 +37,9 @@ int pcm3060_remove(struct device *dev);
#define PCM3060_REG_MRST 0x80 #define PCM3060_REG_MRST 0x80
#define PCM3060_REG_SRST 0x40 #define PCM3060_REG_SRST 0x40
#define PCM3060_REG_ADPSV 0x20 #define PCM3060_REG_ADPSV 0x20
#define PCM3060_REG_SHIFT_ADPSV 0x05
#define PCM3060_REG_DAPSV 0x10 #define PCM3060_REG_DAPSV 0x10
#define PCM3060_REG_SHIFT_DAPSV 0x04
#define PCM3060_REG_SE 0x01 #define PCM3060_REG_SE 0x01
#define PCM3060_REG65 0x41 #define PCM3060_REG65 0x41
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment