Lines Matching refs:adev
181 struct alsa_audio_device *adev = out->dev; in start_output_stream() local
212 adev->active_output = out; in start_output_stream()
261 struct alsa_audio_device *adev = out->dev; in do_output_standby() local
268 adev->active_output = NULL; in do_output_standby()
271 aec_set_spk_running(adev->aec, false); in do_output_standby()
299 struct alsa_audio_device *adev = out->dev; in out_set_parameters() local
309 pthread_mutex_lock(&adev->lock); in out_set_parameters()
316 pthread_mutex_unlock(&adev->lock); in out_set_parameters()
348 struct alsa_audio_device *adev = out->dev; in out_write() local
358 pthread_mutex_lock(&adev->lock); in out_write()
363 pthread_mutex_unlock(&adev->lock); in out_write()
367 aec_set_spk_running(adev->aec, true); in out_write()
370 pthread_mutex_unlock(&adev->lock); in out_write()
384 int aec_ret = write_to_reference_fifo(adev->aec, (void *)buffer, &info); in out_write()
450 struct alsa_audio_device *adev = in->dev; in start_input_stream() local
473 adev->active_input = in; in start_input_stream()
574 struct alsa_audio_device *adev = in->dev; in do_input_standby() local
579 adev->active_input = NULL; in do_input_standby()
643 struct alsa_audio_device *adev = in->dev; in in_read() local
658 if (!aec_get_spk_running(adev->aec)) { in in_read()
671 int ref_ret = get_reference_samples(adev->aec, buffer, &info); in in_read()
707 pthread_mutex_lock(&adev->lock); in in_read()
711 pthread_mutex_unlock(&adev->lock); in in_read()
718 pthread_mutex_unlock(&adev->lock); in in_read()
735 adev_get_mic_mute((struct audio_hw_device*)adev, &mic_muted); in in_read()
748 int aec_ret = process_aec(adev->aec, buffer, &info); in in_read()
902 struct alsa_audio_device *adev = (struct alsa_audio_device *)dev; in adev_close_output_stream() local
903 destroy_aec_reference_config(adev->aec); in adev_close_output_stream()
978 struct alsa_audio_device *adev = (struct alsa_audio_device *)dev; in adev_set_mic_mute() local
979 pthread_mutex_lock(&adev->lock); in adev_set_mic_mute()
980 adev->mic_mute = state; in adev_set_mic_mute()
981 pthread_mutex_unlock(&adev->lock); in adev_set_mic_mute()
988 struct alsa_audio_device *adev = (struct alsa_audio_device *)dev; in adev_get_mic_mute() local
989 pthread_mutex_lock(&adev->lock); in adev_get_mic_mute()
990 *state = adev->mic_mute; in adev_get_mic_mute()
991 pthread_mutex_unlock(&adev->lock); in adev_get_mic_mute()
1115 struct alsa_audio_device *adev = (struct alsa_audio_device *)device; in adev_close() local
1116 release_aec(adev->aec); in adev_close()
1117 audio_route_free(adev->audio_route); in adev_close()
1118 mixer_close(adev->mixer); in adev_close()
1135 struct alsa_audio_device* adev = calloc(1, sizeof(struct alsa_audio_device)); in adev_open() local
1136 if (!adev) { in adev_open()
1140 adev->hw_device.common.tag = HARDWARE_DEVICE_TAG; in adev_open()
1141 adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0; in adev_open()
1142 adev->hw_device.common.module = (struct hw_module_t *) module; in adev_open()
1143 adev->hw_device.common.close = adev_close; in adev_open()
1144 adev->hw_device.init_check = adev_init_check; in adev_open()
1145 adev->hw_device.set_voice_volume = adev_set_voice_volume; in adev_open()
1146 adev->hw_device.set_master_volume = adev_set_master_volume; in adev_open()
1147 adev->hw_device.get_master_volume = adev_get_master_volume; in adev_open()
1148 adev->hw_device.set_master_mute = adev_set_master_mute; in adev_open()
1149 adev->hw_device.get_master_mute = adev_get_master_mute; in adev_open()
1150 adev->hw_device.set_mode = adev_set_mode; in adev_open()
1151 adev->hw_device.set_mic_mute = adev_set_mic_mute; in adev_open()
1152 adev->hw_device.get_mic_mute = adev_get_mic_mute; in adev_open()
1153 adev->hw_device.set_parameters = adev_set_parameters; in adev_open()
1154 adev->hw_device.get_parameters = adev_get_parameters; in adev_open()
1155 adev->hw_device.get_input_buffer_size = adev_get_input_buffer_size; in adev_open()
1156 adev->hw_device.open_output_stream = adev_open_output_stream; in adev_open()
1157 adev->hw_device.close_output_stream = adev_close_output_stream; in adev_open()
1158 adev->hw_device.open_input_stream = adev_open_input_stream; in adev_open()
1159 adev->hw_device.close_input_stream = adev_close_input_stream; in adev_open()
1160 adev->hw_device.dump = adev_dump; in adev_open()
1161 adev->hw_device.get_microphones = adev_get_microphones; in adev_open()
1163 *device = &adev->hw_device.common; in adev_open()
1166 adev->mixer = mixer_open(out_card); in adev_open()
1167 if (!adev->mixer) { in adev_open()
1172 adev->audio_route = audio_route_init(out_card, MIXER_XML_PATH); in adev_open()
1173 if (!adev->audio_route) { in adev_open()
1185 audio_route_apply_and_update_path(adev->audio_route, path_name); in adev_open()
1187 pthread_mutex_lock(&adev->lock); in adev_open()
1189 CHANNEL_STEREO, &adev->aec)) { in adev_open()
1190 pthread_mutex_unlock(&adev->lock); in adev_open()
1193 pthread_mutex_unlock(&adev->lock); in adev_open()
1198 audio_route_free(adev->audio_route); in adev_open()
1200 mixer_close(adev->mixer); in adev_open()
1202 free(adev); in adev_open()