diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2012-07-11 00:28:44 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2012-07-11 00:28:44 +0200 |
commit | ad46064b833f355b3ba39c4941e041b2a85ac393 (patch) | |
tree | 15315fe9702dfa5da8c3831832375c8a5a1c7f1d | |
parent | 80ec94c4975ea8227b52c4cb0157e213ed9d757b (diff) | |
download | rockbox-ad46064b833f355b3ba39c4941e041b2a85ac393.tar.gz rockbox-ad46064b833f355b3ba39c4941e041b2a85ac393.zip |
rk27xx codec: simplify startup
Change-Id: I8b610363e67ec640664aa0d03488e430ec461244
-rw-r--r-- | firmware/drivers/audio/rk27xx_codec.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/firmware/drivers/audio/rk27xx_codec.c b/firmware/drivers/audio/rk27xx_codec.c index c2b5980021..cfb98a9227 100644 --- a/firmware/drivers/audio/rk27xx_codec.c +++ b/firmware/drivers/audio/rk27xx_codec.c | |||
@@ -99,21 +99,19 @@ void audiohw_preinit(void) | |||
99 | 99 | ||
100 | void audiohw_postinit(void) | 100 | void audiohw_postinit(void) |
101 | { | 101 | { |
102 | /* power up DAC */ | ||
102 | codec_write(PMR1, SB_OUT|SB_MIX|SB_ADC|SB_IN1|SB_IN2|SB_MIC|SB_IND); | 103 | codec_write(PMR1, SB_OUT|SB_MIX|SB_ADC|SB_IN1|SB_IN2|SB_MIC|SB_IND); |
103 | 104 | ||
104 | udelay(10000); | 105 | /* leave sleep mode */ |
106 | codec_write(PMR2, GIM|SB_MC); | ||
105 | 107 | ||
106 | codec_write(PMR2, GIM | SB_MC); | 108 | /* 1ms delay */ |
107 | 109 | udelay(1000); | |
108 | udelay(10000); | ||
109 | |||
110 | codec_write(PMR1, SB_OUT|SB_ADC|SB_IN1|SB_IN2|SB_MIC|SB_IND); | ||
111 | |||
112 | udelay(10000); | ||
113 | 110 | ||
111 | /* power up output stage */ | ||
114 | codec_write(PMR1, SB_ADC|SB_IN1|SB_IN2|SB_MIC|SB_IND); | 112 | codec_write(PMR1, SB_ADC|SB_IN1|SB_IN2|SB_MIC|SB_IND); |
115 | 113 | ||
116 | sleep(3*HZ); | 114 | sleep(HZ/10); |
117 | GPIO_PDDR |= (1<<7); /* PD7 high */ | 115 | GPIO_PDDR |= (1<<7); /* PD7 high */ |
118 | sleep(HZ/10); | 116 | sleep(HZ/10); |
119 | 117 | ||