sound/pci/asihpi/hpi6205.c
Source file repositories/reference/linux-study-clean/sound/pci/asihpi/hpi6205.c
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/asihpi/hpi6205.c- Extension
.c- Size
- 65460 bytes
- Lines
- 2220
- Domain
- Driver Families
- Bucket
- sound/pci
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hpi_internal.hhpimsginit.hhpidebug.hhpi6205.hhpidspcd.hhpicmn.h
Detected Declarations
struct hpi_hw_objfunction subsys_messagefunction control_messagefunction adapter_messagefunction outstream_messagefunction instream_messagefunction _HPI_6205function HPI_6205function subsys_create_adapterfunction adapter_deletefunction create_adapter_objfunction delete_adapter_objfunction adapter_irq_query_and_clearfunction outstream_host_buffer_allocatefunction outstream_host_buffer_get_infofunction outstream_host_buffer_freefunction outstream_get_space_availablefunction outstream_writefunction outstream_get_infofunction outstream_startfunction outstream_resetfunction outstream_openfunction instream_host_buffer_allocatefunction instream_host_buffer_get_infofunction instream_host_buffer_freefunction instream_startfunction instream_get_bytes_availablefunction instream_readfunction instream_get_infofunction adapter_boot_load_dspfunction boot_loader_read_mem32function boot_loader_write_mem32function boot_loader_config_emiffunction boot_loader_test_memoryfunction boot_loader_test_internal_memoryfunction boot_loader_test_external_memoryfunction boot_loader_test_pldfunction hpi6205_transfer_datafunction wait_dsp_ackfunction send_dsp_commandfunction message_response_sequencefunction hw_message
Annotated Snippet
struct hpi_hw_obj {
/* PCI registers */
__iomem u32 *prHSR;
__iomem u32 *prHDCR;
__iomem u32 *prDSPP;
u32 dsp_page;
struct consistent_dma_area h_locked_mem;
struct bus_master_interface *p_interface_buffer;
u16 flag_outstream_just_reset[HPI_MAX_STREAMS];
/* a non-NULL handle means there is an HPI allocated buffer */
struct consistent_dma_area instream_host_buffers[HPI_MAX_STREAMS];
struct consistent_dma_area outstream_host_buffers[HPI_MAX_STREAMS];
/* non-zero size means a buffer exists, may be external */
u32 instream_host_buffer_size[HPI_MAX_STREAMS];
u32 outstream_host_buffer_size[HPI_MAX_STREAMS];
struct consistent_dma_area h_control_cache;
struct hpi_control_cache *p_cache;
};
/*****************************************************************************/
/* local prototypes */
#define check_before_bbm_copy(status, p_bbm_data, l_first_write, l_second_write)
static int wait_dsp_ack(struct hpi_hw_obj *phw, int state, int timeout_us);
static void send_dsp_command(struct hpi_hw_obj *phw, int cmd);
static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
u32 *pos_error_code);
static u16 message_response_sequence(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
struct hpi_response *phr);
#define HPI6205_TIMEOUT 1000000
static void subsys_create_adapter(struct hpi_message *phm,
struct hpi_response *phr);
static void adapter_delete(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
u32 *pos_error_code);
static void delete_adapter_obj(struct hpi_adapter_obj *pao);
static int adapter_irq_query_and_clear(struct hpi_adapter_obj *pao,
u32 message);
static void outstream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_write(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_start(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_open(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void outstream_reset(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_allocate(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_get_info(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_host_buffer_free(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
static void instream_read(struct hpi_adapter_obj *pao,
struct hpi_message *phm, struct hpi_response *phr);
Annotation
- Immediate include surface: `hpi_internal.h`, `hpimsginit.h`, `hpidebug.h`, `hpi6205.h`, `hpidspcd.h`, `hpicmn.h`.
- Detected declarations: `struct hpi_hw_obj`, `function subsys_message`, `function control_message`, `function adapter_message`, `function outstream_message`, `function instream_message`, `function _HPI_6205`, `function HPI_6205`, `function subsys_create_adapter`, `function adapter_delete`.
- Atlas domain: Driver Families / sound/pci.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.