Home
last modified time | relevance | path

Searched refs:PA_VOLUME_NORM (Results 1 – 25 of 34) sorted by relevance

12

/third_party/pulseaudio/src/tests/
Dvolume-test.c46 for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) { in START_TEST()
52 … v, (v*100)/PA_VOLUME_NORM, dB, f, pa_sw_volume_from_dB(dB), pa_sw_volume_from_linear(f)); in START_TEST()
59 for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) { in START_TEST()
67 for (cv.values[0] = PA_VOLUME_MUTED; cv.values[0] <= PA_VOLUME_NORM*2; cv.values[0] += 4096) in START_TEST()
68 … for (cv.values[1] = PA_VOLUME_MUTED; cv.values[1] <= PA_VOLUME_NORM*2; cv.values[1] += 4096) { in START_TEST()
76 … for (cv.values[0] = PA_VOLUME_MUTED+4096; cv.values[0] <= PA_VOLUME_NORM*2; cv.values[0] += 4096) in START_TEST()
77 for (cv.values[1] = PA_VOLUME_MUTED; cv.values[1] <= PA_VOLUME_NORM*2; cv.values[1] += 4096) in START_TEST()
98 for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 51) { in START_TEST()
109 for (w = PA_VOLUME_MUTED; w < PA_VOLUME_NORM*2; w += 37) { in START_TEST()
Dcpu-mix-test.c94 m[0].volume.values[i] = PA_VOLUME_NORM; in run_mix_test()
101 m[1].volume.values[i] = PA_VOLUME_NORM; in run_mix_test()
Dlo-test-util.c121 pa_cvolume_set(&vol, ctx->sample_spec.channels, v * PA_VOLUME_NORM); in calibrate_read_cb()
174 pa_cvolume_set(&vol, ctx->sample_spec.channels, PA_VOLUME_NORM); in stream_state_callback()
Dmix-test.c320 m[0].volume.values[0] = PA_VOLUME_NORM; in START_TEST()
323 m[1].volume.values[0] = PA_VOLUME_NORM; in START_TEST()
Dpassthrough-test.c301 pa_cvolume_set(&volume, 2, PA_VOLUME_NORM / 2); in START_TEST()
/third_party/pulseaudio/src/modules/oss/
Doss-util.c272 volume->values[0] = PA_CLAMP_VOLUME(((vol & 0xFF) * PA_VOLUME_NORM) / 100); in pa_oss_get_volume()
275 volume->values[1] = PA_CLAMP_VOLUME((((vol >> 8) & 0xFF) * PA_VOLUME_NORM) / 100); in pa_oss_get_volume()
286 l = volume->values[0] > PA_VOLUME_NORM ? PA_VOLUME_NORM : volume->values[0]; in pa_oss_set_volume()
288 vol = (l*100)/PA_VOLUME_NORM; in pa_oss_set_volume()
291 r = volume->values[1] > PA_VOLUME_NORM ? PA_VOLUME_NORM : volume->values[1]; in pa_oss_set_volume()
292 vol |= ((r*100)/PA_VOLUME_NORM) << 8; in pa_oss_set_volume()
/third_party/pulseaudio/src/pulse/
Dvolume.c209 …result = ((uint64_t) a * (uint64_t) b + (uint64_t) PA_VOLUME_NORM / 2ULL) / (uint64_t) PA_VOLUME_N… in pa_sw_volume_multiply()
226 result = ((uint64_t) a * (uint64_t) PA_VOLUME_NORM + (uint64_t) b / 2ULL) / (uint64_t) b; in pa_sw_volume_divide()
275 return (pa_volume_t) PA_CLAMP_VOLUME((uint64_t) lround(cbrt(v) * PA_VOLUME_NORM)); in pa_sw_volume_from_linear()
286 if (v == PA_VOLUME_NORM) in pa_sw_volume_to_linear()
289 f = ((double) v / PA_VOLUME_NORM); in pa_sw_volume_to_linear()
316 …ned)(((uint64_t)c->values[channel] * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NOR… in pa_cvolume_snprint()
336 …, "%3u%%", (unsigned)(((uint64_t)v * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NOR… in pa_volume_snprint()
449 … (unsigned)(((uint64_t)v * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NORM), in pa_volume_snprint_verbose()
681 *l = PA_VOLUME_NORM; in get_avg()
686 *r = PA_VOLUME_NORM; in get_avg()
Dohos_pa_volume.c209 …result = ((uint64_t) a * (uint64_t) b + (uint64_t) PA_VOLUME_NORM / 2ULL) / (uint64_t) PA_VOLUME_N… in pa_sw_volume_multiply()
226 result = ((uint64_t) a * (uint64_t) PA_VOLUME_NORM + (uint64_t) b / 2ULL) / (uint64_t) b; in pa_sw_volume_divide()
280 return (pa_volume_t) PA_CLAMP_VOLUME((uint64_t) lround(cbrt(v) * PA_VOLUME_NORM)); in pa_sw_volume_from_linear()
291 if (v == PA_VOLUME_NORM) in pa_sw_volume_to_linear()
294 f = ((double) v / PA_VOLUME_NORM); in pa_sw_volume_to_linear()
321 …ned)(((uint64_t)c->values[channel] * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NOR… in pa_cvolume_snprint()
341 …, "%3u%%", (unsigned)(((uint64_t)v * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NOR… in pa_volume_snprint()
465 … (unsigned)(((uint64_t)v * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NORM), in pa_volume_snprint_verbose()
697 *l = PA_VOLUME_NORM; in get_avg()
702 *r = PA_VOLUME_NORM; in get_avg()
Dvolume.h120 #define PA_VOLUME_NORM ((pa_volume_t) 0x10000U) macro
161 #define pa_cvolume_reset(a, n) pa_cvolume_set((a), (n), PA_VOLUME_NORM)
272 #define pa_cvolume_is_norm(a) pa_cvolume_channels_equal_to((a), PA_VOLUME_NORM)
Dscache.c191 volume = PA_VOLUME_NORM; in pa_context_play_sample()
232 volume = PA_VOLUME_NORM; in pa_context_play_sample_with_proplist()
/third_party/pulseaudio/src/modules/
Dmodule-lirc.c174 pa_volume_t volume_limit = PA_CLAMP_VOLUME(PA_VOLUME_NORM*3/2); in pa__init()
175 pa_volume_t volume_step = PA_VOLUME_NORM/20; in pa__init()
Dmodule-waveout.c425 left = PA_CLAMP_VOLUME((vol & 0xFFFF) * PA_VOLUME_NORM / WAVEOUT_MAX_VOLUME); in sink_get_volume_cb()
427 right = PA_CLAMP_VOLUME(((vol >> 16) & 0xFFFF) * PA_VOLUME_NORM / WAVEOUT_MAX_VOLUME); in sink_get_volume_cb()
451 vol = (s->real_volume.values[0] * WAVEOUT_MAX_VOLUME / PA_VOLUME_NORM) in sink_set_volume_cb()
452 | (s->real_volume.values[1] * WAVEOUT_MAX_VOLUME / PA_VOLUME_NORM) << 16; in sink_set_volume_cb()
454 vol = (pa_cvolume_avg(&(s->real_volume)) * WAVEOUT_MAX_VOLUME / PA_VOLUME_NORM) in sink_set_volume_cb()
455 | (pa_cvolume_avg(&(s->real_volume)) * WAVEOUT_MAX_VOLUME / PA_VOLUME_NORM) << 16; in sink_set_volume_cb()
Dmodule-mmkbd-evdev.c161 pa_volume_t volume_limit = PA_VOLUME_NORM*3/2; in pa__init()
162 pa_volume_t volume_step = PA_VOLUME_NORM/20; in pa__init()
Dmodule-solaris.c541 info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM; in sink_set_volume()
563 …olume_set(&s->real_volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GA… in sink_get_volume()
576 info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM; in source_set_volume()
598 …olume_set(&s->real_volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GA… in source_get_volume()
Dmodule-match.c105 pa_volume_t volume = PA_VOLUME_NORM; in load_rules()
Dmodule-virtual-source.c313 streams[0].volume.values[ch] = PA_VOLUME_NORM; /* FIXME */ in source_output_push_cb()
318 streams[1].volume.values[ch] = PA_VOLUME_NORM; /* FIXME */ in source_output_push_cb()
/third_party/pulseaudio/src/pulsecore/
Dprotocol-esound.c646 lvolume = (int32_t) ((volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM); in esd_proto_all_info()
647 …rvolume = (int32_t) ((volume.values[volume.channels == 2 ? 1 : 0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM); in esd_proto_all_info()
732 …AYBE_INT32_SWAP(c->swap_byte_order, (int32_t) ((volume.values[0]*ESD_VOLUME_BASE)/PA_VOLUME_NORM)); in esd_proto_all_info()
736 …AYBE_INT32_SWAP(c->swap_byte_order, (int32_t) ((volume.values[1]*ESD_VOLUME_BASE)/PA_VOLUME_NORM)); in esd_proto_all_info()
780 volume.values[0] = (lvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE; in esd_proto_stream_pan()
781 volume.values[1] = (rvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE; in esd_proto_stream_pan()
815 volume.values[0] = (lvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE; in esd_proto_sample_pan()
816 volume.values[1] = (rvolume*PA_VOLUME_NORM)/ESD_VOLUME_BASE; in esd_proto_sample_pan()
927 …if (pa_scache_play_item(c->protocol->core, name, sink, PA_VOLUME_NORM, c->client->proplist, NULL) … in esd_proto_sample_free_or_play()
Dsource.c280 s->base_volume = PA_VOLUME_NORM; in pa_source_new()
281 s->n_volume_steps = PA_VOLUME_NORM+1; in pa_source_new()
666 || (s->base_volume == PA_VOLUME_NORM in pa_source_put()
668 pa_assert(!(s->flags & PA_SOURCE_DECIBEL_VOLUME) || s->n_volume_steps == PA_VOLUME_NORM+1); in pa_source_put()
1271 pa_cvolume_set(&volume, s->sample_spec.channels, PA_MIN(s->base_volume, PA_VOLUME_NORM)); in pa_source_enter_passthrough()
/third_party/ffmpeg/libavdevice/
Dpulse_audio_enc.c68 s->base_volume = PA_VOLUME_NORM; in pulse_audio_sink_device_cb()
108 val = (double)vol / PA_VOLUME_NORM; in pulse_audio_sink_input_cb()
337 vol = pa_sw_volume_multiply(lrint(volume * PA_VOLUME_NORM), s->base_volume); in pulse_set_volume()
338 pa_cvolume_set(&cvol, ss->channels, PA_VOLUME_NORM); in pulse_set_volume()
/third_party/pulseaudio/src/modules/bluetooth/
Dbackend-native.c140 gain * PA_VOLUME_NORM in hsp_gain_to_volume()
145 if (volume > PA_VOLUME_NORM) in hsp_gain_to_volume()
146 volume = PA_VOLUME_NORM; in hsp_gain_to_volume()
152 uint16_t gain = volume * HSP_MAX_GAIN / PA_VOLUME_NORM; in volume_to_hsp_gain()
Dbluez5-util.c107 gain * PA_VOLUME_NORM in a2dp_gain_to_volume()
112 if (volume > PA_VOLUME_NORM) in a2dp_gain_to_volume()
113 volume = PA_VOLUME_NORM; in a2dp_gain_to_volume()
122 + PA_VOLUME_NORM / 2 in volume_to_a2dp_gain()
123 ) / PA_VOLUME_NORM); in volume_to_a2dp_gain()
/third_party/pulseaudio/src/modules/alsa/
Dalsa-source.c89 #define VOLUME_ACCURACY (PA_VOLUME_NORM/100)
1444 (pa_cvolume_min(&new_soft_volume) >= (PA_VOLUME_NORM - VOLUME_ACCURACY)) && in source_set_volume_cb()
1445 (pa_cvolume_max(&new_soft_volume) <= (PA_VOLUME_NORM + VOLUME_ACCURACY)); in source_set_volume_cb()
1492 (pa_cvolume_min(&tmp_vol) >= (PA_VOLUME_NORM - VOLUME_ACCURACY)) && in source_write_volume_cb()
1493 (pa_cvolume_max(&tmp_vol) <= (PA_VOLUME_NORM + VOLUME_ACCURACY)); in source_write_volume_cb()
1556 u->source->n_volume_steps = PA_VOLUME_NORM+1; in mixer_volume_init()
1563 u->source->base_volume = PA_VOLUME_NORM; in mixer_volume_init()
Dalsa-sink.c96 #define VOLUME_ACCURACY (PA_VOLUME_NORM/100) /* don't require volume adjustments to be perfectly c…
1570 (pa_cvolume_min(&new_soft_volume) >= (PA_VOLUME_NORM - VOLUME_ACCURACY)) && in sink_set_volume_cb()
1571 (pa_cvolume_max(&new_soft_volume) <= (PA_VOLUME_NORM + VOLUME_ACCURACY)); in sink_set_volume_cb()
1618 (pa_cvolume_min(&tmp_vol) >= (PA_VOLUME_NORM - VOLUME_ACCURACY)) && in sink_write_volume_cb()
1619 (pa_cvolume_max(&tmp_vol) <= (PA_VOLUME_NORM + VOLUME_ACCURACY)); in sink_write_volume_cb()
1682 u->sink->n_volume_steps = PA_VOLUME_NORM+1; in mixer_volume_init()
1689 u->sink->base_volume = PA_VOLUME_NORM; in mixer_volume_init()
/third_party/pulseaudio/src/modules/echo-cancel/
Dwebrtc.cc113 return (v * WEBRTC_AGC_MAX_VOLUME) / PA_VOLUME_NORM; in webrtc_volume_from_pa()
118 return (v * PA_VOLUME_NORM) / WEBRTC_AGC_MAX_VOLUME; in webrtc_volume_to_pa()
/third_party/pulseaudio/src/utils/
Dpactl.c489 …oc("%u%%", (unsigned)(((uint64_t)v * 100 + (uint64_t)PA_VOLUME_NORM / 2) / (uint64_t)PA_VOLUME_NOR… in pa_volume_to_json_object()
1779 if (cv->values[i] + volume.values[i] < PA_VOLUME_NORM) in volume_relative_adjust()
1782 cv->values[i] = cv->values[i] + volume.values[i] - PA_VOLUME_NORM; in volume_relative_adjust()
2236 … o = pa_context_play_sample(c, sample_name, sink_name, PA_VOLUME_NORM, simple_callback, NULL); in context_state_callback()
2557 v += (double) PA_VOLUME_NORM; in parse_volume()
2570 v = v * (double) PA_VOLUME_NORM / 100; in parse_volume()

12