sound/pci/ctxfi/cthardware.h

Source file repositories/reference/linux-study-clean/sound/pci/ctxfi/cthardware.h

File Facts

System
Linux kernel
Corpus path
sound/pci/ctxfi/cthardware.h
Extension
.h
Size
7633 bytes
Lines
217
Domain
Driver Families
Bucket
sound/pci
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct card_conf {
	/* device virtual mem page table page physical addr
	 * (supporting one page table page now) */
	unsigned long vm_pgt_phys;
	unsigned int rsr;	/* reference sample rate in Hzs*/
	unsigned int msr;	/* master sample rate in rsrs */
};

struct capabilities {
	unsigned int digit_io_switch:1;
	unsigned int dedicated_mic:1;
	unsigned int dedicated_rca:1;
	unsigned int output_switch:1;
	unsigned int mic_source_switch:1;
};

struct hw {
	int (*card_init)(struct hw *hw, struct card_conf *info);
	int (*card_stop)(struct hw *hw);
	int (*pll_init)(struct hw *hw, unsigned int rsr);
#ifdef CONFIG_PM_SLEEP
	int (*suspend)(struct hw *hw);
	int (*resume)(struct hw *hw, struct card_conf *info);
#endif
	int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source);
	int (*select_adc_source)(struct hw *hw, enum ADCSRC source);
	struct capabilities (*capabilities)(struct hw *hw);
	int (*output_switch_get)(struct hw *hw);
	int (*output_switch_put)(struct hw *hw, int position);
	int (*mic_source_switch_get)(struct hw *hw);
	int (*mic_source_switch_put)(struct hw *hw, int position);

	/* SRC operations */
	int (*src_rsc_get_ctrl_blk)(void **rblk);
	int (*src_rsc_put_ctrl_blk)(void *blk);
	int (*src_set_state)(void *blk, unsigned int state);
	int (*src_set_bm)(void *blk, unsigned int bm);
	int (*src_set_rsr)(void *blk, unsigned int rsr);
	int (*src_set_sf)(void *blk, unsigned int sf);
	int (*src_set_wr)(void *blk, unsigned int wr);
	int (*src_set_pm)(void *blk, unsigned int pm);
	int (*src_set_rom)(void *blk, unsigned int rom);
	int (*src_set_vo)(void *blk, unsigned int vo);
	int (*src_set_st)(void *blk, unsigned int st);
	int (*src_set_ie)(void *blk, unsigned int ie);
	int (*src_set_ilsz)(void *blk, unsigned int ilsz);
	int (*src_set_bp)(void *blk, unsigned int bp);
	int (*src_set_cisz)(void *blk, unsigned int cisz);
	int (*src_set_ca)(void *blk, unsigned int ca);
	int (*src_set_sa)(void *blk, unsigned int sa);
	int (*src_set_la)(void *blk, unsigned int la);
	int (*src_set_pitch)(void *blk, unsigned int pitch);
	int (*src_set_clear_zbufs)(void *blk, unsigned int clear);
	int (*src_set_dirty)(void *blk, unsigned int flags);
	int (*src_set_dirty_all)(void *blk);
	int (*src_commit_write)(struct hw *hw, unsigned int idx, void *blk);
	int (*src_get_ca)(struct hw *hw, unsigned int idx, void *blk);
	unsigned int (*src_get_dirty)(void *blk);
	unsigned int (*src_dirty_conj_mask)(void);
	int (*src_mgr_get_ctrl_blk)(void **rblk);
	int (*src_mgr_put_ctrl_blk)(void *blk);
	/* syncly enable src @idx */
	int (*src_mgr_enbs_src)(void *blk, unsigned int idx);
	/* enable src @idx */
	int (*src_mgr_enb_src)(void *blk, unsigned int idx);
	/* disable src @idx */
	int (*src_mgr_dsb_src)(void *blk, unsigned int idx);
	int (*src_mgr_commit_write)(struct hw *hw, void *blk);

	/* SRC Input Mapper operations */
	int (*srcimp_mgr_get_ctrl_blk)(void **rblk);
	int (*srcimp_mgr_put_ctrl_blk)(void *blk);
	int (*srcimp_mgr_set_imaparc)(void *blk, unsigned int slot);
	int (*srcimp_mgr_set_imapuser)(void *blk, unsigned int user);
	int (*srcimp_mgr_set_imapnxt)(void *blk, unsigned int next);
	int (*srcimp_mgr_set_imapaddr)(void *blk, unsigned int addr);
	int (*srcimp_mgr_commit_write)(struct hw *hw, void *blk);

	/* AMIXER operations */
	int (*amixer_rsc_get_ctrl_blk)(void **rblk);
	int (*amixer_rsc_put_ctrl_blk)(void *blk);
	int (*amixer_mgr_get_ctrl_blk)(void **rblk);
	int (*amixer_mgr_put_ctrl_blk)(void *blk);
	int (*amixer_set_mode)(void *blk, unsigned int mode);
	int (*amixer_set_iv)(void *blk, unsigned int iv);
	int (*amixer_set_x)(void *blk, unsigned int x);
	int (*amixer_set_y)(void *blk, unsigned int y);
	int (*amixer_set_sadr)(void *blk, unsigned int sadr);
	int (*amixer_set_se)(void *blk, unsigned int se);
	int (*amixer_set_dirty)(void *blk, unsigned int flags);

Annotation

Implementation Notes