Lines Matching refs:ctl

62             struct mixer_ctl* ctl = mixer_get_ctl_by_name(mixer, ctlName.c_str());  in initializeMixerControls()  local
63 if (ctl != nullptr && mixer_ctl_get_type(ctl) == expectedCtlType) { in initializeMixerControls()
64 mixerControls.emplace(control, ctl); in initializeMixerControls()
172 ndk::ScopedAStatus Mixer::findControl(Control ctl, struct mixer_ctl** result) { in findControl() argument
176 if (auto it = mMixerControls.find(ctl); it != mMixerControls.end()) { in findControl()
183 ndk::ScopedAStatus Mixer::getMixerControlMute(Control ctl, bool* muted) { in getMixerControlMute() argument
185 RETURN_STATUS_IF_ERROR(findControl(ctl, &mctl)); in getMixerControlMute()
189 LOG(ERROR) << __func__ << ": failed to get " << ctl << ", err=" << err; in getMixerControlMute()
193 LOG(ERROR) << __func__ << ": got no values for " << ctl; in getMixerControlMute()
200 ndk::ScopedAStatus Mixer::getMixerControlVolume(Control ctl, float* volume) { in getMixerControlVolume() argument
202 RETURN_STATUS_IF_ERROR(findControl(ctl, &mctl)); in getMixerControlVolume()
206 LOG(ERROR) << __func__ << ": failed to get " << ctl << ", err=" << err; in getMixerControlVolume()
210 LOG(ERROR) << __func__ << ": got no values for " << ctl; in getMixerControlVolume()
217 ndk::ScopedAStatus Mixer::setMixerControlMute(Control ctl, bool muted) { in setMixerControlMute() argument
219 RETURN_STATUS_IF_ERROR(findControl(ctl, &mctl)); in setMixerControlMute()
222 LOG(ERROR) << __func__ << ": failed to set " << ctl << " to " << muted << ", err=" << err; in setMixerControlMute()
228 ndk::ScopedAStatus Mixer::setMixerControlVolume(Control ctl, float volume) { in setMixerControlVolume() argument
230 RETURN_STATUS_IF_ERROR(findControl(ctl, &mctl)); in setMixerControlVolume()
234 LOG(ERROR) << __func__ << ": failed to set " << ctl << " to " << volume << ", err=" << err; in setMixerControlVolume()
240 int Mixer::getMixerControlPercent(struct mixer_ctl* ctl, std::vector<int>* percents) { in getMixerControlPercent() argument
241 const unsigned int n = mixer_ctl_get_num_values(ctl); in getMixerControlPercent()
244 if (int valueOrError = mixer_ctl_get_percent(ctl, id); valueOrError >= 0) { in getMixerControlPercent()
253 int Mixer::getMixerControlValues(struct mixer_ctl* ctl, std::vector<int>* values) { in getMixerControlValues() argument
254 const unsigned int n = mixer_ctl_get_num_values(ctl); in getMixerControlValues()
257 if (int valueOrError = mixer_ctl_get_value(ctl, id); valueOrError >= 0) { in getMixerControlValues()
266 int Mixer::setMixerControlPercent(struct mixer_ctl* ctl, int percent) { in setMixerControlPercent() argument
267 const unsigned int n = mixer_ctl_get_num_values(ctl); in setMixerControlPercent()
269 if (int error = mixer_ctl_set_percent(ctl, id, percent); error != 0) { in setMixerControlPercent()
276 int Mixer::setMixerControlPercent(struct mixer_ctl* ctl, const std::vector<int>& percents) { in setMixerControlPercent() argument
277 const unsigned int n = mixer_ctl_get_num_values(ctl); in setMixerControlPercent()
279 if (int error = mixer_ctl_set_percent(ctl, id, id < percents.size() ? percents[id] : 0); in setMixerControlPercent()
287 int Mixer::setMixerControlValue(struct mixer_ctl* ctl, int value) { in setMixerControlValue() argument
288 const unsigned int n = mixer_ctl_get_num_values(ctl); in setMixerControlValue()
290 if (int error = mixer_ctl_set_value(ctl, id, value); error != 0) { in setMixerControlValue()