Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/ctxfi/ctatc.c
static int atc_output_switch_get(struct ct_atc *atc) { struct hw *hw = atc->hw; return hw->output_switch_get(hw); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctatc.c
static int atc_select_digit_io(struct ct_atc *atc) { struct hw *hw = atc->hw; if (hw->is_adc_source_selected(hw, ADC_NONE)) return 0; hw->select_adc_source(hw, ADC_NONE); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctatc.c
static int atc_daio_unmute(struct ct_atc *atc, unsigned char state, int type) { struct daio_mgr *daio_mgr = atc->rsc_mgrs[DAIO]; if (state) daio_mgr->daio_enable(daio_mgr, atc->daios[type]); else daio_mgr->daio_disable(daio_mgr, atc->daios[type]); daio_mgr->commit_write(daio_mgr); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctatc.c
static int atc_line_rear_unmute(struct ct_atc *atc, unsigned char state) { return atc_daio_unmute(atc, state, LINEO4); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctatc.c
static int atc_spdif_out_passthru(struct ct_atc *atc, unsigned char state) { struct dao_desc da_dsc = {0}; struct dao *dao; int err; struct ct_mixer *mixer = atc->mixer; struct rsc *rscs[2] = {NULL}; unsigned int spos = 0; mutex_lock(&atc->atc_mutex); dao = container_of(atc->daios[SPDIFOO], struct dao,...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctatc.c
static void atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai, struct src **srcs, struct srcimp **srcimps) { struct rsc *rscs[2] = {NULL}; struct src *src; struct srcimp *srcimp; int i = 0; rscs[0] = &dai->daio.rscl; rscs[1] = &dai->daio.rscr; for (i = 0; i < 2; i++) { ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static void daio_in_next_conj_20k2(struct rsc *rsc) { rsc->conj += 0x100; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static unsigned int daio_device_index(enum DAIOTYP type, struct hw *hw) { switch (hw->chip_type) { case ATC20K1: switch (type) { case SPDIFOO: return 0; case SPDIFIO: return 0; case SPDIFI1: return 1; case LINEO1: return 4; case LINEO2: return 7; case LINEO...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dao_spdif_get_spos(struct dao *dao, unsigned int *spos) { dao->hw->dao_get_spos(dao->ctrl_blk, spos); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dao_clear_left_input(struct dao *dao) { struct imapper *entry; struct daio *daio = &dao->daio; int i; if (!dao->imappers[0]) return 0; entry = dao->imappers[0]; dao->mgr->imap_delete(dao->mgr, entry); for (i = 1; i < daio->rscl.msr; i++) { entry = dao->imappers[i]; dao->mgr->imap...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dao_clear_right_input(struct dao *dao) { struct imapper *entry; struct daio *daio = &dao->daio; int i; if (!dao->imappers[daio->rscl.msr]) return 0; entry = dao->imappers[daio->rscl.msr]; dao->mgr->imap_delete(dao->mgr, entry); for (i = 1; i < daio->rscr.msr; i++) { entry = dao->imap...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dai_set_srt_srcl(struct dai *dai, struct rsc *src) { src->ops->master(src); dai->hw->dai_srt_set_srcm(dai->ctrl_blk, src->ops->index(src)); return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dai_set_srt_srcr(struct dai *dai, struct rsc *src) { src->ops->master(src); dai->hw->dai_srt_set_srco(dai->ctrl_blk, src->ops->index(src)); return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int dao_rsc_reinit(struct dao *dao, const struct dao_desc *desc) { struct daio_mgr *mgr = dao->mgr; struct daio_desc dsc = {0}; dsc.type = dao->daio.type; dsc.msr = desc->msr; dsc.passthru = desc->passthru; dao_rsc_uninit(dao); return dao_rsc_init(dao, &dsc, mgr); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int get_daio_rsc(struct daio_mgr *mgr, const struct daio_desc *desc, struct daio **rdaio) { int err; unsigned long flags; *rdaio = NULL; spin_lock_irqsave(&mgr->mgr_lock, flags); err = daio_mgr_get_rsc(&mgr->mgr, desc->type); spin_unlock_irqrestore(&mgr->mgr_lock, flags); ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int put_daio_rsc(struct daio_mgr *mgr, struct daio *daio) { unsigned long flags; mgr->daio_disable(mgr, daio); mgr->commit_write(mgr); spin_lock_irqsave(&mgr->mgr_lock, flags); daio_mgr_put_rsc(&mgr->mgr, daio->type); spin_unlock_irqrestore(&mgr->mgr_lock, flags); if (daio->type <= DAIO_OUT_MAX...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int daio_mgr_dsb_daio(struct daio_mgr *mgr, struct daio *daio) { struct hw *hw = mgr->mgr.hw; if (DAIO_OUT_MAX >= daio->type) { hw->daio_mgr_dsb_dao(mgr->mgr.ctrl_blk, daio_device_index(daio->type, hw)); } else { hw->daio_mgr_dsb_dai(mgr->mgr.ctrl_blk, daio_device_index(daio->type, hw)); } re...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctdaio.c
static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) { unsigned long flags; int err; spin_lock_irqsave(&mgr->imap_lock, flags); if (!entry->addr && mgr->init_imap_added) { input_mapper_delete(&mgr->imappers, mgr->init_imap, daio_map_op, mgr); mgr->init_imap_added = 0; } err = inpu...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthardware.c
int create_hw_obj(struct pci_dev *pci, enum CHIPTYP chip_type, enum CTCARDS model, struct hw **rhw) { int err; switch (chip_type) { case ATC20K1: err = create_20k1_hw_obj(rhw); break; case ATC20K2: err = create_20k2_hw_obj(rhw); break; default: err = -ENODEV; break;...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_put_rsc_ctrl_blk(void *blk) { kfree(blk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_sf(void *blk, unsigned int sf) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_SF, sf); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_wr(void *blk, unsigned int wr) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_WR, wr); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_rom(void *blk, unsigned int rom) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_ROM, rom); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_ie(void *blk, unsigned int ie) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_IE, ie); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_cisz(void *blk, unsigned int cisz) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ccr, SRCCCR_CISZ, cisz); ctl->dirty.bf.ccr = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_la(void *blk, unsigned int la) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->la, SRCLA_LA, la); ctl->dirty.bf.la = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_set_dirty_all(void *blk) { ((struct src_rsc_ctrl_blk *)blk)->dirty.data = ~(0x0); return 0; } #define AR_SLOT_SIZE 4096 #define AR_SLOT_BLOCK_SIZE 16 #define AR_PTS_PITCH 6 #define AR_PARAM_SRC_OFFSET 0x60
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static unsigned int src_param_pitch_mixer(unsigned int src_idx) { return ((src_idx << 4) + AR_PTS_PITCH + AR_SLOT_SIZE - AR_PARAM_SRC_OFFSET) % AR_SLOT_SIZE; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_mgr_enbs_src(void *blk, unsigned int idx) { ((struct src_mgr_ctrl_blk *)blk)->enbsa = ~(0x0); ((struct src_mgr_ctrl_blk *)blk)->dirty.bf.enbsa = 1; ((struct src_mgr_ctrl_blk *)blk)->enb[idx / 32] |= (0x1 << (idx % 32)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_mgr_commit_write(struct hw *hw, void *blk) { struct src_mgr_ctrl_blk *ctl = blk; int i; unsigned int ret; if (ctl->dirty.bf.enbsa) { do { ret = hw_read_20kx(hw, SRCENBSTAT); } while (ret & 0x1); hw_write_20kx(hw, SRCENBS, ctl->enbsa); ctl->dirty.bf.enbsa = 0; } for (i ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_mgr_get_ctrl_blk(void **rblk) { struct src_mgr_ctrl_blk *blk; *rblk = NULL; blk = kzalloc(sizeof(*blk), GFP_KERNEL); if (!blk) return -ENOMEM; *rblk = blk; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int src_mgr_put_ctrl_blk(void *blk) { kfree(blk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int srcimp_mgr_get_ctrl_blk(void **rblk) { struct srcimp_mgr_ctrl_blk *blk; *rblk = NULL; blk = kzalloc(sizeof(*blk), GFP_KERNEL); if (!blk) return -ENOMEM; *rblk = blk; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int srcimp_mgr_put_ctrl_blk(void *blk) { kfree(blk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int srcimp_mgr_set_imaparc(void *blk, unsigned int slot) { struct srcimp_mgr_ctrl_blk *ctl = blk; set_field(&ctl->srcimap.srcaim, SRCAIM_ARC, slot); ctl->dirty.bf.srcimap = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int srcimp_mgr_set_imapaddr(void *blk, unsigned int addr) { struct srcimp_mgr_ctrl_blk *ctl = blk; ctl->srcimap.idx = addr; ctl->dirty.bf.srcimap = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_set_mode(void *blk, unsigned int mode) { struct amixer_rsc_ctrl_blk *ctl = blk; set_field(&ctl->amoplo, AMOPLO_M, mode); ctl->dirty.bf.amoplo = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_set_dirty(void *blk, unsigned int flags) { ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data = (flags & 0xffff); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_commit_write(struct hw *hw, unsigned int idx, void *blk) { struct amixer_rsc_ctrl_blk *ctl = blk; if (ctl->dirty.bf.amoplo || ctl->dirty.bf.amophi) { hw_write_20kx(hw, AMOPLO + idx * 8, ctl->amoplo); ctl->dirty.bf.amoplo = 0; hw_write_20kx(hw, AMOPHI + idx * 8, ctl->amophi); ctl-...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_rsc_get_ctrl_blk(void **rblk) { struct amixer_rsc_ctrl_blk *blk; *rblk = NULL; blk = kzalloc(sizeof(*blk), GFP_KERNEL); if (!blk) return -ENOMEM; *rblk = blk; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_rsc_put_ctrl_blk(void *blk) { kfree(blk); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int amixer_mgr_get_ctrl_blk(void **rblk) { *rblk = NULL; /*blk = kzalloc(sizeof(*blk), GFP_KERNEL); if (!blk) return -ENOMEM; *rblk = blk;*/ return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int dai_srt_set_srcl(void *blk, unsigned int src) { struct dai_ctrl_blk *ctl = blk; set_field(&ctl->srtctl, SRTCTL_SRCL, src); ctl->dirty.bf.srtctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int dai_srt_set_rsr(void *blk, unsigned int rsr) { struct dai_ctrl_blk *ctl = blk; set_field(&ctl->srtctl, SRTCTL_RSR, rsr); ctl->dirty.bf.srtctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int dao_get_ctrl_blk(void **rblk) { struct dao_ctrl_blk *blk; *rblk = NULL; blk = kzalloc(sizeof(*blk), GFP_KERNEL); if (!blk) return -ENOMEM; *rblk = blk; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int daio_mgr_dsb_dai(void *blk, unsigned int idx) { struct daio_mgr_ctrl_blk *ctl = blk; if (idx < 4) { set_field(&ctl->spictl, SPICTL_EN << (idx * 8), 0); ctl->dirty.bf.spictl |= (0x1 << idx); } else { /* I2S input */ idx %= 4; set_field(&ctl->i2sctl, I2SCTL_EI << (idx * 8), 0); ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int daio_mgr_enb_dao(void *blk, unsigned int idx) { struct daio_mgr_ctrl_blk *ctl = blk; if (idx < 4) { set_field(&ctl->spoctl, SPOCTL_OE << (idx * 8), 1); ctl->dirty.bf.spoctl |= (0x1 << idx); } else { /* I2S output */ idx %= 4; set_field(&ctl->i2sctl, I2SCTL_EA << (idx * 8), 1); ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int daio_mgr_dao_init(void *blk, unsigned int idx, unsigned int conf) { struct daio_mgr_ctrl_blk *ctl = blk; if (idx < 4) { switch ((conf & 0x7)) { case 0: set_field(&ctl->spoctl, SPOCTL_SR << (idx * 8), 3); break; /* CDIF */ case 1: set_field(&ctl->spoctl, SPOCTL_SR << (idx *...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int daio_mgr_set_imaparc(void *blk, unsigned int slot) { struct daio_mgr_ctrl_blk *ctl = blk; set_field(&ctl->daoimap.aim, AIM_ARC, slot); ctl->dirty.bf.daoimap = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_pll_init(struct hw *hw, unsigned int rsr) { unsigned int pllctl; int i; pllctl = (48000 == rsr) ? 0x1480a001 : 0x1480a731; for (i = 0; i < 3; i++) { if (hw_read_20kx(hw, PLLCTL) == pllctl) break; hw_write_20kx(hw, PLLCTL, pllctl); msleep(40); } if (i >= 3) { dev_alert(...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_auto_init(struct hw *hw) { unsigned int gctl; int i; gctl = hw_read_20kx(hw, GCTL); set_field(&gctl, GCTL_EAI, 0); hw_write_20kx(hw, GCTL, gctl); set_field(&gctl, GCTL_EAI, 1); hw_write_20kx(hw, GCTL, gctl); mdelay(10); for (i = 0; i < 400000; i++) { gctl = hw_read_20kx(hw, GCTL); ...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_is_adc_input_selected(struct hw *hw, enum ADCSRC type) { switch (hw->model) { case CTSB055X: return is_adc_input_selected_SB055x(hw, type); case CTSB073X: return is_adc_input_selected_hendrix(hw, type); case CTUAA: return is_adc_input_selected_hendrix(hw, type); default: return ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_adc_input_select(struct hw *hw, enum ADCSRC type) { int state = type == ADC_MICIN; switch (hw->model) { case CTSB055X: return adc_input_select_SB055x(hw, type, state); case CTSB073X: return adc_input_select_hendrix(hw, type, state); case CTUAA: return adc_input_select_hendrix(hw, t...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static struct capabilities hw_capabilities(struct hw *hw) { struct capabilities cap; cap.digit_io_switch = !(hw->model == CTSB073X || hw->model == CTUAA); cap.dedicated_mic = 0; cap.output_switch = 0; cap.mic_source_switch = 0; return cap; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_card_start(struct hw *hw) { int err; struct pci_dev *pci = hw->pci; const unsigned int dma_bits = BITS_PER_LONG; err = pci_enable_device(pci); if (err < 0) return err; if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(dma_bits))) dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static int hw_suspend(struct hw *hw) { struct pci_dev *pci = hw->pci; hw_card_stop(hw); if (hw->model == CTUAA) { pci_write_config_dword(pci, UAA_CFG_SPACE_FLAG, 0x0); } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
static u32 hw_read_20kx(struct hw *hw, u32 reg) { u32 value; unsigned long flags; spin_lock_irqsave(&container_of(hw, struct hw20k1, hw)->reg_20k1_lock, flags); outl(reg, hw->io_base + 0x0); value = inl(hw->io_base + 0x4); spin_unlock_irqrestore(&container_of(hw, struct hw20k1, hw)->reg_20k1_lock, ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k1.c
int create_20k1_hw_obj(struct hw **rhw) { struct hw20k1 *hw20k1; *rhw = NULL; hw20k1 = kzalloc(sizeof(*hw20k1), GFP_KERNEL); if (!hw20k1) return -ENOMEM; spin_lock_init(&hw20k1->reg_20k1_lock); spin_lock_init(&hw20k1->reg_pci_lock); hw20k1->hw = ct20k1_preset; *rhw = &hw20k1->hw; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_set_st(void *blk, unsigned int st) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_ST, st); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_set_ilsz(void *blk, unsigned int ilsz) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ctl, SRCCTL_ILSZ, ilsz); ctl->dirty.bf.ctl = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_set_ca(void *blk, unsigned int ca) { struct src_rsc_ctrl_blk *ctl = blk; set_field(&ctl->ca, SRCCA_CA, ca); ctl->dirty.bf.ca = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_set_clear_zbufs(void *blk, unsigned int clear) { ((struct src_rsc_ctrl_blk *)blk)->dirty.bf.czbfs = (clear ? 1 : 0); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_set_dirty_all(void *blk) { ((struct src_rsc_ctrl_blk *)blk)->dirty.data = ~(0x0); return 0; } #define AR_SLOT_SIZE 4096 #define AR_SLOT_BLOCK_SIZE 16 #define AR_PTS_PITCH 6 #define AR_PARAM_SRC_OFFSET 0x60
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static unsigned int src_param_pitch_mixer(unsigned int src_idx) { return ((src_idx << 4) + AR_PTS_PITCH + AR_SLOT_SIZE - AR_PARAM_SRC_OFFSET) % AR_SLOT_SIZE; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_mgr_enbs_src(void *blk, unsigned int idx) { ((struct src_mgr_ctrl_blk *)blk)->enbsa |= (0x1 << ((idx % 128) / 4)); ((struct src_mgr_ctrl_blk *)blk)->dirty.bf.enbsa = 1; ((struct src_mgr_ctrl_blk *)blk)->enb[idx / 32] |= (0x1 << (idx % 32)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int src_mgr_dsb_src(void *blk, unsigned int idx) { ((struct src_mgr_ctrl_blk *)blk)->enb[idx / 32] &= ~(0x1 << (idx % 32)); ((struct src_mgr_ctrl_blk *)blk)->dirty.data |= (0x1 << (idx / 32)); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int srcimp_mgr_set_imapaddr(void *blk, unsigned int addr) { ((struct srcimp_mgr_ctrl_blk *)blk)->srcimap.idx = addr; ((struct srcimp_mgr_ctrl_blk *)blk)->dirty.bf.srcimap = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int srcimp_mgr_commit_write(struct hw *hw, void *blk) { struct srcimp_mgr_ctrl_blk *ctl = blk; if (ctl->dirty.bf.srcimap) { hw_write_20kx(hw, SRC_IMAP + ctl->srcimap.idx * 0x100, ctl->srcimap.srcaim); ctl->dirty.bf.srcimap = 0; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int amixer_set_x(void *blk, unsigned int x) { struct amixer_rsc_ctrl_blk *ctl = blk; set_field(&ctl->amoplo, AMOPLO_X, x); ctl->dirty.bf.amoplo = 1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int amixer_set_dirty_all(void *blk) { ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data = ~(0x0); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static unsigned int amixer_get_dirty(void *blk) { return ((struct amixer_rsc_ctrl_blk *)blk)->dirty.data; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int daio_mgr_enb_dai(void *blk, unsigned int idx) { struct daio_mgr_ctrl_blk *ctl = blk; set_field(&ctl->rxctl[idx], ARXCTL_EN, 1); ctl->dirty.bf.arxctl |= (0x1 << idx); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int daio_mgr_commit_write(struct hw *hw, void *blk) { struct daio_mgr_ctrl_blk *ctl = blk; unsigned int data; int i; for (i = 0; i < 8; i++) { if ((ctl->dirty.bf.atxctl & (0x1 << i))) { data = ctl->txctl[i]; hw_write_20kx(hw, (AUDIO_IO_TX_CTL + (0x40 * i)), data); ctl->dirty.bf.at...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_trn_init(struct hw *hw, const struct trn_conf *info) { u32 vmctl, data; u32 ptp_phys_low, ptp_phys_high; int i; if ((~0UL) == info->vm_pgt_phys) { dev_alert(hw->card->dev, "Wrong device page table page address!!!\n"); return -1; } vmctl = 0x80000C0F; /* 32-bit, 4k-size page */ ptp_...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_pll_init(struct hw *hw, unsigned int rsr) { unsigned int pllenb; unsigned int pllctl; unsigned int pllstat; int i; pllenb = 0xB; hw_write_20kx(hw, PLL_ENB, pllenb); pllctl = 0x20C00000; set_field(&pllctl, PLLCTL_B, 0); set_field(&pllctl, PLLCTL_FD, 48000 == rsr ? 16 - 4 : 147 - 4); s...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_auto_init(struct hw *hw) { unsigned int gctl; int i; gctl = hw_read_20kx(hw, GLOBAL_CNTL_GCTL); set_field(&gctl, GCTL_AIE, 0); hw_write_20kx(hw, GLOBAL_CNTL_GCTL, gctl); set_field(&gctl, GCTL_AIE, 1); hw_write_20kx(hw, GLOBAL_CNTL_GCTL, gctl); mdelay(10); for (i = 0; i < 400000; i++) { ...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw20k2_i2c_wait_data_ready(struct hw *hw) { int i = 0x400000; unsigned int ret; do { ret = hw_read_20kx(hw, I2C_IF_STATUS); } while ((!(ret & DATA_READY)) && --i); return i; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static void hw_dac_stop(struct hw *hw) { u32 data; data = hw_read_20kx(hw, GPIO_DATA); data &= 0xFFFFFFFD; hw_write_20kx(hw, GPIO_DATA, data); usleep_range(10000, 11000); }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_adc_input_select(struct hw *hw, enum ADCSRC type) { u32 data; data = hw_read_20kx(hw, GPIO_DATA); switch (type) { case ADC_MICIN: data |= (0x1 << 14); hw_write_20kx(hw, GPIO_DATA, data); hw_wm8775_input_select(hw, 0, 20); break; case ADC_LINEIN: data &= ~(0x1 << 14); hw_w...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static irqreturn_t ct_20k2_interrupt(int irq, void *dev_id) { struct hw *hw = dev_id; unsigned int status; status = hw_read_20kx(hw, GIP); if (!status) return IRQ_NONE; if (hw->irq_callback) hw->irq_callback(hw->irq_callback_data, status); hw_write_20kx(hw, GIP, status); return IRQ_HANDLED; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_card_stop(struct hw *hw) { unsigned int data; hw_write_20kx(hw, TRANSPORT_CTL, 0x00); /* disable pll */ data = hw_read_20kx(hw, PLL_ENB); hw_write_20kx(hw, PLL_ENB, (data & (~0x07))); /* TODO: Disable interrupt and so on... */ return 0; }
[ 0, 1 ]
Linux Kernel
sound/pci/ctxfi/cthw20k2.c
static int hw_card_shutdown(struct hw *hw) { if (hw->irq >= 0) free_irq(hw->irq, hw); hw->irq = -1; iounmap(hw->mem_base); hw->mem_base = NULL; if (hw->io_base) pci_release_regions(hw->pci); hw->io_base = 0; pci_disable_device(hw->pci); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctimap.c
int input_mapper_delete(struct list_head *mappers, struct imapper *entry, int (*map_op)(void *, struct imapper *), void *data) { struct list_head *next, *pre, *head; struct imapper *pre_ent, *next_ent; head = mappers; if (list_empty(head)) return 0; pre = (entry->list.prev == he...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctimap.c
void free_input_mapper_list(struct list_head *head) { struct imapper *entry; struct list_head *pos; while (!list_empty(head)) { pos = head->next; list_del(pos); entry = list_entry(pos, struct imapper, list); kfree(entry); } }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static unsigned char get_switch_state(struct ct_mixer *mixer, enum CTALSA_MIXER_CTL type) { return (mixer->switch_state & (0x1 << (type - SWH_MIXER_START))) ? 1 : 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int ct_alsa_mix_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ct_atc *atc = snd_kcontrol_chip(kcontrol); enum CT_AMIXER_CTL type = get_amixer_index(kcontrol->private_value); struct amixer *amixer; int i, val; for (i = 0; i < ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int output_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ct_atc *atc = snd_kcontrol_chip(kcontrol); if (ucontrol->value.enumerated.item[0] > 2) return -EINVAL; return atc->output_switch_put(atc, ucontrol->value.enumerated.item[0]);...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int ct_spdif_get_mask(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.iec958.status[0] = 0xff; ucontrol->value.iec958.status[1] = 0xff; ucontrol->value.iec958.status[2] = 0xff; ucontrol->value.iec958.status[3] = 0xff; return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int ct_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ct_atc *atc = snd_kcontrol_chip(kcontrol); unsigned int status; atc->spdif_out_get_status(atc, &status); if (status == 0) status = SNDRV_PCM_DEFAULT_CON_SPDIF; ucontrol->value.i...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int ct_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ct_atc *atc = snd_kcontrol_chip(kcontrol); int change; unsigned int status, old_status; status = (ucontrol->value.iec958.status[0] << 0) | (ucontrol->value.iec958.status[1] <...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int ct_mixer_get_mem(struct ct_mixer **rmixer) { struct ct_mixer *mixer; int err; *rmixer = NULL; mixer = kzalloc(sizeof(*mixer), GFP_KERNEL); if (!mixer) return -ENOMEM; mixer->amixers = kcalloc(NUM_CT_AMIXERS * CHN_NUM, sizeof(void *), GFP_KERNEL); if (!mixer->amixers) { err = -E...
[ 1, 0 ]
Linux Kernel
sound/pci/ctxfi/ctmixer.c
static int mixer_get_output_ports(struct ct_mixer *mixer, enum MIXER_PORT_T type, struct rsc **rleft, struct rsc **rright) { enum CT_AMIXER_CTL amix = port_to_amixer(type); if (NULL != rleft) *rleft = &((struct amixer *)mixer->amixers[amix * ...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctpcm.c
static void ct_atc_pcm_interrupt(struct ct_atc_pcm *atc_pcm) { struct ct_atc_pcm *apcm = atc_pcm; if (!apcm->substream) return; snd_pcm_period_elapsed(apcm->substream); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctpcm.c
static int ct_pcm_playback_open(struct snd_pcm_substream *substream) { struct ct_atc *atc = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct ct_atc_pcm *apcm; int err; apcm = kzalloc(sizeof(*apcm), GFP_KERNEL); if (!apcm) return -ENOMEM; apcm->substream...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctresource.c
int mgr_get_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int *ridx) { int err; if (n > mgr->avail) return -ENOENT; err = get_resource(mgr->rscs, mgr->amount, n, ridx); if (!err) mgr->avail -= n; return err; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctresource.c
static void rsc_next_conj(struct rsc *rsc) { unsigned int i; for (i = 0; (i < 8) && (!(rsc->msr & (0x1 << i)));) i++; rsc->conj += (AUDIO_SLOT_BLOCK_NUM >> i); }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctresource.c
int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type, unsigned int amount, struct hw *hw) { int err = 0; mgr->type = NUM_RSCTYP; mgr->rscs = kzalloc(DIV_ROUND_UP(amount, 8), GFP_KERNEL); if (!mgr->rscs) return -ENOMEM; switch (type) { case SRC: err = hw->src_mgr_get_ctrl_blk(&...
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_set_state(struct src *src, unsigned int state) { struct hw *hw; hw = src->rsc.hw; hw->src_set_state(src->rsc.ctrl_blk, state); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_set_bm(struct src *src, unsigned int bm) { struct hw *hw; hw = src->rsc.hw; hw->src_set_bm(src->rsc.ctrl_blk, bm); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ctxfi/ctsrc.c
static int src_set_rom(struct src *src, unsigned int rom) { struct hw *hw; hw = src->rsc.hw; hw->src_set_rom(src->rsc.ctrl_blk, rom); return 0; }
[ 0, 0 ]