• Home
  • Raw
  • Download

Lines Matching refs:halConfig

31 void 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 audioOffloadInfoFromHal(halConfig.offload_info, &config->offloadInfo); in audioConfigFromHal()
36 config->frameCount = halConfig.frame_count; in audioConfigFromHal()
39 void HidlUtils::audioConfigToHal(const AudioConfig& config, audio_config_t* halConfig) { in audioConfigToHal() argument
40 memset(halConfig, 0, sizeof(audio_config_t)); in audioConfigToHal()
41 halConfig->sample_rate = config.sampleRateHz; in audioConfigToHal()
42 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioConfigToHal()
43 halConfig->format = static_cast<audio_format_t>(config.format); in audioConfigToHal()
44 audioOffloadInfoToHal(config.offloadInfo, &halConfig->offload_info); in audioConfigToHal()
45 halConfig->frame_count = config.frameCount; in audioConfigToHal()
48 void HidlUtils::audioGainConfigFromHal(const struct audio_gain_config& halConfig, in audioGainConfigFromHal() argument
50 config->index = halConfig.index; in audioGainConfigFromHal()
51 config->mode = EnumBitfield<AudioGainMode>(halConfig.mode); in audioGainConfigFromHal()
52 config->channelMask = EnumBitfield<AudioChannelMask>(halConfig.channel_mask); in audioGainConfigFromHal()
54 config->values[i] = halConfig.values[i]; in audioGainConfigFromHal()
56 config->rampDurationMs = halConfig.ramp_duration_ms; in audioGainConfigFromHal()
60 struct audio_gain_config* halConfig) { in audioGainConfigToHal() argument
61 halConfig->index = config.index; in audioGainConfigToHal()
62 halConfig->mode = static_cast<audio_gain_mode_t>(config.mode); in audioGainConfigToHal()
63 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioGainConfigToHal()
64 memset(halConfig->values, 0, sizeof(halConfig->values)); in audioGainConfigToHal()
66 halConfig->values[i] = config.values[i]; in audioGainConfigToHal()
68 halConfig->ramp_duration_ms = config.rampDurationMs; in audioGainConfigToHal()
140 void HidlUtils::audioPortConfigFromHal(const struct audio_port_config& halConfig, in audioPortConfigFromHal() argument
142 config->id = halConfig.id; in audioPortConfigFromHal()
143 config->role = AudioPortRole(halConfig.role); in audioPortConfigFromHal()
144 config->type = AudioPortType(halConfig.type); in audioPortConfigFromHal()
145 config->configMask = EnumBitfield<AudioPortConfigMask>(halConfig.config_mask); in audioPortConfigFromHal()
146 config->sampleRateHz = halConfig.sample_rate; in audioPortConfigFromHal()
147 config->channelMask = EnumBitfield<AudioChannelMask>(halConfig.channel_mask); in audioPortConfigFromHal()
148 config->format = AudioFormat(halConfig.format); in audioPortConfigFromHal()
149 audioGainConfigFromHal(halConfig.gain, &config->gain); in audioPortConfigFromHal()
150 switch (halConfig.type) { in audioPortConfigFromHal()
154 config->ext.device.hwModule = halConfig.ext.device.hw_module; in audioPortConfigFromHal()
155 config->ext.device.type = AudioDevice(halConfig.ext.device.type); in audioPortConfigFromHal()
156 memcpy(config->ext.device.address.data(), halConfig.ext.device.address, in audioPortConfigFromHal()
161 config->ext.mix.hwModule = halConfig.ext.mix.hw_module; in audioPortConfigFromHal()
162 config->ext.mix.ioHandle = halConfig.ext.mix.handle; in audioPortConfigFromHal()
163 if (halConfig.role == AUDIO_PORT_ROLE_SOURCE) { in audioPortConfigFromHal()
164 config->ext.mix.useCase.stream = AudioStreamType(halConfig.ext.mix.usecase.stream); in audioPortConfigFromHal()
165 } else if (halConfig.role == AUDIO_PORT_ROLE_SINK) { in audioPortConfigFromHal()
166 config->ext.mix.useCase.source = AudioSource(halConfig.ext.mix.usecase.source); in audioPortConfigFromHal()
171 config->ext.session.session = halConfig.ext.session.session; in audioPortConfigFromHal()
178 struct audio_port_config* halConfig) { in audioPortConfigToHal() argument
179 memset(halConfig, 0, sizeof(audio_port_config)); in audioPortConfigToHal()
180 halConfig->id = config.id; in audioPortConfigToHal()
181 halConfig->role = static_cast<audio_port_role_t>(config.role); in audioPortConfigToHal()
182 halConfig->type = static_cast<audio_port_type_t>(config.type); in audioPortConfigToHal()
183 halConfig->config_mask = static_cast<unsigned int>(config.configMask); in audioPortConfigToHal()
184 halConfig->sample_rate = config.sampleRateHz; in audioPortConfigToHal()
185 halConfig->channel_mask = static_cast<audio_channel_mask_t>(config.channelMask); in audioPortConfigToHal()
186 halConfig->format = static_cast<audio_format_t>(config.format); in audioPortConfigToHal()
187 audioGainConfigToHal(config.gain, &halConfig->gain); in audioPortConfigToHal()
192 halConfig->ext.device.hw_module = config.ext.device.hwModule; in audioPortConfigToHal()
193 halConfig->ext.device.type = static_cast<audio_devices_t>(config.ext.device.type); in audioPortConfigToHal()
194 memcpy(halConfig->ext.device.address, config.ext.device.address.data(), in audioPortConfigToHal()
199 halConfig->ext.mix.hw_module = config.ext.mix.hwModule; in audioPortConfigToHal()
200 halConfig->ext.mix.handle = config.ext.mix.ioHandle; in audioPortConfigToHal()
202 halConfig->ext.mix.usecase.stream = in audioPortConfigToHal()
205 halConfig->ext.mix.usecase.source = in audioPortConfigToHal()
211 halConfig->ext.session.session = in audioPortConfigToHal()