Lines Matching refs:in

362                                             struct submix_stream_in * const in,  in audio_config_compare()  argument
367 ALOG_ASSERT(in || out); in audio_config_compare()
374 if (in) { in audio_config_compare()
375 in->route_handle = route_idx; in audio_config_compare()
376 rsxadev->routes[route_idx].input = in; in audio_config_compare()
444 if (in) device_config->pipe_frame_size = audio_stream_in_frame_size(&in->stream); in audio_config_compare()
487 const struct submix_stream_in * const in, in audio_config_compare() argument
493 if (in != NULL) { in audio_config_compare()
495 const_cast<struct submix_stream_in*>(in)->ref_count--; in audio_config_compare()
496 route_idx = in->route_handle; in audio_config_compare()
497 ALOG_ASSERT(rsxadev->routes[route_idx].input == in); in audio_config_compare()
498 if (in->ref_count == 0) { in audio_config_compare()
501 ALOGV("submix_audio_device_destroy_pipe_l(): input ref_count %d", in->ref_count); in audio_config_compare()
957 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in( in audio_config_compare() local
960 const uint32_t rate = in->dev->routes[in->route_handle].config.input_sample_rate; in audio_config_compare()
962 const uint32_t rate = in->dev->routes[in->route_handle].config.common.sample_rate; in audio_config_compare()
970 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(stream); in audio_config_compare() local
974 if (rate != in->dev->routes[in->route_handle].config.input_sample_rate) { in audio_config_compare()
976 "%u to %u", in->dev->routes[in->route_handle].config.input_sample_rate, rate); in audio_config_compare()
984 in->dev->routes[in->route_handle].config.common.sample_rate = rate; in audio_config_compare()
991 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in( in audio_config_compare() local
993 const struct submix_config * const config = &in->dev->routes[in->route_handle].config; in audio_config_compare()
1013 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in( in audio_config_compare() local
1016 in->dev->routes[in->route_handle].config.input_channel_mask; in audio_config_compare()
1023 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in( in audio_config_compare() local
1025 const audio_format_t format = in->dev->routes[in->route_handle].config.common.format; in audio_config_compare()
1032 const struct submix_stream_in * const in = audio_stream_get_submix_stream_in(stream); in audio_config_compare() local
1033 if (format != in->dev->routes[in->route_handle].config.common.format) { in audio_config_compare()
1044 struct submix_stream_in * const in = audio_stream_get_submix_stream_in(stream); in audio_config_compare() local
1045 struct submix_audio_device * const rsxadev = in->dev; in audio_config_compare()
1049 in->input_standby = true; in audio_config_compare()
1088 struct submix_stream_in * const in = audio_stream_in_get_submix_stream_in(stream); in audio_config_compare() local
1089 struct submix_audio_device * const rsxadev = in->dev; in audio_config_compare()
1097 const bool output_standby = rsxadev->routes[in->route_handle].output == NULL in audio_config_compare()
1098 ? true : rsxadev->routes[in->route_handle].output->output_standby; in audio_config_compare()
1099 const bool output_standby_transition = (in->output_standby_rec_thr != output_standby); in audio_config_compare()
1100 in->output_standby_rec_thr = output_standby; in audio_config_compare()
1102 if (in->input_standby || output_standby_transition) { in audio_config_compare()
1103 in->input_standby = false; in audio_config_compare()
1106 int rc = clock_gettime(CLOCK_MONOTONIC, &in->record_start_time); in audio_config_compare()
1108 in->read_counter_frames = 0; in audio_config_compare()
1112 in->read_counter_frames += frames_to_read; in audio_config_compare()
1117 sp<MonoPipeReader> source = rsxadev->routes[in->route_handle].rsxSource; in audio_config_compare()
1119 in->read_error_count++;// ok if it rolls over in audio_config_compare()
1120 ALOGE_IF(in->read_error_count < MAX_READ_ERROR_LOGS, in audio_config_compare()
1136 rsxadev->routes[in->route_handle].config.input_channel_mask); in audio_config_compare()
1138 rsxadev->routes[in->route_handle].config.output_channel_mask); in audio_config_compare()
1143 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format == in audio_config_compare()
1153 rsxadev->routes[in->route_handle].config.output_sample_rate; in audio_config_compare()
1155 sizeof(rsxadev->routes[in->route_handle].resampler_buffer) / in audio_config_compare()
1156 sizeof(rsxadev->routes[in->route_handle].resampler_buffer[0]); in audio_config_compare()
1163 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format == in audio_config_compare()
1166 rsxadev->routes[in->route_handle].config.input_channel_mask) == 1); in audio_config_compare()
1182 buff = (char*)rsxadev->routes[in->route_handle].resampler_buffer; in audio_config_compare()
1251 if (in->log_fd >= 0) write(in->log_fd, buff, frames_read * frame_size); in audio_config_compare()
1284 record_duration.tv_sec = time_after_read.tv_sec - in->record_start_time.tv_sec; in audio_config_compare()
1285 record_duration.tv_nsec = time_after_read.tv_nsec - in->record_start_time.tv_nsec; in audio_config_compare()
1296 ((int64_t)(in->read_counter_frames in audio_config_compare()
1562 struct submix_stream_in *in; in audio_config_compare() local
1590 in = rsxadev->routes[route_idx].input; in audio_config_compare()
1591 if (in) { in audio_config_compare()
1592 in->ref_count++; in audio_config_compare()
1599 in->ref_count); in audio_config_compare()
1600 submix_audio_device_release_pipe_l(rsxadev, in->route_handle); in audio_config_compare()
1602 ALOGD(" Non-NULL sink when opening input stream, refcount=%d", in->ref_count); in audio_config_compare()
1605 ALOGE("NULL sink when opening input stream, refcount=%d", in->ref_count); in audio_config_compare()
1609 in = NULL; in audio_config_compare()
1612 if (!in) { in audio_config_compare()
1613 in = (struct submix_stream_in *)calloc(1, sizeof(struct submix_stream_in)); in audio_config_compare()
1614 if (!in) return -ENOMEM; in audio_config_compare()
1615 in->ref_count = 1; in audio_config_compare()
1618 in->stream.common.get_sample_rate = in_get_sample_rate; in audio_config_compare()
1619 in->stream.common.set_sample_rate = in_set_sample_rate; in audio_config_compare()
1620 in->stream.common.get_buffer_size = in_get_buffer_size; in audio_config_compare()
1621 in->stream.common.get_channels = in_get_channels; in audio_config_compare()
1622 in->stream.common.get_format = in_get_format; in audio_config_compare()
1623 in->stream.common.set_format = in_set_format; in audio_config_compare()
1624 in->stream.common.standby = in_standby; in audio_config_compare()
1625 in->stream.common.dump = in_dump; in audio_config_compare()
1626 in->stream.common.set_parameters = in_set_parameters; in audio_config_compare()
1627 in->stream.common.get_parameters = in_get_parameters; in audio_config_compare()
1628 in->stream.common.add_audio_effect = in_add_audio_effect; in audio_config_compare()
1629 in->stream.common.remove_audio_effect = in_remove_audio_effect; in audio_config_compare()
1630 in->stream.set_gain = in_set_gain; in audio_config_compare()
1631 in->stream.read = in_read; in audio_config_compare()
1632 in->stream.get_input_frames_lost = in_get_input_frames_lost; in audio_config_compare()
1634 in->dev = rsxadev; in audio_config_compare()
1636 in->log_fd = -1; in audio_config_compare()
1641 in->read_counter_frames = 0; in audio_config_compare()
1642 in->input_standby = true; in audio_config_compare()
1644 in->output_standby_rec_thr = rsxadev->routes[route_idx].output->output_standby; in audio_config_compare()
1646 in->output_standby_rec_thr = true; in audio_config_compare()
1649 in->read_error_count = 0; in audio_config_compare()
1653 DEFAULT_PIPE_PERIOD_COUNT, in, NULL, address, route_idx); in audio_config_compare()
1655 if (in->log_fd >= 0) close(in->log_fd); in audio_config_compare()
1656 in->log_fd = open(LOG_STREAM_IN_FILENAME, O_CREAT | O_TRUNC | O_WRONLY, in audio_config_compare()
1658 ALOGE_IF(in->log_fd < 0, "adev_open_input_stream(): log file open failed %s", in audio_config_compare()
1660 ALOGV("adev_open_input_stream(): log_fd = %d", in->log_fd); in audio_config_compare()
1663 *stream_in = &in->stream; in audio_config_compare()
1674 struct submix_stream_in * const in = audio_stream_in_get_submix_stream_in(stream); in audio_config_compare() local
1677 submix_audio_device_destroy_pipe_l(rsxadev, in, NULL); in audio_config_compare()
1679 if (in->log_fd >= 0) close(in->log_fd); in audio_config_compare()
1682 if (in->ref_count == 0) free(in); in audio_config_compare()
1684 free(in); in audio_config_compare()