sound/hda/codecs/hdmi/hdmi_local.h
Source file repositories/reference/linux-study-clean/sound/hda/codecs/hdmi/hdmi_local.h
File Facts
- System
- Linux kernel
- Corpus path
sound/hda/codecs/hdmi/hdmi_local.h- Extension
.h- Size
- 9384 bytes
- Lines
- 303
- Domain
- Driver Families
- Bucket
- sound/hda
- 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/core.hsound/jack.hsound/hdaudio.hsound/hda_i915.hsound/hda_chmap.hsound/hda_codec.hhda_local.h
Detected Declarations
struct hdmi_spec_per_cvtstruct hdmi_spec_per_pinstruct hdmi_opsstruct hdmi_pcmstruct hdmi_specstruct hdmi_audio_infoframestruct dp_audio_infoframefunction codec_has_acomp
Annotated Snippet
struct hdmi_spec_per_cvt {
hda_nid_t cvt_nid;
bool assigned; /* the stream has been assigned */
bool silent_stream; /* silent stream activated */
unsigned int channels_min;
unsigned int channels_max;
u32 rates;
u64 formats;
unsigned int maxbps;
};
/* max. connections to a widget */
#define HDA_MAX_CONNECTIONS 32
struct hdmi_spec_per_pin {
hda_nid_t pin_nid;
int dev_id;
/* pin idx, different device entries on the same pin use the same idx */
int pin_nid_idx;
int num_mux_nids;
hda_nid_t mux_nids[HDA_MAX_CONNECTIONS];
int mux_idx;
hda_nid_t cvt_nid;
struct hda_codec *codec;
struct hdmi_eld sink_eld;
struct mutex lock;
struct delayed_work work;
struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/
int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */
int prev_pcm_idx; /* previously assigned pcm index */
int repoll_count;
bool setup; /* the stream has been set up by prepare callback */
bool silent_stream;
int channels; /* current number of channels */
bool non_pcm;
bool chmap_set; /* channel-map override by ALSA API? */
unsigned char chmap[8]; /* ALSA API channel-map */
#ifdef CONFIG_SND_PROC_FS
struct snd_info_entry *proc_entry;
#endif
};
/* operations used by generic code that can be overridden by codec drivers */
struct hdmi_ops {
int (*pin_get_eld)(struct hda_codec *codec, hda_nid_t pin_nid,
int dev_id, unsigned char *buf, int *eld_size);
void (*pin_setup_infoframe)(struct hda_codec *codec, hda_nid_t pin_nid,
int dev_id,
int ca, int active_channels, int conn_type);
/* enable/disable HBR (HD passthrough) */
int (*pin_hbr_setup)(struct hda_codec *codec, hda_nid_t pin_nid,
int dev_id, bool hbr);
int (*setup_stream)(struct hda_codec *codec, hda_nid_t cvt_nid,
hda_nid_t pin_nid, int dev_id, u32 stream_tag,
int format);
void (*pin_cvt_fixup)(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
hda_nid_t cvt_nid);
void (*silent_stream)(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
bool enable);
};
struct hdmi_pcm {
struct hda_pcm *pcm;
struct snd_jack *jack;
struct snd_kcontrol *eld_ctl;
};
enum {
SILENT_STREAM_OFF = 0,
SILENT_STREAM_KAE, /* use standard HDA Keep-Alive */
SILENT_STREAM_I915, /* Intel i915 extension */
};
struct hdmi_spec {
struct hda_codec *codec;
int num_cvts;
struct snd_array cvts; /* struct hdmi_spec_per_cvt */
hda_nid_t cvt_nids[4]; /* only for haswell fix */
/*
* num_pins is the number of virtual pins
* for example, there are 3 pins, and each pin
Annotation
- Immediate include surface: `sound/core.h`, `sound/jack.h`, `sound/hdaudio.h`, `sound/hda_i915.h`, `sound/hda_chmap.h`, `sound/hda_codec.h`, `hda_local.h`.
- Detected declarations: `struct hdmi_spec_per_cvt`, `struct hdmi_spec_per_pin`, `struct hdmi_ops`, `struct hdmi_pcm`, `struct hdmi_spec`, `struct hdmi_audio_infoframe`, `struct dp_audio_infoframe`, `function codec_has_acomp`.
- Atlas domain: Driver Families / sound/hda.
- 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.