Lines Matching refs:rsc

106 static int rsc_index(const struct rsc *rsc)  in rsc_index()  argument
108 return rsc->conj; in rsc_index()
111 static int audio_ring_slot(const struct rsc *rsc) in audio_ring_slot() argument
113 return (rsc->conj << 4) + offset_in_audio_slot_block[rsc->type]; in audio_ring_slot()
116 static int rsc_next_conj(struct rsc *rsc) in rsc_next_conj() argument
119 for (i = 0; (i < 8) && (!(rsc->msr & (0x1 << i))); ) in rsc_next_conj()
121 rsc->conj += (AUDIO_SLOT_BLOCK_NUM >> i); in rsc_next_conj()
122 return rsc->conj; in rsc_next_conj()
125 static int rsc_master(struct rsc *rsc) in rsc_master() argument
127 return rsc->conj = rsc->idx; in rsc_master()
138 rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, struct hw *hw) in rsc_init() argument
142 rsc->idx = idx; in rsc_init()
143 rsc->conj = idx; in rsc_init()
144 rsc->type = type; in rsc_init()
145 rsc->msr = msr; in rsc_init()
146 rsc->hw = hw; in rsc_init()
147 rsc->ops = &rsc_generic_ops; in rsc_init()
149 rsc->ctrl_blk = NULL; in rsc_init()
155 err = hw->src_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
158 err = hw->amixer_rsc_get_ctrl_blk(&rsc->ctrl_blk); in rsc_init()
179 int rsc_uninit(struct rsc *rsc) in rsc_uninit() argument
181 if ((NULL != rsc->hw) && (NULL != rsc->ctrl_blk)) { in rsc_uninit()
182 switch (rsc->type) { in rsc_uninit()
184 rsc->hw->src_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
187 rsc->hw->amixer_rsc_put_ctrl_blk(rsc->ctrl_blk); in rsc_uninit()
193 dev_err(((struct hw *)rsc->hw)->card->dev, in rsc_uninit()
195 rsc->type); in rsc_uninit()
199 rsc->hw = rsc->ctrl_blk = NULL; in rsc_uninit()
202 rsc->idx = rsc->conj = 0; in rsc_uninit()
203 rsc->type = NUM_RSCTYP; in rsc_uninit()
204 rsc->msr = 0; in rsc_uninit()