drivers/gpu/drm/i915/display/intel_audio.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_audio.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_audio.c- Extension
.c- Size
- 45120 bytes
- Lines
- 1417
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/component.hlinux/kernel.hdrm/drm_edid.hdrm/drm_eld.hdrm/drm_fixed.hdrm/drm_print.hdrm/intel/i915_component.hintel_atomic.hintel_audio.hintel_audio_regs.hintel_cdclk.hintel_crtc.hintel_de.hintel_display_types.hintel_display_wa.hintel_lpe_audio.h
Detected Declarations
struct intel_audio_funcsstruct hdmi_aud_nctsstruct ibx_audio_regsstruct aud_ts_cdclk_m_nfunction audio_config_hdmi_pixel_clockfunction audio_config_hdmi_get_nfunction g4x_eld_buffer_sizefunction g4x_audio_codec_get_configfunction g4x_audio_codec_disablefunction g4x_audio_codec_enablefunction hsw_dp_audio_config_updatefunction hsw_hdmi_audio_config_updatefunction hsw_audio_config_updatefunction intel_audio_sdp_split_updatefunction hsw_audio_codec_disablefunction calc_hblank_early_progfunction calc_samples_roomfunction enable_audio_dsc_wafunction hsw_audio_codec_enablefunction ibx_audio_regs_initfunction ibx_audio_codec_disablefunction ibx_audio_codec_enablefunction intel_audio_compute_configfunction intel_audio_codec_enablefunction intel_audio_codec_disablefunction intel_acomp_get_configfunction intel_audio_codec_get_configfunction intel_audio_hooks_initfunction intel_audio_cdclk_change_prefunction get_aud_ts_cdclk_m_nfunction intel_audio_cdclk_change_postfunction glk_force_audio_cdclk_commitfunction glk_force_audio_cdclkfunction intel_audio_min_cdclkfunction intel_audio_component_get_powerfunction intel_audio_component_put_powerfunction intel_audio_component_codec_wake_overridefunction intel_audio_component_get_cdclk_freqfunction for_each_cpu_transcoderfunction intel_audio_component_sync_audio_ratefunction intel_audio_component_get_eldfunction intel_audio_component_bindfunction intel_audio_component_unbindfunction functionalityfunction intel_audio_component_registerfunction intel_audio_component_cleanupfunction intel_audio_initfunction intel_audio_register
Annotated Snippet
struct intel_audio_funcs {
void (*audio_codec_enable)(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state);
void (*audio_codec_disable)(struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state);
void (*audio_codec_get_config)(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state);
};
struct hdmi_aud_ncts {
int sample_rate;
int clock;
int n;
int cts;
};
static const struct {
int clock;
u32 config;
} hdmi_audio_clock[] = {
{ 25175, AUD_CONFIG_PIXEL_CLOCK_HDMI_25175 },
{ 25200, AUD_CONFIG_PIXEL_CLOCK_HDMI_25200 }, /* default per bspec */
{ 27000, AUD_CONFIG_PIXEL_CLOCK_HDMI_27000 },
{ 27027, AUD_CONFIG_PIXEL_CLOCK_HDMI_27027 },
{ 54000, AUD_CONFIG_PIXEL_CLOCK_HDMI_54000 },
{ 54054, AUD_CONFIG_PIXEL_CLOCK_HDMI_54054 },
{ 74176, AUD_CONFIG_PIXEL_CLOCK_HDMI_74176 },
{ 74250, AUD_CONFIG_PIXEL_CLOCK_HDMI_74250 },
{ 148352, AUD_CONFIG_PIXEL_CLOCK_HDMI_148352 },
{ 148500, AUD_CONFIG_PIXEL_CLOCK_HDMI_148500 },
{ 296703, AUD_CONFIG_PIXEL_CLOCK_HDMI_296703 },
{ 297000, AUD_CONFIG_PIXEL_CLOCK_HDMI_297000 },
{ 593407, AUD_CONFIG_PIXEL_CLOCK_HDMI_593407 },
{ 594000, AUD_CONFIG_PIXEL_CLOCK_HDMI_594000 },
};
/* HDMI N/CTS table */
#define TMDS_297M 297000
#define TMDS_296M 296703
#define TMDS_594M 594000
#define TMDS_593M 593407
static const struct hdmi_aud_ncts hdmi_aud_ncts_24bpp[] = {
{ 32000, TMDS_296M, 5824, 421875 },
{ 32000, TMDS_297M, 3072, 222750 },
{ 32000, TMDS_593M, 5824, 843750 },
{ 32000, TMDS_594M, 3072, 445500 },
{ 44100, TMDS_296M, 4459, 234375 },
{ 44100, TMDS_297M, 4704, 247500 },
{ 44100, TMDS_593M, 8918, 937500 },
{ 44100, TMDS_594M, 9408, 990000 },
{ 88200, TMDS_296M, 8918, 234375 },
{ 88200, TMDS_297M, 9408, 247500 },
{ 88200, TMDS_593M, 17836, 937500 },
{ 88200, TMDS_594M, 18816, 990000 },
{ 176400, TMDS_296M, 17836, 234375 },
{ 176400, TMDS_297M, 18816, 247500 },
{ 176400, TMDS_593M, 35672, 937500 },
{ 176400, TMDS_594M, 37632, 990000 },
{ 48000, TMDS_296M, 5824, 281250 },
{ 48000, TMDS_297M, 5120, 247500 },
{ 48000, TMDS_593M, 5824, 562500 },
{ 48000, TMDS_594M, 6144, 594000 },
{ 96000, TMDS_296M, 11648, 281250 },
{ 96000, TMDS_297M, 10240, 247500 },
{ 96000, TMDS_593M, 11648, 562500 },
{ 96000, TMDS_594M, 12288, 594000 },
{ 192000, TMDS_296M, 23296, 281250 },
{ 192000, TMDS_297M, 20480, 247500 },
{ 192000, TMDS_593M, 23296, 562500 },
{ 192000, TMDS_594M, 24576, 594000 },
};
/* Appendix C - N & CTS values for deep color from HDMI 2.0 spec*/
/* HDMI N/CTS table for 10 bit deep color(30 bpp)*/
#define TMDS_371M 371250
#define TMDS_370M 370878
static const struct hdmi_aud_ncts hdmi_aud_ncts_30bpp[] = {
{ 32000, TMDS_370M, 5824, 527344 },
{ 32000, TMDS_371M, 6144, 556875 },
{ 44100, TMDS_370M, 8918, 585938 },
{ 44100, TMDS_371M, 4704, 309375 },
{ 88200, TMDS_370M, 17836, 585938 },
{ 88200, TMDS_371M, 9408, 309375 },
{ 176400, TMDS_370M, 35672, 585938 },
{ 176400, TMDS_371M, 18816, 309375 },
{ 48000, TMDS_370M, 11648, 703125 },
Annotation
- Immediate include surface: `linux/component.h`, `linux/kernel.h`, `drm/drm_edid.h`, `drm/drm_eld.h`, `drm/drm_fixed.h`, `drm/drm_print.h`, `drm/intel/i915_component.h`, `intel_atomic.h`.
- Detected declarations: `struct intel_audio_funcs`, `struct hdmi_aud_ncts`, `struct ibx_audio_regs`, `struct aud_ts_cdclk_m_n`, `function audio_config_hdmi_pixel_clock`, `function audio_config_hdmi_get_n`, `function g4x_eld_buffer_size`, `function g4x_audio_codec_get_config`, `function g4x_audio_codec_disable`, `function g4x_audio_codec_enable`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source 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.