Skip to content

Commit

Permalink
ASoC: nau8824: condition for clock disable
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
John-Hsu authored and broonie committed Nov 7, 2017
1 parent cf6b68d commit a2eb62e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/codecs/nau8824.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ static void nau8824_eject_jack(struct nau8824 *nau8824)
NAU8824_JD_SLEEP_MODE, NAU8824_JD_SLEEP_MODE);

/* Close clock for jack type detection at manual mode */
nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0);
if (dapm->bias_level < SND_SOC_BIAS_PREPARE)
nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0);
}

static void nau8824_jdet_work(struct work_struct *work)
Expand Down Expand Up @@ -862,7 +863,8 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824)
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
NAU8824_IRQ_EJECT_DIS, 0);
/* Enable internal VCO needed for interruptions */
nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0);
if (nau8824->dapm->bias_level < SND_SOC_BIAS_PREPARE)
nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0);
regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL,
NAU8824_JD_SLEEP_MODE, 0);
}
Expand Down

0 comments on commit a2eb62e

Please sign in to comment.