aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hsu <KCHSU0@nuvoton.com>2017-11-07 04:06:33 -0500
committerMark Brown <broonie@kernel.org>2017-11-07 05:30:21 -0500
commita2eb62edbd01064cee0c4c00854a25f04237605b (patch)
tree0684d19288357be923d9bbfc9481097566d333d2
parentcf6b68d192138d67b49002b499eb507af0c8c56d (diff)
ASoC: nau8824: condition for clock disable
There are headphone and speaker outputs in NAU88L24. During the playback, the codec should not change the clock status when switching these outputs. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/nau8824.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index b7b63ac037a7..8a9a9939827e 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -811,7 +811,8 @@ static void nau8824_eject_jack(struct nau8824 *nau8824)
811 NAU8824_JD_SLEEP_MODE, NAU8824_JD_SLEEP_MODE); 811 NAU8824_JD_SLEEP_MODE, NAU8824_JD_SLEEP_MODE);
812 812
813 /* Close clock for jack type detection at manual mode */ 813 /* Close clock for jack type detection at manual mode */
814 nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0); 814 if (dapm->bias_level < SND_SOC_BIAS_PREPARE)
815 nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0);
815} 816}
816 817
817static void nau8824_jdet_work(struct work_struct *work) 818static void nau8824_jdet_work(struct work_struct *work)
@@ -862,7 +863,8 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824)
862 regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING, 863 regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
863 NAU8824_IRQ_EJECT_DIS, 0); 864 NAU8824_IRQ_EJECT_DIS, 0);
864 /* Enable internal VCO needed for interruptions */ 865 /* Enable internal VCO needed for interruptions */
865 nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0); 866 if (nau8824->dapm->bias_level < SND_SOC_BIAS_PREPARE)
867 nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0);
866 regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL, 868 regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL,
867 NAU8824_JD_SLEEP_MODE, 0); 869 NAU8824_JD_SLEEP_MODE, 0);
868} 870}