Lines Matching refs:config

31 status_t HidlUtils::audioConfigFromHal(const audio_config_t& halConfig, AudioConfig* config) {  in audioConfigFromHal()  argument
32 config->sampleRateHz = halConfig.sample_rate; in audioConfigFromHal()
33 config->channelMask = EnumBitfield<AudioChannelMask>(halConfig.channel_mask); in audioConfigFromHal()
34 config->format = AudioFormat(halConfig.format); in audioConfigFromHal()
35 status_t status = audioOffloadInfoFromHal(halConfig.offload_info, &config->offloadInfo); in audioConfigFromHal()
36 config->frameCount = halConfig.frame_count; in audioConfigFromHal()
40 void HidlUtils::audioConfigToHal(const AudioConfig& config, audio_config_t* halConfig) { in audioConfigToHal() argument
42 halConfig->sample_rate = config.sampleRateHz; in audioConfigToHal()
43 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioConfigToHal()
44 halConfig->format = static_cast<audio_format_t>(config.format); in audioConfigToHal()
45 audioOffloadInfoToHal(config.offloadInfo, &halConfig->offload_info); in audioConfigToHal()
46 halConfig->frame_count = config.frameCount; in audioConfigToHal()
50 AudioGainConfig* config) { in audioGainConfigFromHal() argument
51 config->index = halConfig.index; in audioGainConfigFromHal()
52 config->mode = EnumBitfield<AudioGainMode>(halConfig.mode); in audioGainConfigFromHal()
53 config->channelMask = EnumBitfield<AudioChannelMask>(halConfig.channel_mask); in audioGainConfigFromHal()
55 config->values[i] = halConfig.values[i]; in audioGainConfigFromHal()
57 config->rampDurationMs = halConfig.ramp_duration_ms; in audioGainConfigFromHal()
60 void HidlUtils::audioGainConfigToHal(const AudioGainConfig& config, in audioGainConfigToHal() argument
62 halConfig->index = config.index; in audioGainConfigToHal()
63 halConfig->mode = static_cast<audio_gain_mode_t>(config.mode); in audioGainConfigToHal()
64 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioGainConfigToHal()
67 halConfig->values[i] = config.values[i]; in audioGainConfigToHal()
69 halConfig->ramp_duration_ms = config.rampDurationMs; in audioGainConfigToHal()
170 AudioPortConfig* config) { in audioPortConfigFromHal() argument
171 config->id = halConfig.id; in audioPortConfigFromHal()
172 config->role = AudioPortRole(halConfig.role); in audioPortConfigFromHal()
173 config->type = AudioPortType(halConfig.type); in audioPortConfigFromHal()
174 config->configMask = EnumBitfield<AudioPortConfigMask>(halConfig.config_mask); in audioPortConfigFromHal()
175 config->sampleRateHz = halConfig.sample_rate; in audioPortConfigFromHal()
176 config->channelMask = EnumBitfield<AudioChannelMask>(halConfig.channel_mask); in audioPortConfigFromHal()
177 config->format = AudioFormat(halConfig.format); in audioPortConfigFromHal()
178 audioGainConfigFromHal(halConfig.gain, &config->gain); in audioPortConfigFromHal()
183 config->ext.device.hwModule = halConfig.ext.device.hw_module; in audioPortConfigFromHal()
184 config->ext.device.type = AudioDevice(halConfig.ext.device.type); in audioPortConfigFromHal()
185 memcpy(config->ext.device.address.data(), halConfig.ext.device.address, in audioPortConfigFromHal()
190 config->ext.mix.hwModule = halConfig.ext.mix.hw_module; in audioPortConfigFromHal()
191 config->ext.mix.ioHandle = halConfig.ext.mix.handle; in audioPortConfigFromHal()
193 config->ext.mix.useCase.stream = AudioStreamType(halConfig.ext.mix.usecase.stream); in audioPortConfigFromHal()
195 config->ext.mix.useCase.source = AudioSource(halConfig.ext.mix.usecase.source); in audioPortConfigFromHal()
200 config->ext.session.session = halConfig.ext.session.session; in audioPortConfigFromHal()
206 void HidlUtils::audioPortConfigToHal(const AudioPortConfig& config, in audioPortConfigToHal() argument
209 halConfig->id = config.id; in audioPortConfigToHal()
210 halConfig->role = static_cast<audio_port_role_t>(config.role); in audioPortConfigToHal()
211 halConfig->type = static_cast<audio_port_type_t>(config.type); in audioPortConfigToHal()
212 halConfig->config_mask = static_cast<unsigned int>(config.configMask); in audioPortConfigToHal()
213 halConfig->sample_rate = config.sampleRateHz; in audioPortConfigToHal()
214 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioPortConfigToHal()
215 halConfig->format = static_cast<audio_format_t>(config.format); in audioPortConfigToHal()
216 audioGainConfigToHal(config.gain, &halConfig->gain); in audioPortConfigToHal()
217 switch (config.type) { in audioPortConfigToHal()
221 halConfig->ext.device.hw_module = config.ext.device.hwModule; in audioPortConfigToHal()
222 halConfig->ext.device.type = static_cast<audio_devices_t>(config.ext.device.type); in audioPortConfigToHal()
223 memcpy(halConfig->ext.device.address, config.ext.device.address.data(), in audioPortConfigToHal()
228 halConfig->ext.mix.hw_module = config.ext.mix.hwModule; in audioPortConfigToHal()
229 halConfig->ext.mix.handle = config.ext.mix.ioHandle; in audioPortConfigToHal()
230 if (config.role == AudioPortRole::SOURCE) { in audioPortConfigToHal()
232 static_cast<audio_stream_type_t>(config.ext.mix.useCase.stream); in audioPortConfigToHal()
233 } else if (config.role == AudioPortRole::SINK) { in audioPortConfigToHal()
235 static_cast<audio_source_t>(config.ext.mix.useCase.source); in audioPortConfigToHal()
241 static_cast<audio_session_t>(config.ext.session.session); in audioPortConfigToHal()