Lines Matching refs:rsc
102 static int rsc_index(const struct rsc *rsc) in rsc_index() argument
104 return rsc->conj; in rsc_index()
107 static int audio_ring_slot(const struct rsc *rsc) in audio_ring_slot() argument
109 return (rsc->conj << 4) + offset_in_audio_slot_block[rsc->type]; in audio_ring_slot()
112 static void rsc_next_conj(struct rsc *rsc) in rsc_next_conj() argument
115 for (i = 0; (i < 8) && (!(rsc->msr & (0x1 << i))); ) in rsc_next_conj()
117 rsc->conj += (AUDIO_SLOT_BLOCK_NUM >> i); in rsc_next_conj()
120 static void rsc_master(struct rsc *rsc) in rsc_master() argument
122 rsc->conj = rsc->idx; in rsc_master()
133 rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, struct hw *hw) in rsc_init() argument
137 rsc->idx = idx; in rsc_init()
138 rsc->conj = idx; in rsc_init()
139 rsc->type = type; in rsc_init()
140 rsc->msr = msr; in rsc_init()
141 rsc->hw = hw; in rsc_init()
142 rsc->ops = &rsc_generic_ops; in rsc_init()
144 rsc->ctrl_blk = NULL; in rsc_init()
150 err = hw->src_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
153 err = hw->amixer_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
174 int rsc_uninit(struct rsc *rsc) in rsc_uninit() argument
176 if ((NULL != rsc->hw) && (NULL != rsc->ctrl_blk)) { in rsc_uninit()
177 switch (rsc->type) { in rsc_uninit()
179 rsc->hw->src_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
182 rsc->hw->amixer_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
188 dev_err(((struct hw *)rsc->hw)->card->dev, in rsc_uninit()
190 rsc->type); in rsc_uninit()
194 rsc->hw = rsc->ctrl_blk = NULL; in rsc_uninit()
197 rsc->idx = rsc->conj = 0; in rsc_uninit()
198 rsc->type = NUM_RSCTYP; in rsc_uninit()
199 rsc->msr = 0; in rsc_uninit()