diff options
Diffstat (limited to 'apps/pcmbuf.c')
-rw-r--r-- | apps/pcmbuf.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index bf5269a32e..1bcfb25f5e 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c | |||
@@ -61,9 +61,6 @@ static int crossfade_pos; | |||
61 | static int crossfade_amount; | 61 | static int crossfade_amount; |
62 | static int crossfade_rem; | 62 | static int crossfade_rem; |
63 | 63 | ||
64 | |||
65 | static bool boost_mode; | ||
66 | |||
67 | /* Crossfade modes. If CFM_CROSSFADE is selected, normal | 64 | /* Crossfade modes. If CFM_CROSSFADE is selected, normal |
68 | * crossfader will activate. Selecting CFM_FLUSH is a special | 65 | * crossfader will activate. Selecting CFM_FLUSH is a special |
69 | * operation that only overwrites the pcm buffer without crossfading. | 66 | * operation that only overwrites the pcm buffer without crossfading. |
@@ -93,6 +90,9 @@ void (*pcmbuf_watermark_event)(int bytes_left); | |||
93 | static int last_chunksize; | 90 | static int last_chunksize; |
94 | static long mixpos = 0; | 91 | static long mixpos = 0; |
95 | 92 | ||
93 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
94 | static bool boost_mode; | ||
95 | |||
96 | void pcmbuf_boost(bool state) | 96 | void pcmbuf_boost(bool state) |
97 | { | 97 | { |
98 | static bool boost_state = false; | 98 | static bool boost_state = false; |
@@ -101,13 +101,19 @@ void pcmbuf_boost(bool state) | |||
101 | return ; | 101 | return ; |
102 | 102 | ||
103 | if (state != boost_state) { | 103 | if (state != boost_state) { |
104 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
105 | cpu_boost(state); | 104 | cpu_boost(state); |
106 | #endif | ||
107 | boost_state = state; | 105 | boost_state = state; |
108 | } | 106 | } |
109 | } | 107 | } |
110 | 108 | ||
109 | void pcmbuf_set_boost_mode(bool state) | ||
110 | { | ||
111 | if (state) | ||
112 | pcmbuf_boost(true); | ||
113 | boost_mode = state; | ||
114 | } | ||
115 | #endif | ||
116 | |||
111 | int pcmbuf_num_used_buffers(void) | 117 | int pcmbuf_num_used_buffers(void) |
112 | { | 118 | { |
113 | return (pcmbuf_write_index - pcmbuf_read_index) & NUM_PCM_BUFFERS_MASK; | 119 | return (pcmbuf_write_index - pcmbuf_read_index) & NUM_PCM_BUFFERS_MASK; |
@@ -191,13 +197,6 @@ void pcmbuf_watermark_callback(int bytes_left) | |||
191 | crossfade_active = false; | 197 | crossfade_active = false; |
192 | } | 198 | } |
193 | 199 | ||
194 | void pcmbuf_set_boost_mode(bool state) | ||
195 | { | ||
196 | if (state) | ||
197 | pcmbuf_boost(true); | ||
198 | boost_mode = state; | ||
199 | } | ||
200 | |||
201 | void pcmbuf_add_event(void (*event_handler)(void)) | 200 | void pcmbuf_add_event(void (*event_handler)(void)) |
202 | { | 201 | { |
203 | pcmbuf_event_handler = event_handler; | 202 | pcmbuf_event_handler = event_handler; |