include/sound/soc_sdw_utils.h
Source file repositories/reference/linux-study-clean/include/sound/soc_sdw_utils.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/soc_sdw_utils.h- Extension
.h- Size
- 11412 bytes
- Lines
- 297
- Domain
- Driver Families
- Bucket
- include/sound
- 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
sound/soc.hsound/soc-acpi.h
Detected Declarations
struct asoc_sdw_codec_infostruct asoc_sdw_dai_infostruct asoc_sdw_aux_infostruct asoc_sdw_codec_infostruct asoc_sdw_mc_privatestruct asoc_sdw_endpointstruct asoc_sdw_dailink
Annotated Snippet
struct asoc_sdw_dai_info {
const bool direction[2]; /* playback & capture support */
const char *codec_name;
const char *dai_name;
const char *component_name;
const int dai_type;
const int dailink[2]; /* dailink id for each direction */
const struct snd_kcontrol_new *controls;
const int num_controls;
const struct snd_soc_dapm_widget *widgets;
const int num_widgets;
int (*init)(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_links,
struct asoc_sdw_codec_info *info,
bool playback);
int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
bool rtd_init_done; /* Indicate that the rtd_init callback is done */
unsigned long quirk;
bool quirk_exclude;
};
struct asoc_sdw_aux_info {
const char *codec_name;
};
struct asoc_sdw_codec_info {
const int vendor_id;
const int part_id;
const int version_id;
const char *name_prefix;
int amp_num;
const u8 acpi_id[ACPI_ID_LEN];
const bool ignore_internal_dmic;
const struct snd_soc_ops *ops;
struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM];
const int dai_num;
struct asoc_sdw_aux_info auxs[SOC_SDW_MAX_AUX_NUM];
const int aux_num;
/* Force AMP-style name_prefix handling (append AMP index) even if MIC/Jack DAIs exist */
const bool is_amp;
int (*codec_card_late_probe)(struct snd_soc_card *card);
int (*count_sidecar)(struct snd_soc_card *card,
int *num_dais, int *num_devs);
int (*add_sidecar)(struct snd_soc_card *card,
struct snd_soc_dai_link **dai_links,
struct snd_soc_codec_conf **codec_conf);
};
struct asoc_sdw_mc_private {
struct snd_soc_card card;
struct snd_soc_jack sdw_headset;
struct device *headset_codec_dev; /* only one headset per card */
struct device *amp_dev1, *amp_dev2;
bool append_dai_type;
bool ignore_internal_dmic;
void *private;
unsigned long mc_quirk;
int codec_info_list_count;
};
struct asoc_sdw_endpoint {
struct list_head list;
u32 link_mask;
const char *codec_name;
const char *name_prefix;
bool include_sidecar;
struct asoc_sdw_codec_info *codec_info;
const struct asoc_sdw_dai_info *dai_info;
};
struct asoc_sdw_dailink {
bool initialised;
u8 group_id;
u32 link_mask[SNDRV_PCM_STREAM_LAST + 1];
int num_devs[SNDRV_PCM_STREAM_LAST + 1];
struct list_head endpoints;
};
extern struct asoc_sdw_codec_info codec_info_list[];
int asoc_sdw_get_codec_info_list_count(void);
int asoc_sdw_startup(struct snd_pcm_substream *substream);
int asoc_sdw_prepare(struct snd_pcm_substream *substream);
int asoc_sdw_prepare(struct snd_pcm_substream *substream);
Annotation
- Immediate include surface: `sound/soc.h`, `sound/soc-acpi.h`.
- Detected declarations: `struct asoc_sdw_codec_info`, `struct asoc_sdw_dai_info`, `struct asoc_sdw_aux_info`, `struct asoc_sdw_codec_info`, `struct asoc_sdw_mc_private`, `struct asoc_sdw_endpoint`, `struct asoc_sdw_dailink`.
- Atlas domain: Driver Families / include/sound.
- 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.