Lines Matching defs:routes
171 route_config_t routes[MAX_ROUTES];
376 rsxadev->routes[route_idx].input = in;
377 rsxadev->routes[route_idx].config.input_channel_mask = config->channel_mask;
379 rsxadev->routes[route_idx].config.input_sample_rate = config->sample_rate;
383 if (!rsxadev->routes[route_idx].output) {
384 rsxadev->routes[route_idx].config.output_sample_rate = 48000;
385 rsxadev->routes[route_idx].config.output_channel_mask = AUDIO_CHANNEL_OUT_STEREO;
391 rsxadev->routes[route_idx].output = out;
392 rsxadev->routes[route_idx].config.output_channel_mask = config->channel_mask;
394 rsxadev->routes[route_idx].config.output_sample_rate = config->sample_rate;
398 strncpy(rsxadev->routes[route_idx].address, address, AUDIO_DEVICE_MAX_ADDRESS_LEN);
399 ALOGD(" now using address %s for route %d", rsxadev->routes[route_idx].address, route_idx);
401 if (rsxadev->routes[route_idx].rsxSink == NULL || rsxadev->routes[route_idx].rsxSource == NULL)
403 struct submix_config * const device_config = &rsxadev->routes[route_idx].config;
434 ALOG_ASSERT(rsxadev->routes[route_idx].rsxSink == NULL);
435 ALOG_ASSERT(rsxadev->routes[route_idx].rsxSource == NULL);
436 rsxadev->routes[route_idx].rsxSink = sink;
437 rsxadev->routes[route_idx].rsxSource = source;
467 rsxadev->routes[route_idx].address);
468 if (rsxadev->routes[route_idx].rsxSink != 0) {
469 rsxadev->routes[route_idx].rsxSink.clear();
470 rsxadev->routes[route_idx].rsxSink = 0;
472 if (rsxadev->routes[route_idx].rsxSource != 0) {
473 rsxadev->routes[route_idx].rsxSource.clear();
474 rsxadev->routes[route_idx].rsxSource = 0;
476 memset(rsxadev->routes[route_idx].address, 0, AUDIO_DEVICE_MAX_ADDRESS_LEN);
478 memset(rsxadev->routes[route_idx].resampler_buffer, 0,
497 ALOG_ASSERT(rsxadev->routes[route_idx].input == in);
499 rsxadev->routes[route_idx].input = NULL;
508 ALOG_ASSERT(rsxadev->routes[route_idx].output == out);
509 rsxadev->routes[route_idx].output = NULL;
512 rsxadev->routes[route_idx].input == NULL && rsxadev->routes[route_idx].output == NULL) {
539 output_open = rsxadev->routes[route_idx].output != NULL;
540 input_open = rsxadev->routes[route_idx].input != NULL;
541 memcpy(&pipe_config, &rsxadev->routes[route_idx].config.common, sizeof(pipe_config));
561 opening_input ? rsxadev->routes[route_idx].config.output_channel_mask :
562 rsxadev->routes[route_idx].config.input_channel_mask;
580 if (strcmp(rsxadev->routes[i].address, "") == 0) {
583 if (strncmp(rsxadev->routes[i].address, address, AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
590 ALOGE("Cannot create new route for address %s, max number of routes reached", address);
619 const uint32_t out_rate = out->dev->routes[out->route_handle].config.output_sample_rate;
621 const uint32_t out_rate = out->dev->routes[out->route_handle].config.common.sample_rate;
624 out_rate, out->dev->routes[out->route_handle].address);
634 if (rate != out->dev->routes[out->route_handle].config.output_sample_rate) {
637 out->dev->routes[out->route_handle].config.output_sample_rate, rate,
638 out->dev->routes[out->route_handle].address);
647 out->dev->routes[out->route_handle].config.common.sample_rate = rate;
655 const struct submix_config * const config = &out->dev->routes[out->route_handle].config;
670 uint32_t channel_mask = out->dev->routes[out->route_handle].config.output_channel_mask;
679 const audio_format_t format = out->dev->routes[out->route_handle].config.common.format;
687 if (format != out->dev->routes[out->route_handle].config.common.format) {
732 rsxadev->routes[audio_stream_get_submix_stream_out(stream)->route_handle]
758 const struct submix_config * const config = &out->dev->routes[out->route_handle].config;
793 sp<MonoPipe> sink = rsxadev->routes[out->route_handle].rsxSink;
815 sp<MonoPipeReader> source = rsxadev->routes[out->route_handle].rsxSource;
816 if (rsxadev->routes[out->route_handle].input == NULL && availableToWrite < frames) {
887 rsxadev->routes[out->route_handle].rsxSource->availableToRead();
920 rsxadev->routes[out->route_handle].rsxSource->availableToRead();
960 const uint32_t rate = in->dev->routes[in->route_handle].config.input_sample_rate;
962 const uint32_t rate = in->dev->routes[in->route_handle].config.common.sample_rate;
974 if (rate != in->dev->routes[in->route_handle].config.input_sample_rate) {
976 "%u to %u", in->dev->routes[in->route_handle].config.input_sample_rate, rate);
984 in->dev->routes[in->route_handle].config.common.sample_rate = rate;
993 const struct submix_config * const config = &in->dev->routes[in->route_handle].config;
1016 in->dev->routes[in->route_handle].config.input_channel_mask;
1025 const audio_format_t format = in->dev->routes[in->route_handle].config.common.format;
1033 if (format != in->dev->routes[in->route_handle].config.common.format) {
1097 const bool output_standby = rsxadev->routes[in->route_handle].output == NULL
1098 ? true : rsxadev->routes[in->route_handle].output->output_standby;
1117 sp<MonoPipeReader> source = rsxadev->routes[in->route_handle].rsxSource;
1136 rsxadev->routes[in->route_handle].config.input_channel_mask);
1138 rsxadev->routes[in->route_handle].config.output_channel_mask);
1143 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format ==
1153 rsxadev->routes[in->route_handle].config.output_sample_rate;
1155 sizeof(rsxadev->routes[in->route_handle].resampler_buffer) /
1156 sizeof(rsxadev->routes[in->route_handle].resampler_buffer[0]);
1163 ALOG_ASSERT(rsxadev->routes[in->route_handle].config.common.format ==
1166 rsxadev->routes[in->route_handle].config.input_channel_mask) == 1);
1182 buff = (char*)rsxadev->routes[in->route_handle].resampler_buffer;
1401 force_pipe_creation = rsxadev->routes[route_idx].config.common.sample_rate
1407 if ((rsxadev->routes[route_idx].rsxSink != NULL
1408 && rsxadev->routes[route_idx].rsxSink->isShutdown()) || force_pipe_creation) {
1440 ALOGD("adev_close_output_stream() addr = %s", rsxadev->routes[out->route_handle].address);
1537 if (rsxadev->routes[i].config.buffer_period_size_frames > max_buffer_period_size_frames)
1539 max_buffer_period_size_frames = rsxadev->routes[i].config.buffer_period_size_frames;
1590 in = rsxadev->routes[route_idx].input;
1593 sp<MonoPipe> sink = rsxadev->routes[route_idx].rsxSink;
1643 if (rsxadev->routes[route_idx].output != NULL) {
1644 in->output_standby_rec_thr = rsxadev->routes[route_idx].output->output_standby;
1701 rsxadev->routes[i].config.input_sample_rate,
1702 rsxadev->routes[i].config.output_sample_rate,
1703 rsxadev->routes[i].address);
1753 memset(&rsxadev->routes[i], 0, sizeof(route_config));
1754 strcpy(rsxadev->routes[i].address, "");