Lines Matching defs:in
6 * you may not use this file except in compliance with the License.
11 * Unless required by applicable law or agreed to in writing, software
143 /* Function used only in debug mode */
166 pprev is optional in case a dedicated diff is required */
507 ERROR("Audiopath start failed - in call, move to suspended");
600 /* only allow autostarting if we are in stopped or standby */
611 ERROR("stream not in stopped or standby");
719 // Do nothing in SUSPENDED state.
820 /* volume controlled in audioflinger mixer (digital) */
890 struct a2dp_stream_in *in = (struct a2dp_stream_in *)stream;
893 return in->common.cfg.rate;
898 struct a2dp_stream_in *in = (struct a2dp_stream_in *)stream;
902 if (in->common.cfg.rate > 0 && in->common.cfg.rate == rate)
918 struct a2dp_stream_in *in = (struct a2dp_stream_in *)stream;
921 return in->common.cfg.channel_flags;
992 struct a2dp_stream_in *in = (struct a2dp_stream_in *)stream;
996 DEBUG("read %zu bytes, state: %d", bytes, in->common.state);
998 pthread_mutex_lock(&in->common.lock);
999 if (in->common.state == AUDIO_A2DP_STATE_SUSPENDED ||
1000 in->common.state == AUDIO_A2DP_STATE_STOPPING)
1006 /* only allow autostarting if we are in stopped or standby */
1007 if ((in->common.state == AUDIO_A2DP_STATE_STOPPED) ||
1008 (in->common.state == AUDIO_A2DP_STATE_STANDBY))
1010 if (start_audio_datapath(&in->common) < 0)
1015 else if (in->common.state != AUDIO_A2DP_STATE_STARTED)
1017 ERROR("stream not in stopped or standby");
1021 pthread_mutex_unlock(&in->common.lock);
1022 read = skt_read(in->common.audio_fd, buffer, bytes);
1023 pthread_mutex_lock(&in->common.lock);
1026 skt_disconnect(in->common.audio_fd);
1027 in->common.audio_fd = AUDIO_SKT_DISCONNECTED;
1028 if ((in->common.state != AUDIO_A2DP_STATE_SUSPENDED) &&
1029 (in->common.state != AUDIO_A2DP_STATE_STOPPING)) {
1030 in->common.state = AUDIO_A2DP_STATE_STOPPED;
1040 pthread_mutex_unlock(&in->common.lock);
1046 pthread_mutex_unlock(&in->common.lock);
1048 us_delay = calc_audiotime(in->common.cfg, bytes);
1151 in proper state when START is initiated
1296 struct a2dp_stream_in *in;
1307 in = (struct a2dp_stream_in *)calloc(1, sizeof(struct a2dp_stream_in));
1309 if (!in)
1312 in->stream.common.get_sample_rate = in_get_sample_rate;
1313 in->stream.common.set_sample_rate = in_set_sample_rate;
1314 in->stream.common.get_buffer_size = in_get_buffer_size;
1315 in->stream.common.get_channels = in_get_channels;
1316 in->stream.common.get_format = in_get_format;
1317 in->stream.common.set_format = in_set_format;
1318 in->stream.common.standby = in_standby;
1319 in->stream.common.dump = in_dump;
1320 in->stream.common.set_parameters = in_set_parameters;
1321 in->stream.common.get_parameters = in_get_parameters;
1322 in->stream.common.add_audio_effect = in_add_audio_effect;
1323 in->stream.common.remove_audio_effect = in_remove_audio_effect;
1324 in->stream.set_gain = in_set_gain;
1325 in->stream.read = in_read;
1326 in->stream.get_input_frames_lost = in_get_input_frames_lost;
1329 a2dp_stream_common_init(&in->common);
1331 *stream_in = &in->stream;
1332 a2dp_dev->input = in;
1334 a2dp_open_ctrl_path(&in->common);
1335 if (in->common.ctrl_fd == AUDIO_SKT_DISCONNECTED)
1342 if (a2dp_read_audio_config(&in->common) < 0) {
1352 free(in);
1363 struct a2dp_stream_in* in = (struct a2dp_stream_in *)stream;
1364 a2dp_state_t state = in->common.state;
1369 stop_audio_datapath(&in->common);
1371 skt_disconnect(in->common.ctrl_fd);
1372 in->common.ctrl_fd = AUDIO_SKT_DISCONNECTED;
1402 INFO(" adev_open in A2dp_hw module");