Home
last modified time | relevance | path

Searched refs:volume (Results 1 – 25 of 85) sorted by relevance

1234

/hardware/qcom/audio/legacy/alsa_sound/
DAudioStreamOutALSA.cpp74 float volume; in setVolume() local
77 volume = (left + right) / 2; in setVolume()
78 if (volume < 0.0) { in setVolume()
79 ALOGW("AudioSessionOutALSA::setVolume(%f) under 0.0, assuming 0.0\n", volume); in setVolume()
80 volume = 0.0; in setVolume()
81 } else if (volume > 1.0) { in setVolume()
82 ALOGW("AudioSessionOutALSA::setVolume(%f) over 1.0, assuming 1.0\n", volume); in setVolume()
83 volume = 1.0; in setVolume()
85 vol = lrint((volume * 0x2000)+0.5); in setVolume()
89 ALOGV("setLpaVolume(%f)\n", volume); in setVolume()
[all …]
DALSAMixer.cpp93 long volume; member
198 info->volume = info->max; in ALSAMixer()
199 setVol[i] (elem, info->volume); in ALSAMixer()
235 info->volume = info->max; in ALSAMixer()
236 setVol[i] (elem, info->volume); in ALSAMixer()
267 status_t ALSAMixer::setMasterVolume(float volume) in setMasterVolume() argument
276 long vol = minVol + volume * (maxVol - minVol); in setMasterVolume()
280 info->volume = vol; in setMasterVolume()
299 info->volume = vol; in setMasterGain()
321 info->volume = vol; in setVolume()
[all …]
/hardware/interfaces/audio/core/all-versions/default/include/core/all-versions/default/
DPrimaryDevice.impl.h38 Return<Result> PrimaryDevice::setMasterVolume(float volume) { in setMasterVolume() argument
39 return mDevice->setMasterVolume(volume); in setMasterVolume()
162 Return<Result> PrimaryDevice::setVoiceVolume(float volume) { in setVoiceVolume() argument
163 if (!isGainNormalized(volume)) { in setVoiceVolume()
164 ALOGW("Can not set a voice volume (%f) outside [0,1]", volume); in setVoiceVolume()
168 mDevice->device()->set_voice_volume(mDevice->device(), volume)); in setVoiceVolume()
290 Return<Result> PrimaryDevice::setBtHfpVolume(float volume) { in setBtHfpVolume() argument
291 if (!isGainNormalized(volume)) { in setBtHfpVolume()
292 ALOGW("Can not set BT HFP volume (%f) outside [0,1]", volume); in setBtHfpVolume()
297 static_cast<int>(std::round(volume * 15))); in setBtHfpVolume()
DDevice.impl.h68 Return<Result> Device::setMasterVolume(float volume) { in setMasterVolume() argument
72 if (!isGainNormalized(volume)) { in setMasterVolume()
73 ALOGW("Can not set a master volume (%f) outside [0,1]", volume); in setMasterVolume()
76 return analyzeStatus("set_master_volume", mDevice->set_master_volume(mDevice, volume)); in setMasterVolume()
81 float volume = 0; in getMasterVolume() local
83 retval = analyzeStatus("get_master_volume", mDevice->get_master_volume(mDevice, &volume)); in getMasterVolume()
85 _hidl_cb(retval, volume); in getMasterVolume()
DPrimaryDevice.h54 Return<Result> setMasterVolume(float volume) override;
110 Return<Result> setVoiceVolume(float volume) override;
126 Return<Result> setBtHfpVolume(float volume) override;
/hardware/qcom/audio/hal/audio_extn/
Dhfp.c141 int volume, ret = 0; in hfp_set_mic_volume() local
169 volume = (int)(value * PLAYBACK_VOLUME_MAX); in hfp_set_mic_volume()
171 ALOGD("%s: Setting volume to %d (%s)\n", __func__, volume, mixer_ctl_name); in hfp_set_mic_volume()
172 if (mixer_ctl_set_value(ctl, 0, volume) < 0) { in hfp_set_mic_volume()
173 ALOGE("%s: Couldn't set HFP Volume: [%d]", __func__, volume); in hfp_set_mic_volume()
182 int volume, ret = 0; in hfp_get_mic_volume() local
203 volume = mixer_ctl_get_value(ctl, 0); in hfp_get_mic_volume()
204 if ( volume < 0) { in hfp_get_mic_volume()
205 ALOGE("%s: Couldn't set HFP Volume: [%d]", __func__, volume); in hfp_get_mic_volume()
208 ALOGD("%s: getting mic volume %d \n", __func__, volume); in hfp_get_mic_volume()
[all …]
/hardware/qcom/audio/hal/
Dvoice.c222 voice_set_volume(adev, adev->voice.volume); in voice_start_usecase()
373 int voice_set_volume(struct audio_device *adev, float volume) in voice_set_volume() argument
377 adev->voice.volume = volume; in voice_set_volume()
379 if (volume < 0.0) { in voice_set_volume()
380 volume = 0.0; in voice_set_volume()
381 } else if (volume > 1.0) { in voice_set_volume()
382 volume = 1.0; in voice_set_volume()
385 vol = lrint(volume * 100.0); in voice_set_volume()
516 adev->voice.volume = 1.0f; in voice_init()
Dvoice.h62 float volume; member
86 int voice_set_volume(struct audio_device *adev, float volume);
/hardware/libhardware_legacy/audio/
DAudioDumpInterface.h133 virtual status_t setVoiceVolume(float volume) in setVoiceVolume() argument
134 {return mFinalInterface->setVoiceVolume(volume);} in setVoiceVolume()
135 virtual status_t setMasterVolume(float volume) in setMasterVolume() argument
136 {return mFinalInterface->setMasterVolume(volume);} in setMasterVolume()
DA2dpAudioInterface.h40 virtual status_t setVoiceVolume(float volume);
41 virtual status_t setMasterVolume(float volume);
DAudioHardwareStub.h71 virtual status_t setVoiceVolume(float volume);
72 virtual status_t setMasterVolume(float volume);
/hardware/libhardware_legacy/include/hardware_legacy/
DAudioHardwareInterface.h216 virtual status_t setVoiceVolume(float volume) = 0;
223 virtual status_t setMasterVolume(float volume) = 0;
231 virtual status_t getMasterVolume(float *volume) = 0;
DAudioHardwareBase.h49 virtual status_t getMasterVolume(float *volume);
/hardware/interfaces/audio/2.0/
DIDevice.hal34 * Sets the audio volume for all audio activities other than voice call. If
38 * @param volume 1.0f means unity, 0.0f is zero.
41 setMasterVolume(float volume) generates (Result retval);
44 * Get the current master volume value for the HAL, if the HAL supports
45 * master volume control. For example, AudioFlinger will query this value
47 * setting the initial master volume across all HALs. HALs which do not
51 * @return volume 1.0f means unity, 0.0f is zero.
53 getMasterVolume() generates (Result retval, float volume);
/hardware/interfaces/audio/4.0/
DIPrimaryDevice.hal24 * Sets the audio volume of a voice call.
26 * @param volume 1.0f means unity, 0.0f is zero.
29 setVoiceVolume(float volume) generates (Result retval);
121 * Sets the current output volume Hz for BT HFP (Hands-Free Profile).
127 * @param volume 1.0f means unity, 0.0f is zero.
130 setBtHfpVolume(float volume) generates (Result retval);
DIDevice.hal32 * Sets the audio volume for all audio activities other than voice call. If
36 * @param volume 1.0f means unity, 0.0f is zero.
39 setMasterVolume(float volume) generates (Result retval);
42 * Get the current master volume value for the HAL, if the HAL supports
43 * master volume control. For example, AudioFlinger will query this value
45 * setting the initial master volume across all HALs. HALs which do not
49 * @return volume 1.0f means unity, 0.0f is zero.
51 getMasterVolume() generates (Result retval, float volume);
/hardware/qcom/msm8996/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8x09/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8994/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8x84/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8998/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8x26/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/qcom/msm8960/original-kernel-headers/linux/mfd/
Dmsm-adie-codec.h121 u32 volume);
143 u32 num_channels, u32 volume /* in percentage */);
/hardware/interfaces/audio/core/4.0/vts/functional/
DAudioPrimaryHidlHalTest.cpp1032 testOptionalUnitaryGain([this](float volume) { return stream->setGain(volume); }, in TEST_P() argument
1086 for (float volume : {0.0, 0.5, 1.0}) { in TEST_P()
1087 const SinkMetadata metadata = {{{source, volume}}}; in TEST_P()
1089 << "source=" << toString(source) << ", volume=" << volume; in TEST_P()
1123 testOptionalUnitaryGain([this](float volume) { return stream->setVolume(volume, volume); }, in TEST_P() argument
1340 for (float volume : {0.0, 0.5, 1.0}) { in TEST_P()
1341 const SourceMetadata metadata = {{{usage, content, volume}}}; in TEST_P()
1344 << ", volume=" << volume; in TEST_P()
1369 testUnitaryGain([](float volume) { return device->setVoiceVolume(volume); }); in TEST_F() argument
1404 testUnitaryGain([](float volume) { return device->setBtHfpVolume(volume); }); in TEST_F() argument
/hardware/libhardware/modules/audio/
Daudio_hw.c431 static int adev_set_voice_volume(struct audio_hw_device *dev, float volume) in adev_set_voice_volume() argument
433 ALOGV("adev_set_voice_volume: %f", volume); in adev_set_voice_volume()
437 static int adev_set_master_volume(struct audio_hw_device *dev, float volume) in adev_set_master_volume() argument
439 ALOGV("adev_set_master_volume: %f", volume); in adev_set_master_volume()
443 static int adev_get_master_volume(struct audio_hw_device *dev, float *volume) in adev_get_master_volume() argument
445 ALOGV("adev_get_master_volume: %f", *volume); in adev_get_master_volume()

1234