Lines Matching refs:adev

181     struct alsa_audio_device *adev = out->dev;  in xa_device_run()  local
183 void *p_comp=adev->dsp_device.p_decoder; in xa_device_run()
185 memcpy(adev->dsp_device.dec_inbuf[0],buffer,bytes); in xa_device_run()
186 adev->dsp_device.read_length=bytes; in xa_device_run()
188 if (adev->dsp_device.xafinitdone == 0) { in xa_device_run()
189 …XF_CHK_API(xaf_comp_process(adev->dsp_device.p_adev, adev->dsp_device.p_decoder, adev->dsp_device.… in xa_device_run()
190 …XF_CHK_API(xaf_comp_get_status(adev->dsp_device.p_adev, adev->dsp_device.p_decoder, &adev->dsp_dev… in xa_device_run()
191 ALOGE("PROXY:%s xaf_comp_get_status %d\n",__func__,adev->dsp_device.dec_status); in xa_device_run()
192 if (adev->dsp_device.dec_status == XAF_INIT_DONE) { in xa_device_run()
193 adev->dsp_device.xafinitdone = 1; in xa_device_run()
198 …XF_CHK_API(xaf_comp_process(NULL, adev->dsp_device.p_decoder, adev->dsp_device.dec_inbuf[0], adev-… in xa_device_run()
200 … XF_CHK_API(xaf_comp_get_status(NULL, p_comp, &comp_status, &adev->dsp_device.comp_info)); in xa_device_run()
207 void *p_buf = (void *)adev->dsp_device.comp_info.buf; in xa_device_run()
208 int size = adev->dsp_device.comp_info.length; in xa_device_run()
213 …XF_CHK_API(xaf_comp_process(NULL, adev->dsp_device.p_decoder, (void *)adev->dsp_device.comp_info.b… in xa_device_run()
252 struct alsa_audio_device *adev = out->dev; in start_output_stream() local
269 adev->active_output = NULL; in start_output_stream()
274 adev->active_output = out; in start_output_stream()
323 struct alsa_audio_device *adev = out->dev; in do_output_standby() local
328 adev->active_output = NULL; in do_output_standby()
361 struct alsa_audio_device *adev = out->dev; in out_set_parameters() local
375 pthread_mutex_lock(&adev->lock); in out_set_parameters()
377 if (((adev->devices & AUDIO_DEVICE_OUT_ALL) != val) && (val != 0)) { in out_set_parameters()
378 adev->devices &= ~AUDIO_DEVICE_OUT_ALL; in out_set_parameters()
379 adev->devices |= val; in out_set_parameters()
382 pthread_mutex_unlock(&adev->lock); in out_set_parameters()
415 struct alsa_audio_device *adev = out->dev; in out_write() local
423 pthread_mutex_lock(&adev->lock); in out_write()
427 if (adev->hifi_dsp_fd >= 0) { in out_write()
428 xa_device_init(adev); in out_write()
433 pthread_mutex_unlock(&adev->lock); in out_write()
439 pthread_mutex_unlock(&adev->lock); in out_write()
443 if (adev->dsp_device.p_adev != NULL) { in out_write()
812 struct alsa_audio_device *adev = (struct alsa_audio_device *)device; in adev_close() local
816 if (adev->hifi_dsp_fd >= 0) in adev_close()
817 close(adev->hifi_dsp_fd); in adev_close()
826 struct alsa_audio_device *adev; in adev_open() local
833 adev = calloc(1, sizeof(struct alsa_audio_device)); in adev_open()
834 if (!adev) in adev_open()
837 adev->hw_device.common.tag = HARDWARE_DEVICE_TAG; in adev_open()
838 adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0; in adev_open()
839 adev->hw_device.common.module = (struct hw_module_t *) module; in adev_open()
840 adev->hw_device.common.close = adev_close; in adev_open()
841 adev->hw_device.init_check = adev_init_check; in adev_open()
842 adev->hw_device.set_voice_volume = adev_set_voice_volume; in adev_open()
843 adev->hw_device.set_master_volume = adev_set_master_volume; in adev_open()
844 adev->hw_device.get_master_volume = adev_get_master_volume; in adev_open()
845 adev->hw_device.set_master_mute = adev_set_master_mute; in adev_open()
846 adev->hw_device.get_master_mute = adev_get_master_mute; in adev_open()
847 adev->hw_device.set_mode = adev_set_mode; in adev_open()
848 adev->hw_device.set_mic_mute = adev_set_mic_mute; in adev_open()
849 adev->hw_device.get_mic_mute = adev_get_mic_mute; in adev_open()
850 adev->hw_device.set_parameters = adev_set_parameters; in adev_open()
851 adev->hw_device.get_parameters = adev_get_parameters; in adev_open()
852 adev->hw_device.get_input_buffer_size = adev_get_input_buffer_size; in adev_open()
853 adev->hw_device.open_output_stream = adev_open_output_stream; in adev_open()
854 adev->hw_device.close_output_stream = adev_close_output_stream; in adev_open()
855 adev->hw_device.open_input_stream = adev_open_input_stream; in adev_open()
856 adev->hw_device.close_input_stream = adev_close_input_stream; in adev_open()
857 adev->hw_device.dump = adev_dump; in adev_open()
859 adev->devices = AUDIO_DEVICE_NONE; in adev_open()
861 *device = &adev->hw_device.common; in adev_open()
863 adev->hifi_dsp_fd = open(HIFI_DSP_MISC_DRIVER, O_WRONLY, 0); in adev_open()
864 if (adev->hifi_dsp_fd < 0) { in adev_open()