sound/soc/fsl/imx-pcm-rpmsg.h
Source file repositories/reference/linux-study-clean/sound/soc/fsl/imx-pcm-rpmsg.h
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/fsl/imx-pcm-rpmsg.h- Extension
.h- Size
- 29019 bytes
- Lines
- 513
- Domain
- Driver Families
- Bucket
- sound/soc
- 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
linux/pm_qos.hlinux/interrupt.hsound/dmaengine_pcm.h
Detected Declarations
struct rpmsg_headstruct param_sstruct param_rstruct rpmsg_s_msgstruct rpmsg_r_msgstruct rpmsg_msgstruct work_of_rpmsgstruct stream_timerstruct rpmsg_info
Annotated Snippet
struct rpmsg_head {
u8 cate;
u8 major;
u8 minor;
u8 type;
u8 cmd;
u8 reserved[5];
} __packed;
/**
* struct param_s: sent rpmsg parameter
*
* @audioindex: audio instance index
* @format: audio format
* @channels: audio channel number
* @rate: sample rate
* @buffer_addr: dma buffer physical address or register for SET_CODEC_VALUE
* @buffer_size: dma buffer size or register value for SET_CODEC_VALUE
* @period_size: period size
* @buffer_tail: current period index
*/
struct param_s {
unsigned char audioindex;
unsigned char format;
unsigned char channels;
unsigned int rate;
unsigned int buffer_addr;
unsigned int buffer_size;
unsigned int period_size;
unsigned int buffer_tail;
} __packed;
/**
* struct param_s: send rpmsg parameter
*
* @audioindex: audio instance index
* @resp: response value
* @reserved1: reserved space
* @buffer_offset: the consumed offset of buffer
* @reg_addr: register addr of codec
* @reg_data: register value of codec
* @reserved2: reserved space
* @buffer_tail: current period index
*/
struct param_r {
unsigned char audioindex;
unsigned char resp;
unsigned char reserved1[1];
unsigned int buffer_offset;
unsigned int reg_addr;
unsigned int reg_data;
unsigned char reserved2[4];
unsigned int buffer_tail;
} __packed;
/* Struct of sent message */
struct rpmsg_s_msg {
struct rpmsg_head header;
struct param_s param;
};
/* Struct of received message */
struct rpmsg_r_msg {
struct rpmsg_head header;
struct param_r param;
};
/* Struct of rpmsg */
struct rpmsg_msg {
struct rpmsg_s_msg s_msg;
struct rpmsg_r_msg r_msg;
};
/* Struct of rpmsg for workqueue */
struct work_of_rpmsg {
struct rpmsg_info *info;
/* Sent msg for each work */
struct rpmsg_msg msg;
struct work_struct work;
};
/* Struct of timer */
struct stream_timer {
struct timer_list timer;
struct rpmsg_info *info;
struct snd_pcm_substream *substream;
};
typedef void (*dma_callback)(void *arg);
Annotation
- Immediate include surface: `linux/pm_qos.h`, `linux/interrupt.h`, `sound/dmaengine_pcm.h`.
- Detected declarations: `struct rpmsg_head`, `struct param_s`, `struct param_r`, `struct rpmsg_s_msg`, `struct rpmsg_r_msg`, `struct rpmsg_msg`, `struct work_of_rpmsg`, `struct stream_timer`, `struct rpmsg_info`.
- Atlas domain: Driver Families / sound/soc.
- 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.