diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-08 12:00:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-08 13:24:27 -0500 |
commit | 5b596483936230b926898efe10f9cc258d5ed092 (patch) | |
tree | 236dd0bb313118224ac325c7f0453e8f1cba0ed6 /sound/soc/codecs/wm8996.c | |
parent | da7f910bd0d3da2355b29dd19f4dcd4dfe3563e4 (diff) |
ASoC: wm8996: Remove separate output stage enable step
Marginally improve performance during startup.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8996.c')
-rw-r--r-- | sound/soc/codecs/wm8996.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index dd94cd035ac7..40a124c9f15d 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
@@ -890,8 +890,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm, | |||
890 | val = 0; | 890 | val = 0; |
891 | mask = 0; | 891 | mask = 0; |
892 | if (wm8996->hpout_pending & HPOUT1L) { | 892 | if (wm8996->hpout_pending & HPOUT1L) { |
893 | val |= WM8996_HPOUT1L_RMV_SHORT; | 893 | val |= WM8996_HPOUT1L_RMV_SHORT | WM8996_HPOUT1L_OUTP; |
894 | mask |= WM8996_HPOUT1L_RMV_SHORT; | 894 | mask |= WM8996_HPOUT1L_RMV_SHORT | WM8996_HPOUT1L_OUTP; |
895 | } else { | 895 | } else { |
896 | mask |= WM8996_HPOUT1L_RMV_SHORT | | 896 | mask |= WM8996_HPOUT1L_RMV_SHORT | |
897 | WM8996_HPOUT1L_OUTP | | 897 | WM8996_HPOUT1L_OUTP | |
@@ -899,8 +899,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm, | |||
899 | } | 899 | } |
900 | 900 | ||
901 | if (wm8996->hpout_pending & HPOUT1R) { | 901 | if (wm8996->hpout_pending & HPOUT1R) { |
902 | val |= WM8996_HPOUT1R_RMV_SHORT; | 902 | val |= WM8996_HPOUT1R_RMV_SHORT | WM8996_HPOUT1R_OUTP; |
903 | mask |= WM8996_HPOUT1R_RMV_SHORT; | 903 | mask |= WM8996_HPOUT1R_RMV_SHORT | WM8996_HPOUT1R_OUTP; |
904 | } else { | 904 | } else { |
905 | mask |= WM8996_HPOUT1R_RMV_SHORT | | 905 | mask |= WM8996_HPOUT1R_RMV_SHORT | |
906 | WM8996_HPOUT1R_OUTP | | 906 | WM8996_HPOUT1R_OUTP | |
@@ -912,8 +912,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm, | |||
912 | val = 0; | 912 | val = 0; |
913 | mask = 0; | 913 | mask = 0; |
914 | if (wm8996->hpout_pending & HPOUT2L) { | 914 | if (wm8996->hpout_pending & HPOUT2L) { |
915 | val |= WM8996_HPOUT2L_RMV_SHORT; | 915 | val |= WM8996_HPOUT2L_RMV_SHORT | WM8996_HPOUT2L_OUTP; |
916 | mask |= WM8996_HPOUT2L_RMV_SHORT; | 916 | mask |= WM8996_HPOUT2L_RMV_SHORT | WM8996_HPOUT2L_OUTP; |
917 | } else { | 917 | } else { |
918 | mask |= WM8996_HPOUT2L_RMV_SHORT | | 918 | mask |= WM8996_HPOUT2L_RMV_SHORT | |
919 | WM8996_HPOUT2L_OUTP | | 919 | WM8996_HPOUT2L_OUTP | |
@@ -921,8 +921,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm, | |||
921 | } | 921 | } |
922 | 922 | ||
923 | if (wm8996->hpout_pending & HPOUT2R) { | 923 | if (wm8996->hpout_pending & HPOUT2R) { |
924 | val |= WM8996_HPOUT2R_RMV_SHORT; | 924 | val |= WM8996_HPOUT2R_RMV_SHORT | WM8996_HPOUT2R_OUTP; |
925 | mask |= WM8996_HPOUT2R_RMV_SHORT; | 925 | mask |= WM8996_HPOUT2R_RMV_SHORT | WM8996_HPOUT2R_OUTP; |
926 | } else { | 926 | } else { |
927 | mask |= WM8996_HPOUT2R_RMV_SHORT | | 927 | mask |= WM8996_HPOUT2R_RMV_SHORT | |
928 | WM8996_HPOUT2R_OUTP | | 928 | WM8996_HPOUT2R_OUTP | |
@@ -1214,7 +1214,6 @@ SND_SOC_DAPM_PGA_S("HPOUT2L PGA", 0, WM8996_POWER_MANAGEMENT_1, 7, 0, NULL, 0), | |||
1214 | SND_SOC_DAPM_PGA_S("HPOUT2L_DLY", 1, WM8996_ANALOGUE_HP_2, 5, 0, NULL, 0), | 1214 | SND_SOC_DAPM_PGA_S("HPOUT2L_DLY", 1, WM8996_ANALOGUE_HP_2, 5, 0, NULL, 0), |
1215 | SND_SOC_DAPM_PGA_S("HPOUT2L_DCS", 2, WM8996_DC_SERVO_1, 2, 0, dcs_start, | 1215 | SND_SOC_DAPM_PGA_S("HPOUT2L_DCS", 2, WM8996_DC_SERVO_1, 2, 0, dcs_start, |
1216 | SND_SOC_DAPM_POST_PMU), | 1216 | SND_SOC_DAPM_POST_PMU), |
1217 | SND_SOC_DAPM_PGA_S("HPOUT2L_OUTP", 3, WM8996_ANALOGUE_HP_2, 6, 0, NULL, 0), | ||
1218 | SND_SOC_DAPM_PGA_S("HPOUT2L_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT2L, 0, | 1217 | SND_SOC_DAPM_PGA_S("HPOUT2L_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT2L, 0, |
1219 | rmv_short_event, | 1218 | rmv_short_event, |
1220 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | 1219 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -1223,7 +1222,6 @@ SND_SOC_DAPM_PGA_S("HPOUT2R PGA", 0, WM8996_POWER_MANAGEMENT_1, 6, 0,NULL, 0), | |||
1223 | SND_SOC_DAPM_PGA_S("HPOUT2R_DLY", 1, WM8996_ANALOGUE_HP_2, 1, 0, NULL, 0), | 1222 | SND_SOC_DAPM_PGA_S("HPOUT2R_DLY", 1, WM8996_ANALOGUE_HP_2, 1, 0, NULL, 0), |
1224 | SND_SOC_DAPM_PGA_S("HPOUT2R_DCS", 2, WM8996_DC_SERVO_1, 3, 0, dcs_start, | 1223 | SND_SOC_DAPM_PGA_S("HPOUT2R_DCS", 2, WM8996_DC_SERVO_1, 3, 0, dcs_start, |
1225 | SND_SOC_DAPM_POST_PMU), | 1224 | SND_SOC_DAPM_POST_PMU), |
1226 | SND_SOC_DAPM_PGA_S("HPOUT2R_OUTP", 3, WM8996_ANALOGUE_HP_2, 2, 0, NULL, 0), | ||
1227 | SND_SOC_DAPM_PGA_S("HPOUT2R_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT2R, 0, | 1225 | SND_SOC_DAPM_PGA_S("HPOUT2R_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT2R, 0, |
1228 | rmv_short_event, | 1226 | rmv_short_event, |
1229 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | 1227 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -1232,7 +1230,6 @@ SND_SOC_DAPM_PGA_S("HPOUT1L PGA", 0, WM8996_POWER_MANAGEMENT_1, 5, 0, NULL, 0), | |||
1232 | SND_SOC_DAPM_PGA_S("HPOUT1L_DLY", 1, WM8996_ANALOGUE_HP_1, 5, 0, NULL, 0), | 1230 | SND_SOC_DAPM_PGA_S("HPOUT1L_DLY", 1, WM8996_ANALOGUE_HP_1, 5, 0, NULL, 0), |
1233 | SND_SOC_DAPM_PGA_S("HPOUT1L_DCS", 2, WM8996_DC_SERVO_1, 0, 0, dcs_start, | 1231 | SND_SOC_DAPM_PGA_S("HPOUT1L_DCS", 2, WM8996_DC_SERVO_1, 0, 0, dcs_start, |
1234 | SND_SOC_DAPM_POST_PMU), | 1232 | SND_SOC_DAPM_POST_PMU), |
1235 | SND_SOC_DAPM_PGA_S("HPOUT1L_OUTP", 3, WM8996_ANALOGUE_HP_1, 6, 0, NULL, 0), | ||
1236 | SND_SOC_DAPM_PGA_S("HPOUT1L_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT1L, 0, | 1233 | SND_SOC_DAPM_PGA_S("HPOUT1L_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT1L, 0, |
1237 | rmv_short_event, | 1234 | rmv_short_event, |
1238 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | 1235 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -1241,7 +1238,6 @@ SND_SOC_DAPM_PGA_S("HPOUT1R PGA", 0, WM8996_POWER_MANAGEMENT_1, 4, 0, NULL, 0), | |||
1241 | SND_SOC_DAPM_PGA_S("HPOUT1R_DLY", 1, WM8996_ANALOGUE_HP_1, 1, 0, NULL, 0), | 1238 | SND_SOC_DAPM_PGA_S("HPOUT1R_DLY", 1, WM8996_ANALOGUE_HP_1, 1, 0, NULL, 0), |
1242 | SND_SOC_DAPM_PGA_S("HPOUT1R_DCS", 2, WM8996_DC_SERVO_1, 1, 0, dcs_start, | 1239 | SND_SOC_DAPM_PGA_S("HPOUT1R_DCS", 2, WM8996_DC_SERVO_1, 1, 0, dcs_start, |
1243 | SND_SOC_DAPM_POST_PMU), | 1240 | SND_SOC_DAPM_POST_PMU), |
1244 | SND_SOC_DAPM_PGA_S("HPOUT1R_OUTP", 3, WM8996_ANALOGUE_HP_1, 2, 0, NULL, 0), | ||
1245 | SND_SOC_DAPM_PGA_S("HPOUT1R_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT1R, 0, | 1241 | SND_SOC_DAPM_PGA_S("HPOUT1R_RMV_SHORT", 3, SND_SOC_NOPM, HPOUT1R, 0, |
1246 | rmv_short_event, | 1242 | rmv_short_event, |
1247 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), | 1243 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -1434,32 +1430,28 @@ static const struct snd_soc_dapm_route wm8996_dapm_routes[] = { | |||
1434 | { "HPOUT2L PGA", NULL, "DAC2L" }, | 1430 | { "HPOUT2L PGA", NULL, "DAC2L" }, |
1435 | { "HPOUT2L_DLY", NULL, "HPOUT2L PGA" }, | 1431 | { "HPOUT2L_DLY", NULL, "HPOUT2L PGA" }, |
1436 | { "HPOUT2L_DCS", NULL, "HPOUT2L_DLY" }, | 1432 | { "HPOUT2L_DCS", NULL, "HPOUT2L_DLY" }, |
1437 | { "HPOUT2L_OUTP", NULL, "HPOUT2L_DCS" }, | 1433 | { "HPOUT2L_RMV_SHORT", NULL, "HPOUT2L_DCS" }, |
1438 | { "HPOUT2L_RMV_SHORT", NULL, "HPOUT2L_OUTP" }, | ||
1439 | 1434 | ||
1440 | { "HPOUT2R PGA", NULL, "Charge Pump" }, | 1435 | { "HPOUT2R PGA", NULL, "Charge Pump" }, |
1441 | { "HPOUT2R PGA", NULL, "Bandgap" }, | 1436 | { "HPOUT2R PGA", NULL, "Bandgap" }, |
1442 | { "HPOUT2R PGA", NULL, "DAC2R" }, | 1437 | { "HPOUT2R PGA", NULL, "DAC2R" }, |
1443 | { "HPOUT2R_DLY", NULL, "HPOUT2R PGA" }, | 1438 | { "HPOUT2R_DLY", NULL, "HPOUT2R PGA" }, |
1444 | { "HPOUT2R_DCS", NULL, "HPOUT2R_DLY" }, | 1439 | { "HPOUT2R_DCS", NULL, "HPOUT2R_DLY" }, |
1445 | { "HPOUT2R_OUTP", NULL, "HPOUT2R_DCS" }, | 1440 | { "HPOUT2R_RMV_SHORT", NULL, "HPOUT2R_DCS" }, |
1446 | { "HPOUT2R_RMV_SHORT", NULL, "HPOUT2R_OUTP" }, | ||
1447 | 1441 | ||
1448 | { "HPOUT1L PGA", NULL, "Charge Pump" }, | 1442 | { "HPOUT1L PGA", NULL, "Charge Pump" }, |
1449 | { "HPOUT1L PGA", NULL, "Bandgap" }, | 1443 | { "HPOUT1L PGA", NULL, "Bandgap" }, |
1450 | { "HPOUT1L PGA", NULL, "DAC1L" }, | 1444 | { "HPOUT1L PGA", NULL, "DAC1L" }, |
1451 | { "HPOUT1L_DLY", NULL, "HPOUT1L PGA" }, | 1445 | { "HPOUT1L_DLY", NULL, "HPOUT1L PGA" }, |
1452 | { "HPOUT1L_DCS", NULL, "HPOUT1L_DLY" }, | 1446 | { "HPOUT1L_DCS", NULL, "HPOUT1L_DLY" }, |
1453 | { "HPOUT1L_OUTP", NULL, "HPOUT1L_DCS" }, | 1447 | { "HPOUT1L_RMV_SHORT", NULL, "HPOUT1L_DCS" }, |
1454 | { "HPOUT1L_RMV_SHORT", NULL, "HPOUT1L_OUTP" }, | ||
1455 | 1448 | ||
1456 | { "HPOUT1R PGA", NULL, "Charge Pump" }, | 1449 | { "HPOUT1R PGA", NULL, "Charge Pump" }, |
1457 | { "HPOUT1R PGA", NULL, "Bandgap" }, | 1450 | { "HPOUT1R PGA", NULL, "Bandgap" }, |
1458 | { "HPOUT1R PGA", NULL, "DAC1R" }, | 1451 | { "HPOUT1R PGA", NULL, "DAC1R" }, |
1459 | { "HPOUT1R_DLY", NULL, "HPOUT1R PGA" }, | 1452 | { "HPOUT1R_DLY", NULL, "HPOUT1R PGA" }, |
1460 | { "HPOUT1R_DCS", NULL, "HPOUT1R_DLY" }, | 1453 | { "HPOUT1R_DCS", NULL, "HPOUT1R_DLY" }, |
1461 | { "HPOUT1R_OUTP", NULL, "HPOUT1R_DCS" }, | 1454 | { "HPOUT1R_RMV_SHORT", NULL, "HPOUT1R_DCS" }, |
1462 | { "HPOUT1R_RMV_SHORT", NULL, "HPOUT1R_OUTP" }, | ||
1463 | 1455 | ||
1464 | { "HPOUT2L", NULL, "HPOUT2L_RMV_SHORT" }, | 1456 | { "HPOUT2L", NULL, "HPOUT2L_RMV_SHORT" }, |
1465 | { "HPOUT2R", NULL, "HPOUT2R_RMV_SHORT" }, | 1457 | { "HPOUT2R", NULL, "HPOUT2R_RMV_SHORT" }, |