Lines Matching defs:in
5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
54 // Set to 1 to enable extremely verbose logging in this module.
80 // results in the application opening a new input stream before closing the old input stream
109 // Set *result_variable_ptr to true if value_to_find is present in the array array_to_search,
125 // Channel mask field in this data structure is set to either input_channel_mask or
137 size_t pipe_frame_size; // Number of bytes in each audio frame in the pipe.
138 size_t buffer_size_frames; // Size of the audio pipe in frames.
222 // Determine whether the specified channel in mask is supported by the submix module.
225 // Set of channel in masks supported by Format_from_SR_C()
235 // Determine whether the specified channel in mask is supported, if it is return the specified
236 // channel in mask, otherwise return the default channel in mask for the submix module.
348 // buffer_size_frames and optionally associate "in" or "out" with the submix audio device.
353 struct submix_stream_in * const in,
356 ALOG_ASSERT(in || out);
361 if (in) {
362 rsxadev->input = in;
390 // possible channels stored in the pipe for the situation when the number of channels in
391 in the input stream.
417 // Store the sanitized audio format in the device so that it's possible to determine
423 if (in) device_config->pipe_frame_size = audio_stream_in_frame_size(&in->stream);
450 const struct submix_stream_in * const in,
456 ALOG_ASSERT(in == NULL || rsxadev->input == in);
458 if (in != NULL) {
460 const_cast<struct submix_stream_in*>(in)->ref_count--;
461 if (in->ref_count == 0) {
464 ALOGV("submix_audio_device_destroy_pipe(): input ref_count %d", in->ref_count);
512 opening_input ? "in" : "out", config->channel_mask);
531 // Calculate the maximum size of the pipe buffer in frames for the specified stream.
649 // FIXME this is using hard-coded strings but in the future, this functionality will be
688 SUBMIX_ALOGV("out_get_latency() returns %u ms, size in frames %zu, sample rate %u",
824 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(
827 const uint32_t rate = in->dev->config.input_sample_rate;
829 const uint32_t rate = in->dev->config.common.sample_rate;
837 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(stream);
841 if (rate != in->dev->config.input_sample_rate) {
843 "%u to %u", in->dev->config.input_sample_rate, rate);
851 in->dev->config.common.sample_rate = rate;
858 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(
860 const struct submix_config * const config = &in->dev->config;
880 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(
882 const audio_channel_mask_t channel_mask = in->dev->config.input_channel_mask;
889 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(
891 const audio_format_t format = in->dev->config.common.format;
898 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(stream);
899 if (format != in->dev->config.common.format) {
953 struct submix_stream_in * const in = audio_stream_in_get_submix_stream_in(stream);
954 struct submix_audio_device * const rsxadev = in->dev;
962 const bool output_standby_transition = (in->output_standby != in->dev->output_standby);
963 in->output_standby = rsxadev->output_standby;
969 int rc = clock_gettime(CLOCK_MONOTONIC, &in->record_start_time);
971 in->read_counter_frames = 0;
975 in->read_counter_frames += frames_to_read;
982 in->read_error_count++;// ok if it rolls over
983 ALOGE_IF(in->read_error_count < MAX_READ_ERROR_LOGS,
1058 // Perform in-place channel conversion.
1059 // NOTE: In the following "input stream" refers to the data returned by this function
1064 // Offset into the output stream data in samples.
1073 // Offset into the input stream data in samples.
1091 // sampled at a different rate this will result in very nasty aliasing.
1109 if (in->log_fd >= 0) write(in->log_fd, buff, frames_read * frame_size);
1142 record_duration.tv_sec = time_after_read.tv_sec - in->record_start_time.tv_sec;
1143 record_duration.tv_nsec = time_after_read.tv_nsec - in->record_start_time.tv_nsec;
1154 ((int64_t)(in->read_counter_frames
1389 struct submix_stream_in *in;
1405 in = rsxadev->input;
1406 if (in) {
1407 in->ref_count++;
1414 in->ref_count);
1417 ALOGD(" Non-NULL sink when opening input stream, refcount=%d", in->ref_count);
1420 ALOGE("NULL sink when opening input stream, refcount=%d", in->ref_count);
1425 in = NULL;
1428 if (!in) {
1429 in = (struct submix_stream_in *)calloc(1, sizeof(struct submix_stream_in));
1430 if (!in) return -ENOMEM;
1431 in->ref_count = 1;
1434 in->stream.common.get_sample_rate = in_get_sample_rate;
1435 in->stream.common.set_sample_rate = in_set_sample_rate;
1436 in->stream.common.get_buffer_size = in_get_buffer_size;
1437 in->stream.common.get_channels = in_get_channels;
1438 in->stream.common.get_format = in_get_format;
1439 in->stream.common.set_format = in_set_format;
1440 in->stream.common.standby = in_standby;
1441 in->stream.common.dump = in_dump;
1442 in->stream.common.set_parameters = in_set_parameters;
1443 in->stream.common.get_parameters = in_get_parameters;
1444 in->stream.common.add_audio_effect = in_add_audio_effect;
1445 in->stream.common.remove_audio_effect = in_remove_audio_effect;
1446 in->stream.set_gain = in_set_gain;
1447 in->stream.read = in_read;
1448 in->stream.get_input_frames_lost = in_get_input_frames_lost;
1452 in->read_counter_frames = 0;
1453 in->output_standby = rsxadev->output_standby;
1454 in->dev = rsxadev;
1455 in->read_error_count = 0;
1459 DEFAULT_PIPE_PERIOD_COUNT, in, NULL);
1461 in->log_fd = open(LOG_STREAM_IN_FILENAME, O_CREAT | O_TRUNC | O_WRONLY,
1463 ALOGE_IF(in->log_fd < 0, "adev_open_input_stream(): log file open failed %s",
1465 ALOGV("adev_open_input_stream(): log_fd = %d", in->log_fd);
1468 *stream_in = &in->stream;
1476 struct submix_stream_in * const in = audio_stream_in_get_submix_stream_in(stream);
1478 submix_audio_device_destroy_pipe(audio_hw_device_get_submix_audio_device(dev), in, NULL);
1480 if (in->log_fd >= 0) close(in->log_fd);
1483 if (in->ref_count == 0) free(in);
1485 free(in);