diff options
author | Dara Ramesh <dramesh@nvidia.com> | 2012-11-20 10:20:53 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-11-20 17:36:54 -0800 |
commit | 8e26b6a555ef40b7a8f945e0d683357547df00a6 (patch) | |
tree | 187d65061eb457ef9e6a4dc56d270fdc7e44db60 /sound | |
parent | 14331afc4cf1eb1235e75f4af64dc6e4998ff946 (diff) |
asoc: tegra: cs42l73: VSP capture changes
a) VSPOUTL/VSPOUTR and VSPIN as a single power bit to control,
disabling the playback path (VSPIN) causing VSPOUTL/VSPOUTR
(capture path) disables.
removed power management option with VSP AIF Stream widgets,
making the actual power controlled by a new VSPINOUT supply
widget. That way the power will be enabled as required.
b) added ADC Left/Right in DAPM route table for Headset Mic.
c) enabled MIC2 bias when headset is detected.
d) removed static VSPIN DAPM stream widget from DAPM route table.
Change-Id: Ia1022e196ba6b44cae3299b03755d87d42007eca
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: http://git-master/r/164892
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijay Mali <vmali@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/cs42l73.c | 12 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_cs42l73.c | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index fd776f2a74de..7286faf20b76 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -651,6 +651,7 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = { SND_SOC_DAPM_SUPPLY("MIC1 Bias", CS42L73_PWRCTL2, 6, 1, NULL, 0), SND_SOC_DAPM_INPUT("MIC2"), SND_SOC_DAPM_SUPPLY("MIC2 Bias", CS42L73_PWRCTL2, 7, 1, NULL, 0), + SND_SOC_DAPM_SUPPLY("VSPINOUT", CS42L73_PWRCTL2, 4, 1, NULL, 0), SND_SOC_DAPM_AIF_OUT("XSPOUTL", "XSP Capture", 0, CS42L73_PWRCTL2, 1, 1), @@ -661,9 +662,9 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = { SND_SOC_DAPM_AIF_OUT("ASPOUTR", "ASP Capture", 0, CS42L73_PWRCTL2, 3, 1), SND_SOC_DAPM_AIF_OUT("VSPOUTL", "VSP Capture", 0, - CS42L73_PWRCTL2, 4, 1), + SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_OUT("VSPOUTR", "VSP Capture", 0, - CS42L73_PWRCTL2, 4, 1), + SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_PGA("PGA Left", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_PGA("PGA Right", SND_SOC_NOPM, 0, 0, NULL, 0), @@ -706,7 +707,7 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = { CS42L73_PWRCTL2, 2, 1), SND_SOC_DAPM_AIF_IN("VSPIN", "VSP Playback", 0, - CS42L73_PWRCTL2, 4, 1), + SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_MIXER("HL Left Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("HL Right Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), @@ -833,6 +834,8 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = { {"HL Left Mixer", NULL, "VSPIN"}, {"HL Right Mixer", NULL, "VSPIN"}, + {"VSPIN", NULL, "VSPINOUT"}, + /* Capture Paths */ {"MIC1", NULL, "MIC1 Bias"}, {"PGA Left Mux", "Mic 1", "MIC1"}, @@ -877,6 +880,9 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = { {"VSPOUTL", "VSP-IP Volume", "VSPL Output Mixer"}, {"VSPOUTR", "VSP-IP Volume", "VSPR Output Mixer"}, + {"VSPOUTL", NULL, "VSPINOUT"}, + {"VSPOUTR", NULL, "VSPINOUT"}, + {"VSPOUTL", NULL, "VSPL Output Mixer"}, {"VSPOUTR", NULL, "VSPR Output Mixer"}, }; diff --git a/sound/soc/tegra/tegra_cs42l73.c b/sound/soc/tegra/tegra_cs42l73.c index 0a29bcff18d2..672ca9be654c 100644 --- a/sound/soc/tegra/tegra_cs42l73.c +++ b/sound/soc/tegra/tegra_cs42l73.c @@ -871,9 +871,11 @@ static int tegra_cs42l73_jack_notifier(struct notifier_block *self, case SND_JACK_HEADPHONE: /*For now force headset mic mode*/ /*state = BIT_HEADSET_NO_MIC; */ + snd_soc_update_bits(codec, CS42L73_PWRCTL2, PDN_MIC2_BIAS, 0); state = BIT_HEADSET; break; case SND_JACK_HEADSET: + snd_soc_update_bits(codec, CS42L73_PWRCTL2, PDN_MIC2_BIAS, 0); state = BIT_HEADSET; break; case SND_JACK_MICROPHONE: @@ -984,13 +986,14 @@ static const struct snd_soc_dapm_widget tegra_cs42l73_dapm_widgets[] = { static const struct snd_soc_dapm_route tegra_cs42l73_audio_map[] = { {"Int Spk", NULL, "SPKOUT"}, {"MIC2", NULL, "Headset Mic"}, + {"ADC Left", NULL, "Headset Mic"}, + {"ADC Right", NULL, "Headset Mic"}, /* Headphone (L+R)-> HPOUTA, HPOUTB */ {"Headphone", NULL, "HPOUTA"}, {"Headphone", NULL, "HPOUTB"}, - /* DMIC -> DMIC Left/Right and VSPIN */ + /* DMIC -> DMIC Left/Right */ {"DMIC Left", NULL, "Int D-Mic"}, {"DMIC Right", NULL, "Int D-Mic"}, - {"VSPIN", NULL, "Int D-Mic"}, }; static const struct snd_kcontrol_new tegra_cs42l73_controls[] = { |