Lines Matching refs:adev
182 struct alsa_audio_device *adev = out->dev; in xa_device_run() local
184 void *p_comp=adev->dsp_device.p_decoder; in xa_device_run()
186 memcpy(adev->dsp_device.dec_inbuf[0],buffer,bytes); in xa_device_run()
187 adev->dsp_device.read_length=bytes; in xa_device_run()
189 if (adev->dsp_device.xafinitdone == 0) { in xa_device_run()
190 …XF_CHK_API(xaf_comp_process(adev->dsp_device.p_adev, adev->dsp_device.p_decoder, adev->dsp_device.… in xa_device_run()
191 …XF_CHK_API(xaf_comp_get_status(adev->dsp_device.p_adev, adev->dsp_device.p_decoder, &adev->dsp_dev… in xa_device_run()
192 ALOGE("PROXY:%s xaf_comp_get_status %d\n",__func__,adev->dsp_device.dec_status); in xa_device_run()
193 if (adev->dsp_device.dec_status == XAF_INIT_DONE) { in xa_device_run()
194 adev->dsp_device.xafinitdone = 1; in xa_device_run()
199 …XF_CHK_API(xaf_comp_process(NULL, adev->dsp_device.p_decoder, adev->dsp_device.dec_inbuf[0], adev-… in xa_device_run()
201 … XF_CHK_API(xaf_comp_get_status(NULL, p_comp, &comp_status, &adev->dsp_device.comp_info)); in xa_device_run()
208 void *p_buf = (void *)adev->dsp_device.comp_info.buf; in xa_device_run()
209 int size = adev->dsp_device.comp_info.length; in xa_device_run()
214 …XF_CHK_API(xaf_comp_process(NULL, adev->dsp_device.p_decoder, (void *)adev->dsp_device.comp_info.b… in xa_device_run()
253 struct alsa_audio_device *adev = out->dev; in start_output_stream() local
270 adev->active_output = NULL; in start_output_stream()
275 adev->active_output = out; in start_output_stream()
324 struct alsa_audio_device *adev = out->dev; in do_output_standby() local
329 adev->active_output = NULL; in do_output_standby()
362 struct alsa_audio_device *adev = out->dev; in out_set_parameters() local
376 pthread_mutex_lock(&adev->lock); in out_set_parameters()
378 if (((adev->devices & AUDIO_DEVICE_OUT_ALL) != val) && (val != 0)) { in out_set_parameters()
379 adev->devices &= ~AUDIO_DEVICE_OUT_ALL; in out_set_parameters()
380 adev->devices |= val; in out_set_parameters()
383 pthread_mutex_unlock(&adev->lock); in out_set_parameters()
416 struct alsa_audio_device *adev = out->dev; in out_write() local
424 pthread_mutex_lock(&adev->lock); in out_write()
428 if (adev->hifi_dsp_fd >= 0) { in out_write()
429 xa_device_init(adev); in out_write()
434 pthread_mutex_unlock(&adev->lock); in out_write()
440 pthread_mutex_unlock(&adev->lock); in out_write()
444 if (adev->dsp_device.p_adev != NULL) { in out_write()
813 struct alsa_audio_device *adev = (struct alsa_audio_device *)device; in adev_close() local
817 if (adev->hifi_dsp_fd >= 0) in adev_close()
818 close(adev->hifi_dsp_fd); in adev_close()
827 struct alsa_audio_device *adev; in adev_open() local
834 adev = calloc(1, sizeof(struct alsa_audio_device)); in adev_open()
835 if (!adev) in adev_open()
838 adev->hw_device.common.tag = HARDWARE_DEVICE_TAG; in adev_open()
839 adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0; in adev_open()
840 adev->hw_device.common.module = (struct hw_module_t *) module; in adev_open()
841 adev->hw_device.common.close = adev_close; in adev_open()
842 adev->hw_device.init_check = adev_init_check; in adev_open()
843 adev->hw_device.set_voice_volume = adev_set_voice_volume; in adev_open()
844 adev->hw_device.set_master_volume = adev_set_master_volume; in adev_open()
845 adev->hw_device.get_master_volume = adev_get_master_volume; in adev_open()
846 adev->hw_device.set_master_mute = adev_set_master_mute; in adev_open()
847 adev->hw_device.get_master_mute = adev_get_master_mute; in adev_open()
848 adev->hw_device.set_mode = adev_set_mode; in adev_open()
849 adev->hw_device.set_mic_mute = adev_set_mic_mute; in adev_open()
850 adev->hw_device.get_mic_mute = adev_get_mic_mute; in adev_open()
851 adev->hw_device.set_parameters = adev_set_parameters; in adev_open()
852 adev->hw_device.get_parameters = adev_get_parameters; in adev_open()
853 adev->hw_device.get_input_buffer_size = adev_get_input_buffer_size; in adev_open()
854 adev->hw_device.open_output_stream = adev_open_output_stream; in adev_open()
855 adev->hw_device.close_output_stream = adev_close_output_stream; in adev_open()
856 adev->hw_device.open_input_stream = adev_open_input_stream; in adev_open()
857 adev->hw_device.close_input_stream = adev_close_input_stream; in adev_open()
858 adev->hw_device.dump = adev_dump; in adev_open()
860 adev->devices = AUDIO_DEVICE_NONE; in adev_open()
862 *device = &adev->hw_device.common; in adev_open()
864 adev->hifi_dsp_fd = open(HIFI_DSP_MISC_DRIVER, O_WRONLY, 0); in adev_open()
865 if (adev->hifi_dsp_fd < 0) { in adev_open()