hpi6205.c (ee246fc041c4ace7a8cc3d995716cbc8f8f6cd5c) | hpi6205.c (ba3a909962650d81e9c3731d87b8653652869685) |
---|---|
1/****************************************************************************** 2 3 AudioScience HPI driver 4 Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of version 2 of the GNU General Public License as 8 published by the Free Software Foundation; --- 113 unchanged lines hidden (view full) --- 122 /* a non-NULL handle means there is an HPI allocated buffer */ 123 struct consistent_dma_area instream_host_buffers[HPI_MAX_STREAMS]; 124 struct consistent_dma_area outstream_host_buffers[HPI_MAX_STREAMS]; 125 /* non-zero size means a buffer exists, may be external */ 126 u32 instream_host_buffer_size[HPI_MAX_STREAMS]; 127 u32 outstream_host_buffer_size[HPI_MAX_STREAMS]; 128 129 struct consistent_dma_area h_control_cache; | 1/****************************************************************************** 2 3 AudioScience HPI driver 4 Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of version 2 of the GNU General Public License as 8 published by the Free Software Foundation; --- 113 unchanged lines hidden (view full) --- 122 /* a non-NULL handle means there is an HPI allocated buffer */ 123 struct consistent_dma_area instream_host_buffers[HPI_MAX_STREAMS]; 124 struct consistent_dma_area outstream_host_buffers[HPI_MAX_STREAMS]; 125 /* non-zero size means a buffer exists, may be external */ 126 u32 instream_host_buffer_size[HPI_MAX_STREAMS]; 127 u32 outstream_host_buffer_size[HPI_MAX_STREAMS]; 128 129 struct consistent_dma_area h_control_cache; |
130 struct consistent_dma_area h_async_event_buffer; 131/* struct hpi_control_cache_single *pControlCache; */ 132 struct hpi_async_event *p_async_event_buffer; | |
133 struct hpi_control_cache *p_cache; 134}; 135 136/*****************************************************************************/ 137/* local prototypes */ 138 139#define check_before_bbm_copy(status, p_bbm_data, l_first_write, l_second_write) 140 --- 479 unchanged lines hidden (view full) --- 620 if (!err) 621 pao->has_control_cache = 1; 622 else { 623 if (hpios_locked_mem_valid(&phw->h_control_cache)) 624 hpios_locked_mem_free(&phw->h_control_cache); 625 pao->has_control_cache = 0; 626 } 627 } | 130 struct hpi_control_cache *p_cache; 131}; 132 133/*****************************************************************************/ 134/* local prototypes */ 135 136#define check_before_bbm_copy(status, p_bbm_data, l_first_write, l_second_write) 137 --- 479 unchanged lines hidden (view full) --- 617 if (!err) 618 pao->has_control_cache = 1; 619 else { 620 if (hpios_locked_mem_valid(&phw->h_control_cache)) 621 hpios_locked_mem_free(&phw->h_control_cache); 622 pao->has_control_cache = 0; 623 } 624 } |
628 /* allocate bus mastering async buffer and tell the DSP about it */ 629 if (interface->async_buffer.b.size) { 630 err = hpios_locked_mem_alloc(&phw->h_async_event_buffer, 631 interface->async_buffer.b.size * 632 sizeof(struct hpi_async_event), pao->pci.pci_dev); 633 if (!err) 634 err = hpios_locked_mem_get_virt_addr 635 (&phw->h_async_event_buffer, (void *) 636 &phw->p_async_event_buffer); 637 if (!err) 638 memset((void *)phw->p_async_event_buffer, 0, 639 interface->async_buffer.b.size * 640 sizeof(struct hpi_async_event)); 641 if (!err) { 642 err = hpios_locked_mem_get_phys_addr 643 (&phw->h_async_event_buffer, &phys_addr); 644 interface->async_buffer.physical_address32 = 645 phys_addr; 646 } 647 if (err) { 648 if (hpios_locked_mem_valid(&phw-> 649 h_async_event_buffer)) { 650 hpios_locked_mem_free 651 (&phw->h_async_event_buffer); 652 phw->p_async_event_buffer = NULL; 653 } 654 } 655 } | |
656 send_dsp_command(phw, H620_HIF_IDLE); 657 658 { 659 struct hpi_message hm; 660 struct hpi_response hr; 661 u32 max_streams; 662 663 HPI_DEBUG_LOG(VERBOSE, "init ADAPTER_GET_INFO\n"); --- 47 unchanged lines hidden (view full) --- 711*/ 712static void delete_adapter_obj(struct hpi_adapter_obj *pao) 713{ 714 struct hpi_hw_obj *phw; 715 int i; 716 717 phw = pao->priv; 718 | 625 send_dsp_command(phw, H620_HIF_IDLE); 626 627 { 628 struct hpi_message hm; 629 struct hpi_response hr; 630 u32 max_streams; 631 632 HPI_DEBUG_LOG(VERBOSE, "init ADAPTER_GET_INFO\n"); --- 47 unchanged lines hidden (view full) --- 680*/ 681static void delete_adapter_obj(struct hpi_adapter_obj *pao) 682{ 683 struct hpi_hw_obj *phw; 684 int i; 685 686 phw = pao->priv; 687 |
719 if (hpios_locked_mem_valid(&phw->h_async_event_buffer)) { 720 hpios_locked_mem_free(&phw->h_async_event_buffer); 721 phw->p_async_event_buffer = NULL; 722 } 723 | |
724 if (hpios_locked_mem_valid(&phw->h_control_cache)) { 725 hpios_locked_mem_free(&phw->h_control_cache); 726 hpi_free_control_cache(phw->p_cache); 727 } 728 729 if (hpios_locked_mem_valid(&phw->h_locked_mem)) { 730 hpios_locked_mem_free(&phw->h_locked_mem); 731 phw->p_interface_buffer = NULL; --- 389 unchanged lines hidden (view full) --- 1121 status->samples_processed = 0; 1122 status->stream_state = HPI_STATE_STOPPED; 1123 status->dSP_index = 0; 1124 status->host_index = status->dSP_index; 1125 status->size_in_bytes = phm->u.d.u.buffer.buffer_size; 1126 status->auxiliary_data_available = 0; 1127 1128 hw_message(pao, phm, phr); | 688 if (hpios_locked_mem_valid(&phw->h_control_cache)) { 689 hpios_locked_mem_free(&phw->h_control_cache); 690 hpi_free_control_cache(phw->p_cache); 691 } 692 693 if (hpios_locked_mem_valid(&phw->h_locked_mem)) { 694 hpios_locked_mem_free(&phw->h_locked_mem); 695 phw->p_interface_buffer = NULL; --- 389 unchanged lines hidden (view full) --- 1085 status->samples_processed = 0; 1086 status->stream_state = HPI_STATE_STOPPED; 1087 status->dSP_index = 0; 1088 status->host_index = status->dSP_index; 1089 status->size_in_bytes = phm->u.d.u.buffer.buffer_size; 1090 status->auxiliary_data_available = 0; 1091 1092 hw_message(pao, phm, phr); |
1093 |
|
1129 if (phr->error 1130 && hpios_locked_mem_valid(&phw-> 1131 instream_host_buffers[phm->obj_index])) { 1132 hpios_locked_mem_free(&phw->instream_host_buffers 1133 [phm->obj_index]); 1134 phw->instream_host_buffer_size[phm->obj_index] = 0; 1135 } 1136 } --- 1127 unchanged lines hidden --- | 1094 if (phr->error 1095 && hpios_locked_mem_valid(&phw-> 1096 instream_host_buffers[phm->obj_index])) { 1097 hpios_locked_mem_free(&phw->instream_host_buffers 1098 [phm->obj_index]); 1099 phw->instream_host_buffer_size[phm->obj_index] = 0; 1100 } 1101 } --- 1127 unchanged lines hidden --- |