sound/soc/intel/atom/sst-mfld-platform-pcm.c
Source file repositories/reference/linux-study-clean/sound/soc/intel/atom/sst-mfld-platform-pcm.c
File Facts
- System
- Linux kernel
- Corpus path
sound/soc/intel/atom/sst-mfld-platform-pcm.c- Extension
.c- Size
- 21257 bytes
- Lines
- 826
- 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
linux/slab.hlinux/io.hlinux/module.hsound/core.hsound/pcm.hsound/pcm_params.hsound/soc.hsound/compress_driver.hasm/platform_sst_audio.hsst-mfld-platform.hsst-atom-controls.h
Detected Declarations
function sst_register_dspfunction sst_unregister_dspfunction sst_media_digital_mutefunction sst_set_stream_statusfunction sst_get_stream_statusfunction sst_fill_alloc_paramsfunction sst_fill_pcm_paramsfunction sst_get_stream_mappingfunction sst_fill_stream_paramsfunction sst_platform_alloc_streamfunction sst_period_elapsedfunction sst_platform_init_streamfunction power_up_sstfunction power_down_sstfunction sst_media_openfunction sst_media_closefunction sst_media_preparefunction sst_enable_sspfunction sst_be_hw_paramsfunction sst_set_formatfunction sst_platform_set_ssp_slotfunction sst_disable_sspfunction sst_soc_openfunction sst_soc_triggerfunction sst_soc_pointerfunction sst_soc_delayfunction sst_soc_pcm_newfunction sst_soc_probefunction sst_soc_removefunction sst_platform_probefunction sst_platform_removefunction sst_soc_preparefunction sst_soc_completeexport sst_register_dspexport sst_unregister_dsp
Annotated Snippet
if (snd_soc_dai_active(dai)) {
send_ssp_cmd(dai, dai->name, 0);
sst_handle_vb_timer(dai, false);
}
}
return 0;
}
static void sst_soc_complete(struct device *dev)
{
struct sst_data *drv = dev_get_drvdata(dev);
struct snd_soc_pcm_runtime *rtd;
if (!drv->soc_card)
return;
/* restart SSPs */
for_each_card_rtds(drv->soc_card, rtd) {
struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0);
if (snd_soc_dai_active(dai)) {
sst_handle_vb_timer(dai, true);
send_ssp_cmd(dai, dai->name, 1);
}
}
snd_soc_resume(drv->soc_card->dev);
}
#else
#define sst_soc_prepare NULL
#define sst_soc_complete NULL
#endif
static const struct dev_pm_ops sst_platform_pm = {
.prepare = sst_soc_prepare,
.complete = sst_soc_complete,
};
static struct platform_driver sst_platform_driver = {
.driver = {
.name = "sst-mfld-platform",
.pm = &sst_platform_pm,
},
.probe = sst_platform_probe,
.remove = sst_platform_remove,
};
module_platform_driver(sst_platform_driver);
MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver");
MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
MODULE_AUTHOR("Harsha Priya <priya.harsha@intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:sst-atom-hifi2-platform");
MODULE_ALIAS("platform:sst-mfld-platform");
Annotation
- Immediate include surface: `linux/slab.h`, `linux/io.h`, `linux/module.h`, `sound/core.h`, `sound/pcm.h`, `sound/pcm_params.h`, `sound/soc.h`, `sound/compress_driver.h`.
- Detected declarations: `function sst_register_dsp`, `function sst_unregister_dsp`, `function sst_media_digital_mute`, `function sst_set_stream_status`, `function sst_get_stream_status`, `function sst_fill_alloc_params`, `function sst_fill_pcm_params`, `function sst_get_stream_mapping`, `function sst_fill_stream_params`, `function sst_platform_alloc_stream`.
- 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.