sound/pci/asihpi/hpi_internal.h
Source file repositories/reference/linux-study-clean/sound/pci/asihpi/hpi_internal.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/asihpi/hpi_internal.h- Extension
.h- Size
- 42184 bytes
- Lines
- 1420
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hpi.hhpios.h
Detected Declarations
struct hpi_messagestruct hpi_responsestruct hpi_pcistruct hpi_adapter_specificationstruct hpi_resourcestruct hpi_msg_formatstruct hpi_msg_datastruct hpi_data_legacy32struct hpi_data_compat32struct hpi_bufferstruct hpi_hostbuffer_statusstruct hpi_streamidstruct hpi_punchinoutstruct hpi_subsys_msgstruct hpi_subsys_resstruct hpi_adapter_resstruct hpi_stream_msgstruct hpi_stream_resstruct hpi_mixer_msgstruct hpi_mixer_resstruct hpi_control_msgstruct hpi_control_union_msgstruct hpi_control_resstruct hpi_nvmemory_msgstruct hpi_nvmemory_resstruct hpi_gpio_msgstruct hpi_gpio_resstruct hpi_async_msgstruct hpi_async_resstruct hpi_watchdog_msgstruct hpi_watchdog_resstruct hpi_clock_msgstruct hpi_clock_resstruct hpi_profile_msgstruct hpi_profile_res_openstruct hpi_profile_res_timestruct hpi_profile_res_namestruct hpi_profile_resstruct hpi_message_headerstruct hpi_messagestruct hpi_response_headerstruct hpi_responsestruct hpi_msg_adapter_get_infostruct hpi_res_adapter_get_infostruct hpi_res_adapter_debug_readstruct hpi_msg_cobranet_hmistruct hpi_msg_cobranet_hmiwritestruct hpi_msg_cobranet_hmiread
Annotated Snippet
struct hpi_pci {
u32 __iomem *ap_mem_base[HPI_MAX_ADAPTER_MEM_SPACES];
struct pci_dev *pci_dev;
};
/** Adapter specification resource */
struct hpi_adapter_specification {
u32 type;
u8 modules[4];
};
struct hpi_resource {
union {
const struct hpi_pci *pci;
const char *net_if;
struct hpi_adapter_specification adapter_spec;
const void *sw_if;
} r;
u16 bus_type; /* HPI_BUS_PNPISA, _PCI, _USB etc */
u16 padding;
};
/** Format info used inside struct hpi_message
Not the same as public API struct hpi_format */
struct hpi_msg_format {
u32 sample_rate; /**< 11025, 32000, 44100 etc. */
u32 bit_rate; /**< for MPEG */
u32 attributes; /**< stereo/joint_stereo/mono */
u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see \ref HPI_FORMATS. */
};
/** Buffer+format structure.
Must be kept 7 * 32 bits to match public struct hpi_datastruct */
struct hpi_msg_data {
struct hpi_msg_format format;
u8 *pb_data;
#ifndef CONFIG_64BIT
u32 padding;
#endif
u32 data_size;
};
/** struct hpi_datastructure used up to 3.04 driver */
struct hpi_data_legacy32 {
struct hpi_format format;
u32 pb_data;
u32 data_size;
};
#ifdef CONFIG_64BIT
/* Compatibility version of struct hpi_data*/
struct hpi_data_compat32 {
struct hpi_msg_format format;
u32 pb_data;
u32 padding;
u32 data_size;
};
#endif
struct hpi_buffer {
/** placeholder for backward compatibility (see dwBufferSize) */
struct hpi_msg_format reserved;
u32 command; /**< HPI_BUFFER_CMD_xxx*/
u32 pci_address; /**< PCI physical address of buffer for DSP DMA */
u32 buffer_size; /**< must line up with data_size of HPI_DATA*/
};
/*/////////////////////////////////////////////////////////////////////////// */
/* This is used for background buffer bus mastering stream buffers. */
struct hpi_hostbuffer_status {
u32 samples_processed;
u32 auxiliary_data_available;
u32 stream_state;
/* DSP index in to the host bus master buffer. */
u32 dsp_index;
/* Host index in to the host bus master buffer. */
u32 host_index;
u32 size_in_bytes;
};
struct hpi_streamid {
u16 object_type;
/**< Type of object, HPI_OBJ_OSTREAM or HPI_OBJ_ISTREAM. */
u16 stream_index; /**< outstream or instream index. */
};
struct hpi_punchinout {
u32 punch_in_sample;
u32 punch_out_sample;
Annotation
- Immediate include surface: `hpi.h`, `hpios.h`.
- Detected declarations: `struct hpi_message`, `struct hpi_response`, `struct hpi_pci`, `struct hpi_adapter_specification`, `struct hpi_resource`, `struct hpi_msg_format`, `struct hpi_msg_data`, `struct hpi_data_legacy32`, `struct hpi_data_compat32`, `struct hpi_buffer`.
- 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.