sound/pci/pcxhr/pcxhr_core.h
Source file repositories/reference/linux-study-clean/sound/pci/pcxhr/pcxhr_core.h
File Facts
- System
- Linux kernel
- Corpus path
sound/pci/pcxhr/pcxhr_core.h- Extension
.h- Size
- 6453 bytes
- Lines
- 193
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct firmwarestruct pcxhr_mgrstruct pcxhr_rmh
Annotated Snippet
struct pcxhr_rmh {
u16 cmd_len; /* length of the command to send (WORDs) */
u16 stat_len; /* length of the status received (WORDs) */
u16 dsp_stat; /* status type, RMP_SSIZE_XXX */
u16 cmd_idx; /* index of the command */
u32 cmd[PCXHR_SIZE_MAX_CMD];
u32 stat[PCXHR_SIZE_MAX_STATUS];
};
enum {
CMD_VERSION, /* cmd_len = 2 stat_len = 1 */
CMD_SUPPORTED, /* cmd_len = 1 stat_len = 4 */
CMD_TEST_IT, /* cmd_len = 1 stat_len = 1 */
CMD_SEND_IRQA, /* cmd_len = 1 stat_len = 0 */
CMD_ACCESS_IO_WRITE, /* cmd_len >= 1 stat_len >= 1 */
CMD_ACCESS_IO_READ, /* cmd_len >= 1 stat_len >= 1 */
CMD_ASYNC, /* cmd_len = 1 stat_len = 1 */
CMD_MODIFY_CLOCK, /* cmd_len = 3 stat_len = 0 */
CMD_RESYNC_AUDIO_INPUTS, /* cmd_len = 1 stat_len = 0 */
CMD_GET_DSP_RESOURCES, /* cmd_len = 1 stat_len = 4 */
CMD_SET_TIMER_INTERRUPT, /* cmd_len = 1 stat_len = 0 */
CMD_RES_PIPE, /* cmd_len >=2 stat_len = 0 */
CMD_FREE_PIPE, /* cmd_len = 1 stat_len = 0 */
CMD_CONF_PIPE, /* cmd_len = 2 stat_len = 0 */
CMD_STOP_PIPE, /* cmd_len = 1 stat_len = 0 */
CMD_PIPE_SAMPLE_COUNT, /* cmd_len = 2 stat_len = 2 */
CMD_CAN_START_PIPE, /* cmd_len >= 1 stat_len = 1 */
CMD_START_STREAM, /* cmd_len = 2 stat_len = 0 */
CMD_STREAM_OUT_LEVEL_ADJUST, /* cmd_len >= 1 stat_len = 0 */
CMD_STOP_STREAM, /* cmd_len = 2 stat_len = 0 */
CMD_UPDATE_R_BUFFERS, /* cmd_len = 4 stat_len = 0 */
CMD_FORMAT_STREAM_OUT, /* cmd_len >= 2 stat_len = 0 */
CMD_FORMAT_STREAM_IN, /* cmd_len >= 4 stat_len = 0 */
CMD_STREAM_SAMPLE_COUNT, /* cmd_len = 2 stat_len = (2 * nb_stream) */
CMD_AUDIO_LEVEL_ADJUST, /* cmd_len = 3 stat_len = 0 */
CMD_GET_TIME_CODE, /* cmd_len = 1 stat_len = 5 */
CMD_MANAGE_SIGNAL, /* cmd_len = 1 stat_len = 0 */
CMD_LAST_INDEX
};
#define MASK_DSP_WORD 0x00ffffff
#define MASK_ALL_STREAM 0x00ffffff
#define MASK_DSP_WORD_LEVEL 0x000001ff
#define MASK_FIRST_FIELD 0x0000001f
#define FIELD_SIZE 5
/*
init the rmh struct; by default cmd_len is set to 1
*/
void pcxhr_init_rmh(struct pcxhr_rmh *rmh, int cmd);
void pcxhr_set_pipe_cmd_params(struct pcxhr_rmh* rmh, int capture, unsigned int param1,
unsigned int param2, unsigned int param3);
#define DSP_EXT_CMD_SET(x) (x->dsp_version > 0x012800)
/*
send the rmh
*/
int pcxhr_send_msg(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh);
/* values used for CMD_ACCESS_IO_WRITE and CMD_ACCESS_IO_READ */
#define IO_NUM_REG_CONT 0
#define IO_NUM_REG_GENCLK 1
#define IO_NUM_REG_MUTE_OUT 2
#define IO_NUM_SPEED_RATIO 4
#define IO_NUM_REG_STATUS 5
#define IO_NUM_REG_CUER 10
#define IO_NUM_UER_CHIP_REG 11
#define IO_NUM_REG_CONFIG_SRC 12
#define IO_NUM_REG_OUT_ANA_LEVEL 20
#define IO_NUM_REG_IN_ANA_LEVEL 21
#define REG_CONT_VALSMPTE 0x000800
#define REG_CONT_UNMUTE_INPUTS 0x020000
/* parameters used with register IO_NUM_REG_STATUS */
#define REG_STATUS_OPTIONS 0
#define REG_STATUS_AES_SYNC 8
#define REG_STATUS_AES_1 9
#define REG_STATUS_AES_2 10
#define REG_STATUS_AES_3 11
#define REG_STATUS_AES_4 12
#define REG_STATUS_WORD_CLOCK 13
#define REG_STATUS_INTER_SYNC 14
#define REG_STATUS_CURRENT 0x80
/* results */
#define REG_STATUS_OPT_NO_VIDEO_SIGNAL 0x01
#define REG_STATUS_OPT_DAUGHTER_MASK 0x1c
Annotation
- Detected declarations: `struct firmware`, `struct pcxhr_mgr`, `struct pcxhr_rmh`.
- Atlas domain: Driver Families / sound/pci.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.