sound/i2c/other/ak4117.c
Source file repositories/reference/linux-study-clean/sound/i2c/other/ak4117.c
File Facts
- System
- Linux kernel
- Corpus path
sound/i2c/other/ak4117.c- Extension
.c- Size
- 15559 bytes
- Lines
- 519
- Domain
- Driver Families
- Bucket
- sound/i2c
- 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/delay.hlinux/module.hsound/core.hsound/control.hsound/pcm.hsound/ak4117.hsound/asoundef.h
Detected Declarations
function reg_writefunction reg_readfunction snd_ak4117_freefunction snd_ak4117_dev_freefunction snd_ak4117_createfunction snd_ak4117_reg_writefunction snd_ak4117_reinitfunction external_ratefunction snd_ak4117_in_error_infofunction snd_ak4117_in_error_getfunction snd_ak4117_in_bit_getfunction snd_ak4117_rx_infofunction snd_ak4117_rx_getfunction snd_ak4117_rx_putfunction snd_ak4117_rate_infofunction snd_ak4117_rate_getfunction snd_ak4117_spdif_infofunction snd_ak4117_spdif_getfunction snd_ak4117_spdif_mask_infofunction snd_ak4117_spdif_mask_getfunction snd_ak4117_spdif_pinfofunction snd_ak4117_spdif_pgetfunction snd_ak4117_spdif_qinfofunction snd_ak4117_spdif_qgetfunction snd_ak4117_buildfunction snd_ak4117_external_ratefunction snd_ak4117_check_rate_and_errorsfunction snd_ak4117_timerexport snd_ak4117_createexport snd_ak4117_reg_writeexport snd_ak4117_reinitexport snd_ak4117_buildexport snd_ak4117_external_rateexport snd_ak4117_check_rate_and_errors
Annotated Snippet
if (snd_pcm_running(ak4117->substream)) {
snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
wake_up(&runtime->sleep);
res = 1;
}
snd_pcm_stream_unlock_irqrestore(ak4117->substream, _flags);
}
return res;
}
static void snd_ak4117_timer(struct timer_list *t)
{
struct ak4117 *chip = timer_container_of(chip, t, timer);
if (chip->init)
return;
snd_ak4117_check_rate_and_errors(chip, 0);
mod_timer(&chip->timer, 1 + jiffies);
}
EXPORT_SYMBOL(snd_ak4117_create);
EXPORT_SYMBOL(snd_ak4117_reg_write);
EXPORT_SYMBOL(snd_ak4117_reinit);
EXPORT_SYMBOL(snd_ak4117_build);
EXPORT_SYMBOL(snd_ak4117_external_rate);
EXPORT_SYMBOL(snd_ak4117_check_rate_and_errors);
Annotation
- Immediate include surface: `linux/slab.h`, `linux/delay.h`, `linux/module.h`, `sound/core.h`, `sound/control.h`, `sound/pcm.h`, `sound/ak4117.h`, `sound/asoundef.h`.
- Detected declarations: `function reg_write`, `function reg_read`, `function snd_ak4117_free`, `function snd_ak4117_dev_free`, `function snd_ak4117_create`, `function snd_ak4117_reg_write`, `function snd_ak4117_reinit`, `function external_rate`, `function snd_ak4117_in_error_info`, `function snd_ak4117_in_error_get`.
- Atlas domain: Driver Families / sound/i2c.
- 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.