2
0

004-ASoC-JZ4740-delay-activation-of-the-DAC-to-work-arou.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From 1a1095927d224403af8ad57c354cc64521bf3081 Mon Sep 17 00:00:00 2001
  2. From: Paul Cercueil <paul@crapouillou.net>
  3. Date: Sat, 16 Jun 2012 19:36:31 +0200
  4. Subject: [PATCH 4/7] ASoC: JZ4740: delay activation of the DAC to work around
  5. a sound bug.
  6. A proper fix of that bug would require a big rewrite of the driver,
  7. which (I hope) will be done eventually.
  8. ---
  9. sound/soc/codecs/jz4740.c | 9 ++++++---
  10. 1 file changed, 6 insertions(+), 3 deletions(-)
  11. --- a/sound/soc/codecs/jz4740.c
  12. +++ b/sound/soc/codecs/jz4740.c
  13. @@ -249,12 +249,15 @@ static int jz4740_codec_set_bias_level(s
  14. case SND_SOC_BIAS_ON:
  15. break;
  16. case SND_SOC_BIAS_PREPARE:
  17. - mask = JZ4740_CODEC_1_VREF_DISABLE |
  18. - JZ4740_CODEC_1_VREF_AMP_DISABLE |
  19. - JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
  20. + mask = JZ4740_CODEC_1_HEADPHONE_POWERDOWN_M;
  21. value = 0;
  22. regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, value);
  23. +
  24. + msleep(500);
  25. + mask = JZ4740_CODEC_1_VREF_DISABLE |
  26. + JZ4740_CODEC_1_VREF_AMP_DISABLE;
  27. + regmap_update_bits(regmap, JZ4740_REG_CODEC_1, mask, 0);
  28. break;
  29. case SND_SOC_BIAS_STANDBY:
  30. /* The only way to clear the suspend flag is to reset the codec */