Lines Matching refs:stream

332 static int set_compr_volume(struct audio_stream_out *stream, float left, float right);
850 audio_devices_t a1 = uc->stream.out->devices; in derive_playback_snd_device()
851 audio_devices_t a2 = new_uc->stream.out->devices; in derive_playback_snd_device()
1242 if (usecase->stream.out == NULL) { in force_device_switch()
1250 if ((usecase->stream.out->devices & AUDIO_DEVICE_OUT_ALL_A2DP) && in force_device_switch()
1282 usecase->stream.out->devices); in select_devices()
1283 in_snd_device = platform_get_input_snd_device(adev->platform, usecase->stream.out->devices); in select_devices()
1284 usecase->devices = usecase->stream.out->devices; in select_devices()
1311 usecase->devices = usecase->stream.out->devices; in select_devices()
1317 usecase->stream.out->devices); in select_devices()
1320 voip_out = voip_usecase->stream.out; in select_devices()
1322 if (usecase->stream.out == voip_out && in select_devices()
1330 usecase->devices = usecase->stream.in->device; in select_devices()
1345 out_device = voip_usecase->stream.out->devices; in select_devices()
1486 struct stream_out *voip_out = voip_usecase->stream.out; in select_devices()
1575 uc_info->stream.in = in; in start_input_stream()
2054 uc_info->stream.out = out; in start_output_stream()
2306 static uint32_t out_get_sample_rate(const struct audio_stream *stream) in out_get_sample_rate() argument
2308 struct stream_out *out = (struct stream_out *)stream; in out_get_sample_rate()
2313 static int out_set_sample_rate(struct audio_stream *stream __unused, uint32_t rate __unused) in out_set_sample_rate()
2318 static size_t out_get_buffer_size(const struct audio_stream *stream) in out_get_buffer_size() argument
2320 struct stream_out *out = (struct stream_out *)stream; in out_get_buffer_size()
2326 audio_stream_out_frame_size((const struct audio_stream_out *)stream); in out_get_buffer_size()
2329 static uint32_t out_get_channels(const struct audio_stream *stream) in out_get_channels() argument
2331 struct stream_out *out = (struct stream_out *)stream; in out_get_channels()
2336 static audio_format_t out_get_format(const struct audio_stream *stream) in out_get_format() argument
2338 struct stream_out *out = (struct stream_out *)stream; in out_get_format()
2343 static int out_set_format(struct audio_stream *stream __unused, audio_format_t format __unused) in out_set_format()
2349 static int out_standby_l(struct audio_stream *stream) in out_standby_l() argument
2351 struct stream_out *out = (struct stream_out *)stream; in out_standby_l()
2386 static int out_standby(struct audio_stream *stream) in out_standby() argument
2388 struct stream_out *out = (struct stream_out *)stream; in out_standby()
2394 out_standby_l(stream); in out_standby()
2400 static int out_on_error(struct audio_stream *stream) in out_on_error() argument
2402 struct stream_out *out = (struct stream_out *)stream; in out_on_error()
2417 return out_standby(&out->stream.common); in out_on_error()
2422 static int out_dump(const struct audio_stream *stream, int fd) in out_dump() argument
2424 struct stream_out *out = (struct stream_out *)stream; in out_dump()
2490 static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) in out_set_parameters() argument
2492 struct stream_out *out = (struct stream_out *)stream; in out_set_parameters()
2519 out_standby_l(&out->stream.common); in out_set_parameters()
2654 set_compr_volume(&out->stream, out->volume_l, out->volume_r); in out_set_parameters()
2775 static char* out_get_parameters(const struct audio_stream *stream, const char *keys) in out_get_parameters() argument
2777 struct stream_out *out = (struct stream_out *)stream; in out_get_parameters()
2801 static uint32_t out_get_latency(const struct audio_stream_out *stream) in out_get_latency() argument
2804 struct stream_out *out = (struct stream_out *)stream; in out_get_latency()
2828 static int set_compr_volume(struct audio_stream_out *stream, float left, in set_compr_volume() argument
2831 struct stream_out *out = (struct stream_out *)stream; in set_compr_volume()
2856 static int out_set_volume(struct audio_stream_out *stream, float left, in out_set_volume() argument
2859 struct stream_out *out = (struct stream_out *)stream; in out_set_volume()
2870 ret = set_compr_volume(stream, left, right); in out_set_volume()
2892 static void out_snd_mon_cb(void * stream, struct str_parms * parms) in out_snd_mon_cb() argument
2894 if (!stream || !parms) in out_snd_mon_cb()
2897 struct stream_out *out = (struct stream_out *)stream; in out_snd_mon_cb()
2922 out_on_error(stream); in out_snd_mon_cb()
2928 static ssize_t out_write_for_no_output(struct audio_stream_out *stream, in out_write_for_no_output() argument
2931 struct stream_out *out = (struct stream_out *)stream; in out_write_for_no_output()
2938 (const struct audio_stream_out *)&out->stream) / in out_write_for_no_output()
2939 out_get_sample_rate(&out->stream.common)); in out_write_for_no_output()
2945 static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, in out_write() argument
2948 struct stream_out *out = (struct stream_out *)stream; in out_write()
2955 const size_t frame_size = audio_stream_out_frame_size(stream); in out_write()
3084 sleeptime_us = frames * 1000000LL / out_get_sample_rate(&out->stream.common); in out_write()
3092 out_on_error(&out->stream.common); in out_write()
3099 static int out_get_render_position(const struct audio_stream_out *stream, in out_get_render_position() argument
3102 struct stream_out *out = (struct stream_out *)stream; in out_get_render_position()
3120 static int out_add_audio_effect(const struct audio_stream *stream __unused, in out_add_audio_effect()
3126 static int out_remove_audio_effect(const struct audio_stream *stream __unused, in out_remove_audio_effect()
3132 static int out_get_next_write_timestamp(const struct audio_stream_out *stream __unused, in out_get_next_write_timestamp()
3138 static int out_get_presentation_position(const struct audio_stream_out *stream, in out_get_presentation_position() argument
3141 struct stream_out *out = (struct stream_out *)stream; in out_get_presentation_position()
3198 static int out_set_callback(struct audio_stream_out *stream, in out_set_callback() argument
3201 struct stream_out *out = (struct stream_out *)stream; in out_set_callback()
3211 static int out_pause(struct audio_stream_out* stream) in out_pause() argument
3213 struct stream_out *out = (struct stream_out *)stream; in out_pause()
3227 static int out_resume(struct audio_stream_out* stream) in out_resume() argument
3229 struct stream_out *out = (struct stream_out *)stream; in out_resume()
3244 static int out_drain(struct audio_stream_out* stream, audio_drain_type_t type ) in out_drain() argument
3246 struct stream_out *out = (struct stream_out *)stream; in out_drain()
3260 static int out_flush(struct audio_stream_out* stream) in out_flush() argument
3262 struct stream_out *out = (struct stream_out *)stream; in out_flush()
3273 static int out_stop(const struct audio_stream_out* stream) in out_stop() argument
3275 struct stream_out *out = (struct stream_out *)stream; in out_stop()
3291 static int out_start(const struct audio_stream_out* stream) in out_start() argument
3293 struct stream_out *out = (struct stream_out *)stream; in out_start()
3330 static int out_create_mmap_buffer(const struct audio_stream_out *stream, in out_create_mmap_buffer() argument
3334 struct stream_out *out = (struct stream_out *)stream; in out_create_mmap_buffer()
3428 static int out_get_mmap_position(const struct audio_stream_out *stream, in out_get_mmap_position() argument
3432 struct stream_out *out = (struct stream_out *)stream; in out_get_mmap_position()
3458 static uint32_t in_get_sample_rate(const struct audio_stream *stream) in in_get_sample_rate() argument
3460 struct stream_in *in = (struct stream_in *)stream; in in_get_sample_rate()
3465 static int in_set_sample_rate(struct audio_stream *stream __unused, uint32_t rate __unused) in in_set_sample_rate()
3470 static size_t in_get_buffer_size(const struct audio_stream *stream) in in_get_buffer_size() argument
3472 struct stream_in *in = (struct stream_in *)stream; in in_get_buffer_size()
3474 audio_stream_in_frame_size((const struct audio_stream_in *)stream); in in_get_buffer_size()
3477 static uint32_t in_get_channels(const struct audio_stream *stream) in in_get_channels() argument
3479 struct stream_in *in = (struct stream_in *)stream; in in_get_channels()
3484 static audio_format_t in_get_format(const struct audio_stream *stream) in in_get_format() argument
3486 struct stream_in *in = (struct stream_in *)stream; in in_get_format()
3490 static int in_set_format(struct audio_stream *stream __unused, audio_format_t format __unused) in in_set_format()
3495 static int in_standby(struct audio_stream *stream) in in_standby() argument
3497 struct stream_in *in = (struct stream_in *)stream; in in_standby()
3538 static int in_dump(const struct audio_stream *stream, int fd) in in_dump() argument
3540 struct stream_in *in = (struct stream_in *)stream; in in_dump()
3560 static int in_set_parameters(struct audio_stream *stream, const char *kvpairs) in in_set_parameters() argument
3562 struct stream_in *in = (struct stream_in *)stream; in in_set_parameters()
3625 static char* in_get_parameters(const struct audio_stream *stream, in in_get_parameters() argument
3628 struct stream_in *in = (struct stream_in *)stream; in in_get_parameters()
3652 static int in_set_gain(struct audio_stream_in *stream, float gain) in in_set_gain() argument
3654 struct stream_in *in = (struct stream_in *)stream; in in_set_gain()
3661 if (stream == NULL) in in_set_gain()
3687 static void in_snd_mon_cb(void * stream, struct str_parms * parms) in in_snd_mon_cb() argument
3689 if (!stream || !parms) in in_snd_mon_cb()
3692 struct stream_in *in = (struct stream_in *)stream; in in_snd_mon_cb()
3719 in_standby(&in->stream.common); in in_snd_mon_cb()
3724 static ssize_t in_read(struct audio_stream_in *stream, void *buffer, in in_read() argument
3727 struct stream_in *in = (struct stream_in *)stream; in in_read()
3734 const size_t frame_size = audio_stream_in_frame_size(stream); in in_read()
3813 in_standby(&in->stream.common); in in_read()
3815 usleep(frames * 1000000LL / in_get_sample_rate(&in->stream.common)); in in_read()
3825 static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream __unused) in in_get_input_frames_lost()
3830 static int in_get_capture_position(const struct audio_stream_in *stream, in in_get_capture_position() argument
3833 if (stream == NULL || frames == NULL || time == NULL) { in in_get_capture_position()
3836 struct stream_in *in = (struct stream_in *)stream; in in_get_capture_position()
3862 static int add_remove_audio_effect(const struct audio_stream *stream, in add_remove_audio_effect() argument
3866 struct stream_in *in = (struct stream_in *)stream; in add_remove_audio_effect()
3911 static int in_add_audio_effect(const struct audio_stream *stream, in in_add_audio_effect() argument
3915 return add_remove_audio_effect(stream, effect, true); in in_add_audio_effect()
3918 static int in_remove_audio_effect(const struct audio_stream *stream, in in_remove_audio_effect() argument
3922 return add_remove_audio_effect(stream, effect, false); in in_remove_audio_effect()
3925 static int in_stop(const struct audio_stream_in* stream) in in_stop() argument
3927 struct stream_in *in = (struct stream_in *)stream; in in_stop()
3943 static int in_start(const struct audio_stream_in* stream) in in_start() argument
3945 struct stream_in *in = (struct stream_in *)stream; in in_start()
3964 static int in_create_mmap_buffer(const struct audio_stream_in *stream, in in_create_mmap_buffer() argument
3968 struct stream_in *in = (struct stream_in *)stream; in in_create_mmap_buffer()
4065 static int in_get_mmap_position(const struct audio_stream_in *stream, in in_get_mmap_position() argument
4069 struct stream_in *in = (struct stream_in *)stream; in in_get_mmap_position()
4092 static int in_get_active_microphones(const struct audio_stream_in *stream, in in_get_active_microphones() argument
4095 struct stream_in *in = (struct stream_in *)stream; in in_get_active_microphones()
4212 out->stream.start = out_start; in adev_open_output_stream()
4213 out->stream.stop = out_stop; in adev_open_output_stream()
4214 out->stream.create_mmap_buffer = out_create_mmap_buffer; in adev_open_output_stream()
4215 out->stream.get_mmap_position = out_get_mmap_position; in adev_open_output_stream()
4266 out->stream.set_callback = out_set_callback; in adev_open_output_stream()
4267 out->stream.pause = out_pause; in adev_open_output_stream()
4268 out->stream.resume = out_resume; in adev_open_output_stream()
4269 out->stream.drain = out_drain; in adev_open_output_stream()
4270 out->stream.flush = out_flush; in adev_open_output_stream()
4469 out->stream.start = out_start; in adev_open_output_stream()
4470 out->stream.stop = out_stop; in adev_open_output_stream()
4471 out->stream.create_mmap_buffer = out_create_mmap_buffer; in adev_open_output_stream()
4472 out->stream.get_mmap_position = out_get_mmap_position; in adev_open_output_stream()
4541 out->stream.common.get_sample_rate = out_get_sample_rate; in adev_open_output_stream()
4542 out->stream.common.set_sample_rate = out_set_sample_rate; in adev_open_output_stream()
4543 out->stream.common.get_buffer_size = out_get_buffer_size; in adev_open_output_stream()
4544 out->stream.common.get_channels = out_get_channels; in adev_open_output_stream()
4545 out->stream.common.get_format = out_get_format; in adev_open_output_stream()
4546 out->stream.common.set_format = out_set_format; in adev_open_output_stream()
4547 out->stream.common.standby = out_standby; in adev_open_output_stream()
4548 out->stream.common.dump = out_dump; in adev_open_output_stream()
4549 out->stream.common.set_parameters = out_set_parameters; in adev_open_output_stream()
4550 out->stream.common.get_parameters = out_get_parameters; in adev_open_output_stream()
4551 out->stream.common.add_audio_effect = out_add_audio_effect; in adev_open_output_stream()
4552 out->stream.common.remove_audio_effect = out_remove_audio_effect; in adev_open_output_stream()
4553 out->stream.get_latency = out_get_latency; in adev_open_output_stream()
4554 out->stream.set_volume = out_set_volume; in adev_open_output_stream()
4556 out->stream.write = out_write_for_no_output; in adev_open_output_stream()
4558 out->stream.write = out_write; in adev_open_output_stream()
4560 out->stream.get_render_position = out_get_render_position; in adev_open_output_stream()
4561 out->stream.get_next_write_timestamp = out_get_next_write_timestamp; in adev_open_output_stream()
4562 out->stream.get_presentation_position = out_get_presentation_position; in adev_open_output_stream()
4577 config->format = out->stream.common.get_format(&out->stream.common); in adev_open_output_stream()
4578 config->channel_mask = out->stream.common.get_channels(&out->stream.common); in adev_open_output_stream()
4579 config->sample_rate = out->stream.common.get_sample_rate(&out->stream.common); in adev_open_output_stream()
4603 *stream_out = &out->stream; in adev_open_output_stream()
4616 struct audio_stream_out *stream) in adev_close_output_stream() argument
4618 struct stream_out *out = (struct stream_out *)stream; in adev_close_output_stream()
4626 out_standby(&stream->common); in adev_close_output_stream()
4645 free(stream); in adev_close_output_stream()
4770 lock_output_stream(usecase->stream.out); in adev_set_parameters()
4776 pthread_mutex_unlock(&usecase->stream.out->lock); in adev_set_parameters()
4997 in->stream.common.get_sample_rate = in_get_sample_rate; in adev_open_input_stream()
4998 in->stream.common.set_sample_rate = in_set_sample_rate; in adev_open_input_stream()
4999 in->stream.common.get_buffer_size = in_get_buffer_size; in adev_open_input_stream()
5000 in->stream.common.get_channels = in_get_channels; in adev_open_input_stream()
5001 in->stream.common.get_format = in_get_format; in adev_open_input_stream()
5002 in->stream.common.set_format = in_set_format; in adev_open_input_stream()
5003 in->stream.common.standby = in_standby; in adev_open_input_stream()
5004 in->stream.common.dump = in_dump; in adev_open_input_stream()
5005 in->stream.common.set_parameters = in_set_parameters; in adev_open_input_stream()
5006 in->stream.common.get_parameters = in_get_parameters; in adev_open_input_stream()
5007 in->stream.common.add_audio_effect = in_add_audio_effect; in adev_open_input_stream()
5008 in->stream.common.remove_audio_effect = in_remove_audio_effect; in adev_open_input_stream()
5009 in->stream.set_gain = in_set_gain; in adev_open_input_stream()
5010 in->stream.read = in_read; in adev_open_input_stream()
5011 in->stream.get_input_frames_lost = in_get_input_frames_lost; in adev_open_input_stream()
5012 in->stream.get_capture_position = in_get_capture_position; in adev_open_input_stream()
5013 in->stream.get_active_microphones = in_get_active_microphones; in adev_open_input_stream()
5107 frame_size = audio_stream_in_frame_size(&in->stream); in adev_open_input_stream()
5128 frame_size = audio_stream_in_frame_size(&in->stream); in adev_open_input_stream()
5147 in->stream.start = in_start; in adev_open_input_stream()
5148 in->stream.stop = in_stop; in adev_open_input_stream()
5149 in->stream.create_mmap_buffer = in_create_mmap_buffer; in adev_open_input_stream()
5150 in->stream.get_mmap_position = in_get_mmap_position; in adev_open_input_stream()
5162 frame_size = audio_stream_in_frame_size(&in->stream); in adev_open_input_stream()
5173 frame_size = audio_stream_in_frame_size(&in->stream); in adev_open_input_stream()
5212 *stream_in = &in->stream; in adev_open_input_stream()
5223 struct audio_stream_in *stream) in adev_close_input_stream() argument
5225 struct stream_in *in = (struct stream_in *)stream; in adev_close_input_stream()
5230 audio_extn_snd_mon_unregister_listener(stream); in adev_close_input_stream()
5231 in_standby(&stream->common); in adev_close_input_stream()
5239 free(stream); in adev_close_input_stream()
5342 uc_info.stream.in = ∈ in adev_verify_devices()
5348 uc_info.stream.out = &out; in adev_verify_devices()
5437 static void adev_snd_mon_cb(void * stream __unused, struct str_parms * parms) in adev_snd_mon_cb()
5488 set_compr_volume(&out->stream, out->volume_l, out->volume_r); in check_a2dp_restore_l()
5505 set_compr_volume(&out->stream, 0.0f, 0.0f); in check_a2dp_restore_l()