Lines Matching full: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 int 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()
118 return rsc->conj; in rsc_next_conj()
121 static int rsc_master(struct rsc *rsc) in rsc_master() argument
123 return rsc->conj = rsc->idx; in rsc_master()
134 rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, struct hw *hw) in rsc_init() argument
138 rsc->idx = idx; in rsc_init()
139 rsc->conj = idx; in rsc_init()
140 rsc->type = type; in rsc_init()
141 rsc->msr = msr; in rsc_init()
142 rsc->hw = hw; in rsc_init()
143 rsc->ops = &rsc_generic_ops; in rsc_init()
145 rsc->ctrl_blk = NULL; in rsc_init()
151 err = hw->src_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
154 err = hw->amixer_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
175 int rsc_uninit(struct rsc *rsc) in rsc_uninit() argument
177 if ((NULL != rsc->hw) && (NULL != rsc->ctrl_blk)) { in rsc_uninit()
178 switch (rsc->type) { in rsc_uninit()
180 rsc->hw->src_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
183 rsc->hw->amixer_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
189 dev_err(((struct hw *)rsc->hw)->card->dev, in rsc_uninit()
191 rsc->type); in rsc_uninit()
195 rsc->hw = rsc->ctrl_blk = NULL; in rsc_uninit()
198 rsc->idx = rsc->conj = 0; in rsc_uninit()
199 rsc->type = NUM_RSCTYP; in rsc_uninit()
200 rsc->msr = 0; in rsc_uninit()