Lines Matching refs:mgr

197 			   struct amixer_mgr *mgr)  in amixer_rsc_init()  argument
202 AMIXER, desc->msr, mgr->mgr.hw); in amixer_rsc_init()
227 static int get_amixer_rsc(struct amixer_mgr *mgr, in get_amixer_rsc() argument
246 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_amixer_rsc()
248 err = mgr_get_resource(&mgr->mgr, 1, &idx); in get_amixer_rsc()
254 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_amixer_rsc()
256 dev_err(mgr->card->dev, in get_amixer_rsc()
261 err = amixer_rsc_init(amixer, desc, mgr); in get_amixer_rsc()
270 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_amixer_rsc()
272 mgr_put_resource(&mgr->mgr, 1, amixer->idx[i]); in get_amixer_rsc()
274 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_amixer_rsc()
279 static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer) in put_amixer_rsc() argument
284 spin_lock_irqsave(&mgr->mgr_lock, flags); in put_amixer_rsc()
286 mgr_put_resource(&mgr->mgr, 1, amixer->idx[i]); in put_amixer_rsc()
288 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in put_amixer_rsc()
305 err = rsc_mgr_init(&amixer_mgr->mgr, AMIXER, AMIXER_RESOURCE_NUM, hw); in amixer_mgr_create()
326 rsc_mgr_uninit(&amixer_mgr->mgr); in amixer_mgr_destroy()
363 struct sum_mgr *mgr) in sum_rsc_init() argument
367 err = rsc_init(&sum->rsc, sum->idx[0], SUM, desc->msr, mgr->mgr.hw); in sum_rsc_init()
382 static int get_sum_rsc(struct sum_mgr *mgr, in get_sum_rsc() argument
400 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_sum_rsc()
402 err = mgr_get_resource(&mgr->mgr, 1, &idx); in get_sum_rsc()
408 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_sum_rsc()
410 dev_err(mgr->card->dev, in get_sum_rsc()
415 err = sum_rsc_init(sum, desc, mgr); in get_sum_rsc()
424 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_sum_rsc()
426 mgr_put_resource(&mgr->mgr, 1, sum->idx[i]); in get_sum_rsc()
428 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_sum_rsc()
433 static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) in put_sum_rsc() argument
438 spin_lock_irqsave(&mgr->mgr_lock, flags); in put_sum_rsc()
440 mgr_put_resource(&mgr->mgr, 1, sum->idx[i]); in put_sum_rsc()
442 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in put_sum_rsc()
459 err = rsc_mgr_init(&sum_mgr->mgr, SUM, SUM_RESOURCE_NUM, hw); in sum_mgr_create()
480 rsc_mgr_uninit(&sum_mgr->mgr); in sum_mgr_destroy()