• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/sound/pci/ctxfi/

Lines Matching refs:dao

148 static int dao_rsc_reinit(struct dao *dao, const struct dao_desc *desc);
150 static int dao_spdif_get_spos(struct dao *dao, unsigned int *spos)
152 ((struct hw *)dao->hw)->dao_get_spos(dao->ctrl_blk, spos);
156 static int dao_spdif_set_spos(struct dao *dao, unsigned int spos)
158 ((struct hw *)dao->hw)->dao_set_spos(dao->ctrl_blk, spos);
162 static int dao_commit_write(struct dao *dao)
164 ((struct hw *)dao->hw)->dao_commit_write(dao->hw,
165 daio_device_index(dao->daio.type, dao->hw), dao->ctrl_blk);
169 static int dao_set_left_input(struct dao *dao, struct rsc *input)
172 struct daio *daio = &dao->daio;
185 dao->mgr->imap_add(dao->mgr, entry);
186 dao->imappers[i] = entry;
197 static int dao_set_right_input(struct dao *dao, struct rsc *input)
200 struct daio *daio = &dao->daio;
213 dao->mgr->imap_add(dao->mgr, entry);
214 dao->imappers[daio->rscl.msr + i] = entry;
225 static int dao_clear_left_input(struct dao *dao)
228 struct daio *daio = &dao->daio;
231 if (!dao->imappers[0])
234 entry = dao->imappers[0];
235 dao->mgr->imap_delete(dao->mgr, entry);
238 entry = dao->imappers[i];
239 dao->mgr->imap_delete(dao->mgr, entry);
240 dao->imappers[i] = NULL;
243 kfree(dao->imappers[0]);
244 dao->imappers[0] = NULL;
249 static int dao_clear_right_input(struct dao *dao)
252 struct daio *daio = &dao->daio;
255 if (!dao->imappers[daio->rscl.msr])
258 entry = dao->imappers[daio->rscl.msr];
259 dao->mgr->imap_delete(dao->mgr, entry);
262 entry = dao->imappers[daio->rscl.msr + i];
263 dao->mgr->imap_delete(dao->mgr, entry);
264 dao->imappers[daio->rscl.msr + i] = NULL;
267 kfree(dao->imappers[daio->rscl.msr]);
268 dao->imappers[daio->rscl.msr] = NULL;
398 static int dao_rsc_init(struct dao *dao,
406 err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw);
410 dao->imappers = kzalloc(sizeof(void *)*desc->msr*2, GFP_KERNEL);
411 if (!dao->imappers) {
415 dao->ops = &dao_ops;
416 dao->mgr = mgr;
417 dao->hw = hw;
418 err = hw->dao_get_ctrl_blk(&dao->ctrl_blk);
423 daio_device_index(dao->daio.type, hw));
428 daio_device_index(dao->daio.type, hw), conf);
430 daio_device_index(dao->daio.type, hw));
436 kfree(dao->imappers);
437 dao->imappers = NULL;
439 daio_rsc_uninit(&dao->daio);
443 static int dao_rsc_uninit(struct dao *dao)
445 if (dao->imappers) {
446 if (dao->imappers[0])
447 dao_clear_left_input(dao);
449 if (dao->imappers[dao->daio.rscl.msr])
450 dao_clear_right_input(dao);
452 kfree(dao->imappers);
453 dao->imappers = NULL;
455 ((struct hw *)dao->hw)->dao_put_ctrl_blk(dao->ctrl_blk);
456 dao->hw = dao->ctrl_blk = NULL;
457 daio_rsc_uninit(&dao->daio);
462 static int dao_rsc_reinit(struct dao *dao, const struct dao_desc *desc)
464 struct daio_mgr *mgr = dao->mgr;
467 dsc.type = dao->daio.type;
470 dao_rsc_uninit(dao);
471 return dao_rsc_init(dao, &dsc, mgr);
541 struct dao *dao = NULL;
557 dao = kzalloc(sizeof(*dao), GFP_KERNEL);
558 if (!dao) {
562 err = dao_rsc_init(dao, desc, mgr);
566 *rdaio = &dao->daio;
586 if (dao)
587 kfree(dao);
609 dao_rsc_uninit(container_of(daio, struct dao, daio));
610 kfree(container_of(daio, struct dao, daio));