sound/soc/qcom/qdsp6/q6asm.c
Source file repositories/reference/linux-study-clean/sound/soc/qcom/qdsp6/q6asm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/qcom/qdsp6/q6asm.c- Extension
.c- Size
- 43076 bytes
- Lines
- 1688
- Domain
- Driver Families
- Bucket
- sound/soc
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
dt-bindings/sound/qcom,q6asm.hlinux/mutex.hlinux/wait.hlinux/module.hlinux/atomic.hlinux/soc/qcom/apr.hlinux/device.hlinux/of_platform.hlinux/spinlock.hlinux/kref.hlinux/of.huapi/sound/asound.huapi/sound/compress_params.hlinux/delay.hlinux/slab.hlinux/mm.hq6asm.hq6core.hq6dsp-errno.hq6dsp-common.h
Detected Declarations
struct avs_cmd_shared_mem_map_regionsstruct avs_shared_map_region_payloadstruct avs_cmd_shared_mem_unmap_regionsstruct asm_data_cmd_media_fmt_update_v2struct asm_multi_channel_pcm_fmt_blk_v2struct asm_flac_fmt_blk_v2struct asm_wmastdv9_fmt_blk_v2struct asm_wmaprov10_fmt_blk_v2struct asm_alac_fmt_blk_v2struct asm_ape_fmt_blk_v2struct asm_stream_cmd_set_encdec_paramstruct asm_enc_cfg_blk_param_v2struct asm_multi_channel_pcm_enc_cfg_v2struct asm_data_cmd_read_v2struct asm_data_cmd_read_v2_donestruct asm_stream_cmd_open_read_v3struct asm_data_cmd_write_v2struct asm_stream_cmd_open_write_v3struct asm_session_cmd_run_v2struct audio_bufferstruct audio_port_datastruct q6asmstruct audio_clientfunction q6asm_add_hdrfunction q6asm_apr_send_session_pktfunction __q6asm_memory_unmapfunction q6asm_audio_client_free_buffunction q6asm_unmap_memory_regionsfunction __q6asm_memory_map_regionsfunction q6asm_map_memory_regionsfunction q6asm_audio_client_releasefunction q6asm_audio_client_freefunction q6asm_get_hw_pointerfunction q6asm_stream_callbackfunction q6asm_srvc_callbackfunction q6asm_get_session_idfunction q6asm_audio_client_allocfunction q6asm_ac_send_cmd_syncfunction q6asm_open_writefunction __q6asm_runfunction q6asm_runfunction q6asm_run_nowaitfunction q6asm_media_format_block_multi_ch_pcmfunction q6asm_stream_media_format_block_flacfunction q6asm_stream_media_format_block_wma_v9function q6asm_stream_media_format_block_wma_v10function q6asm_stream_media_format_block_alacfunction q6asm_stream_media_format_block_ape
Annotated Snippet
struct avs_cmd_shared_mem_map_regions {
u16 mem_pool_id;
u16 num_regions;
u32 property_flag;
} __packed;
struct avs_shared_map_region_payload {
u32 shm_addr_lsw;
u32 shm_addr_msw;
u32 mem_size_bytes;
} __packed;
struct avs_cmd_shared_mem_unmap_regions {
u32 mem_map_handle;
} __packed;
struct asm_data_cmd_media_fmt_update_v2 {
u32 fmt_blk_size;
} __packed;
struct asm_multi_channel_pcm_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u16 num_channels;
u16 bits_per_sample;
u32 sample_rate;
u16 is_signed;
u16 reserved;
u8 channel_mapping[PCM_MAX_NUM_CHANNEL];
} __packed;
struct asm_flac_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u16 is_stream_info_present;
u16 num_channels;
u16 min_blk_size;
u16 max_blk_size;
u16 md5_sum[8];
u32 sample_rate;
u32 min_frame_size;
u32 max_frame_size;
u16 sample_size;
u16 reserved;
} __packed;
struct asm_wmastdv9_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u16 fmtag;
u16 num_channels;
u32 sample_rate;
u32 bytes_per_sec;
u16 blk_align;
u16 bits_per_sample;
u32 channel_mask;
u16 enc_options;
u16 reserved;
} __packed;
struct asm_wmaprov10_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u16 fmtag;
u16 num_channels;
u32 sample_rate;
u32 bytes_per_sec;
u16 blk_align;
u16 bits_per_sample;
u32 channel_mask;
u16 enc_options;
u16 advanced_enc_options1;
u32 advanced_enc_options2;
} __packed;
struct asm_alac_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u32 frame_length;
u8 compatible_version;
u8 bit_depth;
u8 pb;
u8 mb;
u8 kb;
u8 num_channels;
u16 max_run;
u32 max_frame_bytes;
u32 avg_bit_rate;
u32 sample_rate;
u32 channel_layout_tag;
} __packed;
struct asm_ape_fmt_blk_v2 {
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
u16 compatible_version;
Annotation
- Immediate include surface: `dt-bindings/sound/qcom,q6asm.h`, `linux/mutex.h`, `linux/wait.h`, `linux/module.h`, `linux/atomic.h`, `linux/soc/qcom/apr.h`, `linux/device.h`, `linux/of_platform.h`.
- Detected declarations: `struct avs_cmd_shared_mem_map_regions`, `struct avs_shared_map_region_payload`, `struct avs_cmd_shared_mem_unmap_regions`, `struct asm_data_cmd_media_fmt_update_v2`, `struct asm_multi_channel_pcm_fmt_blk_v2`, `struct asm_flac_fmt_blk_v2`, `struct asm_wmastdv9_fmt_blk_v2`, `struct asm_wmaprov10_fmt_blk_v2`, `struct asm_alac_fmt_blk_v2`, `struct asm_ape_fmt_blk_v2`.
- Atlas domain: Driver Families / sound/soc.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.