Lines Matching refs:context

98 void reverb_auxiliary_init(reverb_context_t *context)  in reverb_auxiliary_init()  argument
100 context->auxiliary = true; in reverb_auxiliary_init()
101 context->preset = false; in reverb_auxiliary_init()
104 void reverb_insert_init(reverb_context_t *context) in reverb_insert_init() argument
106 context->auxiliary = false; in reverb_insert_init()
107 context->preset = true; in reverb_insert_init()
108 context->cur_preset = REVERB_PRESET_LAST + 1; in reverb_insert_init()
109 context->next_preset = REVERB_DEFAULT_PRESET; in reverb_insert_init()
112 void reverb_preset_init(reverb_context_t *context) in reverb_preset_init() argument
114 context->auxiliary = false; in reverb_preset_init()
115 context->preset = true; in reverb_preset_init()
116 context->cur_preset = REVERB_PRESET_LAST + 1; in reverb_preset_init()
117 context->next_preset = REVERB_DEFAULT_PRESET; in reverb_preset_init()
123 int16_t reverb_get_room_level(reverb_context_t *context) in reverb_get_room_level() argument
125 ALOGV("%s: room level: %d", __func__, context->reverb_settings.roomLevel); in reverb_get_room_level()
126 return context->reverb_settings.roomLevel; in reverb_get_room_level()
129 void reverb_set_room_level(reverb_context_t *context, int16_t room_level) in reverb_set_room_level() argument
132 context->reverb_settings.roomLevel = room_level; in reverb_set_room_level()
133 offload_reverb_set_room_level(&(context->offload_reverb), room_level); in reverb_set_room_level()
134 if (context->ctl) in reverb_set_room_level()
135 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_room_level()
140 int16_t reverb_get_room_hf_level(reverb_context_t *context) in reverb_get_room_hf_level() argument
143 context->reverb_settings.roomHFLevel); in reverb_get_room_hf_level()
144 return context->reverb_settings.roomHFLevel; in reverb_get_room_hf_level()
147 void reverb_set_room_hf_level(reverb_context_t *context, int16_t room_hf_level) in reverb_set_room_hf_level() argument
150 context->reverb_settings.roomHFLevel = room_hf_level; in reverb_set_room_hf_level()
151 offload_reverb_set_room_hf_level(&(context->offload_reverb), room_hf_level); in reverb_set_room_hf_level()
152 if (context->ctl) in reverb_set_room_hf_level()
153 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_room_hf_level()
158 uint32_t reverb_get_decay_time(reverb_context_t *context) in reverb_get_decay_time() argument
160 ALOGV("%s: decay time: %d", __func__, context->reverb_settings.decayTime); in reverb_get_decay_time()
161 return context->reverb_settings.decayTime; in reverb_get_decay_time()
164 void reverb_set_decay_time(reverb_context_t *context, uint32_t decay_time) in reverb_set_decay_time() argument
167 context->reverb_settings.decayTime = decay_time; in reverb_set_decay_time()
168 offload_reverb_set_decay_time(&(context->offload_reverb), decay_time); in reverb_set_decay_time()
169 if (context->ctl) in reverb_set_decay_time()
170 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_decay_time()
175 int16_t reverb_get_decay_hf_ratio(reverb_context_t *context) in reverb_get_decay_hf_ratio() argument
178 context->reverb_settings.decayHFRatio); in reverb_get_decay_hf_ratio()
179 return context->reverb_settings.decayHFRatio; in reverb_get_decay_hf_ratio()
182 void reverb_set_decay_hf_ratio(reverb_context_t *context, int16_t decay_hf_ratio) in reverb_set_decay_hf_ratio() argument
185 context->reverb_settings.decayHFRatio = decay_hf_ratio; in reverb_set_decay_hf_ratio()
186 offload_reverb_set_decay_hf_ratio(&(context->offload_reverb), decay_hf_ratio); in reverb_set_decay_hf_ratio()
187 if (context->ctl) in reverb_set_decay_hf_ratio()
188 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_decay_hf_ratio()
193 int16_t reverb_get_reverb_level(reverb_context_t *context) in reverb_get_reverb_level() argument
195 ALOGV("%s: reverb level: %d", __func__, context->reverb_settings.reverbLevel); in reverb_get_reverb_level()
196 return context->reverb_settings.reverbLevel; in reverb_get_reverb_level()
199 void reverb_set_reverb_level(reverb_context_t *context, int16_t reverb_level) in reverb_set_reverb_level() argument
202 context->reverb_settings.reverbLevel = reverb_level; in reverb_set_reverb_level()
203 offload_reverb_set_reverb_level(&(context->offload_reverb), reverb_level); in reverb_set_reverb_level()
204 if (context->ctl) in reverb_set_reverb_level()
205 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_reverb_level()
210 int16_t reverb_get_diffusion(reverb_context_t *context) in reverb_get_diffusion() argument
212 ALOGV("%s: diffusion: %d", __func__, context->reverb_settings.diffusion); in reverb_get_diffusion()
213 return context->reverb_settings.diffusion; in reverb_get_diffusion()
216 void reverb_set_diffusion(reverb_context_t *context, int16_t diffusion) in reverb_set_diffusion() argument
219 context->reverb_settings.diffusion = diffusion; in reverb_set_diffusion()
220 offload_reverb_set_diffusion(&(context->offload_reverb), diffusion); in reverb_set_diffusion()
221 if (context->ctl) in reverb_set_diffusion()
222 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_diffusion()
227 int16_t reverb_get_density(reverb_context_t *context) in reverb_get_density() argument
229 ALOGV("%s: density: %d", __func__, context->reverb_settings.density); in reverb_get_density()
230 return context->reverb_settings.density; in reverb_get_density()
233 void reverb_set_density(reverb_context_t *context, int16_t density) in reverb_set_density() argument
236 context->reverb_settings.density = density; in reverb_set_density()
237 offload_reverb_set_density(&(context->offload_reverb), density); in reverb_set_density()
238 if (context->ctl) in reverb_set_density()
239 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_density()
244 void reverb_set_preset(reverb_context_t *context, int16_t preset) in reverb_set_preset() argument
248 context->next_preset = preset; in reverb_set_preset()
249 offload_reverb_set_preset(&(context->offload_reverb), preset); in reverb_set_preset()
252 offload_reverb_set_enable_flag(&(context->offload_reverb), enable); in reverb_set_preset()
254 if (context->ctl) in reverb_set_preset()
255 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_preset()
260 void reverb_set_all_properties(reverb_context_t *context, in reverb_set_all_properties() argument
264 context->reverb_settings.roomLevel = reverb_settings->roomLevel; in reverb_set_all_properties()
265 context->reverb_settings.roomHFLevel = reverb_settings->roomHFLevel; in reverb_set_all_properties()
266 context->reverb_settings.decayTime = reverb_settings->decayTime; in reverb_set_all_properties()
267 context->reverb_settings.decayHFRatio = reverb_settings->decayHFRatio; in reverb_set_all_properties()
268 context->reverb_settings.reverbLevel = reverb_settings->reverbLevel; in reverb_set_all_properties()
269 context->reverb_settings.diffusion = reverb_settings->diffusion; in reverb_set_all_properties()
270 context->reverb_settings.density = reverb_settings->density; in reverb_set_all_properties()
271 if (context->ctl) in reverb_set_all_properties()
272 offload_reverb_send_params(context->ctl, &context->offload_reverb, in reverb_set_all_properties()
283 void reverb_load_preset(reverb_context_t *context) in reverb_load_preset() argument
285 context->cur_preset = context->next_preset; in reverb_load_preset()
287 if (context->cur_preset != REVERB_PRESET_NONE) { in reverb_load_preset()
288 const reverb_settings_t *preset = &reverb_presets[context->cur_preset]; in reverb_load_preset()
289 reverb_set_room_level(context, preset->roomLevel); in reverb_load_preset()
290 reverb_set_room_hf_level(context, preset->roomHFLevel); in reverb_load_preset()
291 reverb_set_decay_time(context, preset->decayTime); in reverb_load_preset()
292 reverb_set_decay_hf_ratio(context, preset->decayHFRatio); in reverb_load_preset()
293 reverb_set_reverb_level(context, preset->reverbLevel); in reverb_load_preset()
294 reverb_set_diffusion(context, preset->diffusion); in reverb_load_preset()
295 reverb_set_density(context, preset->density); in reverb_load_preset()
299 int reverb_get_parameter(effect_context_t *context, effect_param_t *p, in reverb_get_parameter() argument
302 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_get_parameter()
449 int reverb_set_parameter(effect_context_t *context, effect_param_t *p, in reverb_set_parameter() argument
452 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_set_parameter()
529 int reverb_set_device(effect_context_t *context, uint32_t device) in reverb_set_device() argument
531 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_set_device()
539 int reverb_reset(effect_context_t *context) in reverb_reset() argument
541 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_reset()
546 int reverb_init(effect_context_t *context) in reverb_init() argument
548 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_init()
550 context->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ; in reverb_init()
555 context->config.inputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; in reverb_init()
556 context->config.inputCfg.format = AUDIO_FORMAT_PCM_16_BIT; in reverb_init()
557 context->config.inputCfg.samplingRate = 44100; in reverb_init()
558 context->config.inputCfg.bufferProvider.getBuffer = NULL; in reverb_init()
559 context->config.inputCfg.bufferProvider.releaseBuffer = NULL; in reverb_init()
560 context->config.inputCfg.bufferProvider.cookie = NULL; in reverb_init()
561 context->config.inputCfg.mask = EFFECT_CONFIG_ALL; in reverb_init()
562 context->config.outputCfg.accessMode = EFFECT_BUFFER_ACCESS_ACCUMULATE; in reverb_init()
563 context->config.outputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; in reverb_init()
564 context->config.outputCfg.format = AUDIO_FORMAT_PCM_16_BIT; in reverb_init()
565 context->config.outputCfg.samplingRate = 44100; in reverb_init()
566 context->config.outputCfg.bufferProvider.getBuffer = NULL; in reverb_init()
567 context->config.outputCfg.bufferProvider.releaseBuffer = NULL; in reverb_init()
568 context->config.outputCfg.bufferProvider.cookie = NULL; in reverb_init()
569 context->config.outputCfg.mask = EFFECT_CONFIG_ALL; in reverb_init()
571 set_config(context, &context->config); in reverb_init()
583 int reverb_enable(effect_context_t *context) in reverb_enable() argument
585 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_enable()
594 int reverb_disable(effect_context_t *context) in reverb_disable() argument
596 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_disable()
609 int reverb_start(effect_context_t *context, output_context_t *output) in reverb_start() argument
611 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_start()
626 int reverb_stop(effect_context_t *context, output_context_t *output __unused) in reverb_stop() argument
628 reverb_context_t *reverb_ctxt = (reverb_context_t *)context; in reverb_stop()