Searched refs:dsp (Results 1 - 200 of 215) sorted by relevance

12

/linux-4.4.14/drivers/isdn/mISDN/
H A Ddsp_cmx.c132 #include "dsp.h"
159 dsp_cmx_debug(struct dsp *dsp) dsp_cmx_debug() argument
163 struct dsp *odsp; dsp_cmx_debug()
172 if (dsp == odsp) dsp_cmx_debug()
184 member->dsp->name, member->dsp->pcm_slot_tx, dsp_cmx_debug()
185 member->dsp->pcm_bank_tx, member->dsp->pcm_slot_rx, dsp_cmx_debug()
186 member->dsp->pcm_bank_rx, member->dsp->hfc_conf, dsp_cmx_debug()
187 member->dsp->tx_data, member->dsp->rx_is_off, dsp_cmx_debug()
188 (member->dsp == dsp) ? " *this*" : ""); dsp_cmx_debug()
220 dsp_cmx_add_conf_member(struct dsp *dsp, struct dsp_conf *conf) dsp_cmx_add_conf_member() argument
224 if (!conf || !dsp) { dsp_cmx_add_conf_member()
225 printk(KERN_WARNING "%s: conf or dsp is 0.\n", __func__); dsp_cmx_add_conf_member()
228 if (dsp->member) { dsp_cmx_add_conf_member()
229 printk(KERN_WARNING "%s: dsp is already member in a conf.\n", dsp_cmx_add_conf_member()
234 if (dsp->conf) { dsp_cmx_add_conf_member()
235 printk(KERN_WARNING "%s: dsp is already in a conf.\n", dsp_cmx_add_conf_member()
245 member->dsp = dsp; dsp_cmx_add_conf_member()
247 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff)); dsp_cmx_add_conf_member()
248 dsp->rx_init = 1; /* rx_W and rx_R will be adjusted on first frame */ dsp_cmx_add_conf_member()
249 dsp->rx_W = 0; dsp_cmx_add_conf_member()
250 dsp->rx_R = 0; dsp_cmx_add_conf_member()
254 dsp->conf = conf; dsp_cmx_add_conf_member()
255 dsp->member = member; dsp_cmx_add_conf_member()
265 dsp_cmx_del_conf_member(struct dsp *dsp) dsp_cmx_del_conf_member() argument
269 if (!dsp) { dsp_cmx_del_conf_member()
270 printk(KERN_WARNING "%s: dsp is 0.\n", dsp_cmx_del_conf_member()
275 if (!dsp->conf) { dsp_cmx_del_conf_member()
276 printk(KERN_WARNING "%s: dsp is not in a conf.\n", dsp_cmx_del_conf_member()
281 if (list_empty(&dsp->conf->mlist)) { dsp_cmx_del_conf_member()
282 printk(KERN_WARNING "%s: dsp has linked an empty conf.\n", dsp_cmx_del_conf_member()
288 list_for_each_entry(member, &dsp->conf->mlist, list) { dsp_cmx_del_conf_member()
289 if (member->dsp == dsp) { dsp_cmx_del_conf_member()
291 dsp->conf = NULL; dsp_cmx_del_conf_member()
292 dsp->member = NULL; dsp_cmx_del_conf_member()
298 "%s: dsp is not present in its own conf_member list.\n", dsp_cmx_del_conf_member()
361 dsp_cmx_hw_message(struct dsp *dsp, u32 message, u32 param1, u32 param2, dsp_cmx_hw_message() argument
370 if (dsp->ch.peer) dsp_cmx_hw_message()
371 dsp->ch.peer->ctrl(dsp->ch.peer, CONTROL_CHANNEL, &cq); dsp_cmx_hw_message()
378 * either a conference or a dsp instance can be given
379 * if only dsp instance is given, the instance is not associated with a conf
380 * and therefore removed. if a conference is given, the dsp is expected to
384 dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp) dsp_cmx_hardware() argument
387 struct dsp *finddsp; dsp_cmx_hardware()
394 /* dsp gets updated (no conf) */ dsp_cmx_hardware()
396 if (!dsp) dsp_cmx_hardware()
399 printk(KERN_DEBUG "%s checking dsp %s\n", dsp_cmx_hardware()
400 __func__, dsp->name); dsp_cmx_hardware()
403 if (dsp->hfc_conf >= 0) { dsp_cmx_hardware()
407 "because dsp is split\n", __func__, dsp_cmx_hardware()
408 dsp->name, dsp->hfc_conf); dsp_cmx_hardware()
409 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_CONF_SPLIT, dsp_cmx_hardware()
411 dsp->hfc_conf = -1; dsp_cmx_hardware()
414 if (dsp->features.pcm_banks < 1) dsp_cmx_hardware()
416 if (!dsp->echo.software && !dsp->echo.hardware) { dsp_cmx_hardware()
418 if (dsp->pcm_slot_tx >= 0 || dsp->pcm_slot_rx >= 0) { dsp_cmx_hardware()
422 " dsp is split (no echo)\n", dsp_cmx_hardware()
423 __func__, dsp->name, dsp_cmx_hardware()
424 dsp->pcm_slot_tx, dsp->pcm_slot_rx); dsp_cmx_hardware()
425 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_DISC, dsp_cmx_hardware()
427 dsp->pcm_slot_tx = -1; dsp_cmx_hardware()
428 dsp->pcm_bank_tx = -1; dsp_cmx_hardware()
429 dsp->pcm_slot_rx = -1; dsp_cmx_hardware()
430 dsp->pcm_bank_rx = -1; dsp_cmx_hardware()
435 dsp->echo.software = dsp->tx_data; dsp_cmx_hardware()
436 dsp->echo.hardware = 0; dsp_cmx_hardware()
438 if (dsp->pcm_slot_tx >= 0 && dsp->pcm_slot_rx < 0 && dsp_cmx_hardware()
439 dsp->pcm_bank_tx == 2 && dsp->pcm_bank_rx == 2) { dsp_cmx_hardware()
440 dsp->echo.hardware = 1; dsp_cmx_hardware()
444 if (dsp->pcm_slot_tx >= 0) { dsp_cmx_hardware()
445 dsp->pcm_slot_rx = dsp->pcm_slot_tx; dsp_cmx_hardware()
446 dsp->pcm_bank_tx = 2; /* 2 means loop */ dsp_cmx_hardware()
447 dsp->pcm_bank_rx = 2; dsp_cmx_hardware()
451 __func__, dsp->name, dsp_cmx_hardware()
452 dsp->pcm_slot_tx); dsp_cmx_hardware()
453 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
454 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2); dsp_cmx_hardware()
455 dsp->echo.hardware = 1; dsp_cmx_hardware()
459 dsp->pcm_slot_tx = -1; dsp_cmx_hardware()
460 dsp->pcm_slot_rx = -1; dsp_cmx_hardware()
463 if (finddsp->features.pcm_id == dsp->features.pcm_id) { dsp_cmx_hardware()
473 ii = dsp->features.pcm_slots; dsp_cmx_hardware()
485 dsp->echo.software = 1; dsp_cmx_hardware()
489 dsp->pcm_slot_tx = i; dsp_cmx_hardware()
490 dsp->pcm_slot_rx = i; dsp_cmx_hardware()
491 dsp->pcm_bank_tx = 2; /* loop */ dsp_cmx_hardware()
492 dsp->pcm_bank_rx = 2; dsp_cmx_hardware()
496 __func__, dsp->name, dsp->pcm_slot_tx); dsp_cmx_hardware()
497 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
498 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2); dsp_cmx_hardware()
499 dsp->echo.hardware = 1; dsp_cmx_hardware()
514 same_hfc = member->dsp->features.hfc_id; dsp_cmx_hardware()
515 same_pcm = member->dsp->features.pcm_id; dsp_cmx_hardware()
519 if (member->dsp->tx_mix) { dsp_cmx_hardware()
522 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
524 member->dsp->name); dsp_cmx_hardware()
527 dsp = member->dsp; dsp_cmx_hardware()
529 if (dsp->hfc_conf >= 0) { dsp_cmx_hardware()
536 dsp->name, dsp_cmx_hardware()
537 dsp->hfc_conf); dsp_cmx_hardware()
538 dsp_cmx_hw_message(dsp, dsp_cmx_hardware()
541 dsp->hfc_conf = -1; dsp_cmx_hardware()
544 if (dsp->pcm_slot_tx >= 0 || dsp_cmx_hardware()
545 dsp->pcm_slot_rx >= 0) { dsp_cmx_hardware()
552 dsp->name, dsp_cmx_hardware()
553 dsp->pcm_slot_tx, dsp_cmx_hardware()
554 dsp->pcm_slot_rx); dsp_cmx_hardware()
555 dsp_cmx_hw_message(dsp, dsp_cmx_hardware()
558 dsp->pcm_slot_tx = -1; dsp_cmx_hardware()
559 dsp->pcm_bank_tx = -1; dsp_cmx_hardware()
560 dsp->pcm_slot_rx = -1; dsp_cmx_hardware()
561 dsp->pcm_bank_rx = -1; dsp_cmx_hardware()
569 if (member->dsp->echo.hardware || member->dsp->echo.software) { dsp_cmx_hardware()
572 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
574 member->dsp->name); dsp_cmx_hardware()
578 if (member->dsp->tx_mix) { dsp_cmx_hardware()
581 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
583 __func__, member->dsp->name); dsp_cmx_hardware()
587 if (member->dsp->tx_volume) { dsp_cmx_hardware()
590 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
592 __func__, member->dsp->name); dsp_cmx_hardware()
595 if (member->dsp->rx_volume) { dsp_cmx_hardware()
598 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
600 __func__, member->dsp->name); dsp_cmx_hardware()
604 if (member->dsp->tx_data) { dsp_cmx_hardware()
607 "%s dsp %s tx_data is turned on\n", dsp_cmx_hardware()
608 __func__, member->dsp->name); dsp_cmx_hardware()
612 if (member->dsp->pipeline.inuse) { dsp_cmx_hardware()
615 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
617 member->dsp->name); dsp_cmx_hardware()
621 if (member->dsp->bf_enable) { dsp_cmx_hardware()
623 printk(KERN_DEBUG "%s dsp %s cannot form a " dsp_cmx_hardware()
625 __func__, member->dsp->name); dsp_cmx_hardware()
629 if (member->dsp->features.pcm_id < 0) { dsp_cmx_hardware()
632 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
633 "dsp has no PCM bus\n", dsp_cmx_hardware()
634 __func__, member->dsp->name); dsp_cmx_hardware()
638 if (member->dsp->features.pcm_id != same_pcm) { dsp_cmx_hardware()
641 "%s dsp %s cannot form a conf, because " dsp_cmx_hardware()
642 "dsp is on a different PCM bus than the " dsp_cmx_hardware()
643 "first dsp\n", dsp_cmx_hardware()
644 __func__, member->dsp->name); dsp_cmx_hardware()
648 if (same_hfc != member->dsp->features.hfc_id) dsp_cmx_hardware()
651 if (current_conf < 0 && member->dsp->hfc_conf >= 0) dsp_cmx_hardware()
652 current_conf = member->dsp->hfc_conf; dsp_cmx_hardware()
654 if (member->dsp->hfc_conf < 0) dsp_cmx_hardware()
669 "because dsp is alone\n", __func__, conf->id); dsp_cmx_hardware()
674 dsp = member->dsp; dsp_cmx_hardware()
691 if (member->dsp->hfc_conf >= 0) { dsp_cmx_hardware()
696 __func__, member->dsp->name, dsp_cmx_hardware()
697 member->dsp->hfc_conf); dsp_cmx_hardware()
698 dsp_cmx_hw_message(member->dsp, dsp_cmx_hardware()
700 member->dsp->hfc_conf = -1; dsp_cmx_hardware()
702 if (nextm->dsp->hfc_conf >= 0) { dsp_cmx_hardware()
707 __func__, nextm->dsp->name, dsp_cmx_hardware()
708 nextm->dsp->hfc_conf); dsp_cmx_hardware()
709 dsp_cmx_hw_message(nextm->dsp, dsp_cmx_hardware()
711 nextm->dsp->hfc_conf = -1; dsp_cmx_hardware()
714 if (member->dsp->features.pcm_banks > 1 && dsp_cmx_hardware()
715 nextm->dsp->features.pcm_banks > 1 && dsp_cmx_hardware()
716 member->dsp->features.hfc_id != dsp_cmx_hardware()
717 nextm->dsp->features.hfc_id) { dsp_cmx_hardware()
719 if (member->dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
720 member->dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
721 nextm->dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
722 nextm->dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
723 nextm->dsp->pcm_slot_tx == dsp_cmx_hardware()
724 member->dsp->pcm_slot_rx && dsp_cmx_hardware()
725 nextm->dsp->pcm_slot_rx == dsp_cmx_hardware()
726 member->dsp->pcm_slot_tx && dsp_cmx_hardware()
727 nextm->dsp->pcm_slot_tx == dsp_cmx_hardware()
728 member->dsp->pcm_slot_tx && dsp_cmx_hardware()
729 member->dsp->pcm_bank_tx != dsp_cmx_hardware()
730 member->dsp->pcm_bank_rx && dsp_cmx_hardware()
731 nextm->dsp->pcm_bank_tx != dsp_cmx_hardware()
732 nextm->dsp->pcm_bank_rx) { dsp_cmx_hardware()
736 "%s dsp %s & %s stay joined on " dsp_cmx_hardware()
740 member->dsp->name, dsp_cmx_hardware()
741 nextm->dsp->name, dsp_cmx_hardware()
742 member->dsp->pcm_slot_tx, dsp_cmx_hardware()
743 member->dsp->pcm_bank_tx, dsp_cmx_hardware()
744 member->dsp->pcm_bank_rx); dsp_cmx_hardware()
751 list_for_each_entry(dsp, &dsp_ilist, list) { dsp_cmx_hardware()
752 if (dsp != member->dsp && dsp_cmx_hardware()
753 dsp != nextm->dsp && dsp_cmx_hardware()
754 member->dsp->features.pcm_id == dsp_cmx_hardware()
755 dsp->features.pcm_id) { dsp_cmx_hardware()
756 if (dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
757 dsp->pcm_slot_rx < dsp_cmx_hardware()
759 freeslots[dsp->pcm_slot_rx] = 0; dsp_cmx_hardware()
760 if (dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
761 dsp->pcm_slot_tx < dsp_cmx_hardware()
763 freeslots[dsp->pcm_slot_tx] = 0; dsp_cmx_hardware()
767 ii = member->dsp->features.pcm_slots; dsp_cmx_hardware()
778 member->dsp->name, dsp_cmx_hardware()
779 nextm->dsp->name); dsp_cmx_hardware()
784 member->dsp->pcm_slot_tx = i; dsp_cmx_hardware()
785 member->dsp->pcm_slot_rx = i; dsp_cmx_hardware()
786 nextm->dsp->pcm_slot_tx = i; dsp_cmx_hardware()
787 nextm->dsp->pcm_slot_rx = i; dsp_cmx_hardware()
788 member->dsp->pcm_bank_rx = 0; dsp_cmx_hardware()
789 member->dsp->pcm_bank_tx = 1; dsp_cmx_hardware()
790 nextm->dsp->pcm_bank_rx = 1; dsp_cmx_hardware()
791 nextm->dsp->pcm_bank_tx = 0; dsp_cmx_hardware()
798 member->dsp->name, dsp_cmx_hardware()
799 nextm->dsp->name, dsp_cmx_hardware()
800 member->dsp->pcm_slot_tx); dsp_cmx_hardware()
801 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
802 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx, dsp_cmx_hardware()
803 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx); dsp_cmx_hardware()
804 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
805 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx, dsp_cmx_hardware()
806 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx); dsp_cmx_hardware()
813 if (member->dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
814 member->dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
815 nextm->dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
816 nextm->dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
817 nextm->dsp->pcm_slot_tx == dsp_cmx_hardware()
818 member->dsp->pcm_slot_rx && dsp_cmx_hardware()
819 nextm->dsp->pcm_slot_rx == dsp_cmx_hardware()
820 member->dsp->pcm_slot_tx && dsp_cmx_hardware()
821 member->dsp->pcm_slot_tx != dsp_cmx_hardware()
822 member->dsp->pcm_slot_rx && dsp_cmx_hardware()
823 member->dsp->pcm_bank_tx == 0 && dsp_cmx_hardware()
824 member->dsp->pcm_bank_rx == 0 && dsp_cmx_hardware()
825 nextm->dsp->pcm_bank_tx == 0 && dsp_cmx_hardware()
826 nextm->dsp->pcm_bank_rx == 0) { dsp_cmx_hardware()
830 "%s dsp %s & %s stay joined on PCM " dsp_cmx_hardware()
833 member->dsp->name, dsp_cmx_hardware()
834 nextm->dsp->name, dsp_cmx_hardware()
835 member->dsp->pcm_slot_tx, dsp_cmx_hardware()
836 member->dsp->pcm_slot_rx); dsp_cmx_hardware()
843 list_for_each_entry(dsp, &dsp_ilist, list) { dsp_cmx_hardware()
844 if (dsp != member->dsp && dsp_cmx_hardware()
845 dsp != nextm->dsp && dsp_cmx_hardware()
846 member->dsp->features.pcm_id == dsp_cmx_hardware()
847 dsp->features.pcm_id) { dsp_cmx_hardware()
848 if (dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
849 dsp->pcm_slot_rx < dsp_cmx_hardware()
851 freeslots[dsp->pcm_slot_rx] = 0; dsp_cmx_hardware()
852 if (dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
853 dsp->pcm_slot_tx < dsp_cmx_hardware()
855 freeslots[dsp->pcm_slot_tx] = 0; dsp_cmx_hardware()
859 ii = member->dsp->features.pcm_slots; dsp_cmx_hardware()
870 member->dsp->name, dsp_cmx_hardware()
871 nextm->dsp->name); dsp_cmx_hardware()
887 member->dsp->name, dsp_cmx_hardware()
888 nextm->dsp->name); dsp_cmx_hardware()
893 member->dsp->pcm_slot_tx = i1; dsp_cmx_hardware()
894 member->dsp->pcm_slot_rx = i2; dsp_cmx_hardware()
895 nextm->dsp->pcm_slot_tx = i2; dsp_cmx_hardware()
896 nextm->dsp->pcm_slot_rx = i1; dsp_cmx_hardware()
897 member->dsp->pcm_bank_rx = 0; dsp_cmx_hardware()
898 member->dsp->pcm_bank_tx = 0; dsp_cmx_hardware()
899 nextm->dsp->pcm_bank_rx = 0; dsp_cmx_hardware()
900 nextm->dsp->pcm_bank_tx = 0; dsp_cmx_hardware()
907 member->dsp->name, dsp_cmx_hardware()
908 nextm->dsp->name, dsp_cmx_hardware()
909 member->dsp->pcm_slot_tx, dsp_cmx_hardware()
910 member->dsp->pcm_slot_rx); dsp_cmx_hardware()
911 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
912 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx, dsp_cmx_hardware()
913 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx); dsp_cmx_hardware()
914 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
915 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx, dsp_cmx_hardware()
916 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx); dsp_cmx_hardware()
956 if (!member->dsp->features.hfc_conf) dsp_cmx_hardware()
959 if (member->dsp->hdlc) dsp_cmx_hardware()
962 if (member->dsp->hfc_conf == current_conf) dsp_cmx_hardware()
966 list_for_each_entry(dsp, &dsp_ilist, list) { dsp_cmx_hardware()
972 dsp != member->dsp && dsp_cmx_hardware()
973 /* dsp must be on the same PCM */ dsp_cmx_hardware()
974 member->dsp->features.pcm_id == dsp_cmx_hardware()
975 dsp->features.pcm_id) { dsp_cmx_hardware()
976 /* dsp must be on a slot */ dsp_cmx_hardware()
977 if (dsp->pcm_slot_tx >= 0 && dsp_cmx_hardware()
978 dsp->pcm_slot_tx < dsp_cmx_hardware()
980 freeslots[dsp->pcm_slot_tx] = 0; dsp_cmx_hardware()
981 if (dsp->pcm_slot_rx >= 0 && dsp_cmx_hardware()
982 dsp->pcm_slot_rx < dsp_cmx_hardware()
984 freeslots[dsp->pcm_slot_rx] = 0; dsp_cmx_hardware()
988 ii = member->dsp->features.pcm_slots; dsp_cmx_hardware()
1005 "%s changing dsp %s to HW conference " dsp_cmx_hardware()
1007 member->dsp->name, current_conf, i); dsp_cmx_hardware()
1009 member->dsp->pcm_slot_tx = i; dsp_cmx_hardware()
1010 member->dsp->pcm_slot_rx = i; dsp_cmx_hardware()
1011 member->dsp->pcm_bank_tx = 2; /* loop */ dsp_cmx_hardware()
1012 member->dsp->pcm_bank_rx = 2; dsp_cmx_hardware()
1013 member->dsp->hfc_conf = current_conf; dsp_cmx_hardware()
1014 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN, dsp_cmx_hardware()
1016 dsp_cmx_hw_message(member->dsp, dsp_cmx_hardware()
1028 list_for_each_entry(dsp, &dsp_ilist, list) { dsp_cmx_hardware()
1029 /* dsp must be on the same chip */ dsp_cmx_hardware()
1030 if (dsp->features.hfc_id == same_hfc && dsp_cmx_hardware()
1031 /* dsp must have joined a HW conference */ dsp_cmx_hardware()
1032 dsp->hfc_conf >= 0 && dsp_cmx_hardware()
1034 dsp->hfc_conf < 8) dsp_cmx_hardware()
1035 freeunits[dsp->hfc_conf] = 0; dsp_cmx_hardware()
1064 dsp_cmx_conf(struct dsp *dsp, u32 conf_id) dsp_cmx_conf() argument
1071 if (dsp->conf_id == conf_id) dsp_cmx_conf()
1075 if (dsp->conf_id) { dsp_cmx_conf()
1078 dsp->conf->id); dsp_cmx_conf()
1080 conf = dsp->conf; dsp_cmx_conf()
1081 err = dsp_cmx_del_conf_member(dsp); dsp_cmx_conf()
1084 dsp->conf_id = 0; dsp_cmx_conf()
1087 dsp_cmx_hardware(NULL, dsp); dsp_cmx_conf()
1123 if (dsp->hdlc && !member->dsp->hdlc) { dsp_cmx_conf()
1129 if (!dsp->hdlc && member->dsp->hdlc) { dsp_cmx_conf()
1137 err = dsp_cmx_add_conf_member(dsp, conf); dsp_cmx_conf()
1140 dsp->conf_id = conf_id; dsp_cmx_conf()
1148 dsp_cmx_hardware(NULL, dsp); dsp_cmx_conf()
1161 showdelay(struct dsp *dsp, int samples, int delay) showdelay() argument
1173 printk(KERN_DEBUG "DELAY (%s) %3d >%s\n", dsp->name, delay, showdelay()
1182 dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb) dsp_cmx_receive() argument
1206 if (dsp->rx_init) { dsp_cmx_receive()
1207 dsp->rx_init = 0; dsp_cmx_receive()
1208 if (dsp->features.unordered) { dsp_cmx_receive()
1209 dsp->rx_R = (hh->id & CMX_BUFF_MASK); dsp_cmx_receive()
1210 if (dsp->cmx_delay) dsp_cmx_receive()
1211 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay) dsp_cmx_receive()
1214 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1)) dsp_cmx_receive()
1217 dsp->rx_R = 0; dsp_cmx_receive()
1218 if (dsp->cmx_delay) dsp_cmx_receive()
1219 dsp->rx_W = dsp->cmx_delay; dsp_cmx_receive()
1221 dsp->rx_W = dsp_poll >> 1; dsp_cmx_receive()
1225 if (dsp->features.unordered) { dsp_cmx_receive()
1226 dsp->rx_W = (hh->id & CMX_BUFF_MASK); dsp_cmx_receive()
1227 /* printk(KERN_DEBUG "%s %08x\n", dsp->name, hh->id); */ dsp_cmx_receive()
1233 if (((dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK) >= CMX_BUFF_HALF) { dsp_cmx_receive()
1236 "cmx_receive(dsp=%lx): UNDERRUN (or overrun the " dsp_cmx_receive()
1238 "(inst %s)\n", (u_long)dsp, dsp->name); dsp_cmx_receive()
1240 if (dsp->features.unordered) { dsp_cmx_receive()
1241 dsp->rx_R = (hh->id & CMX_BUFF_MASK); dsp_cmx_receive()
1242 if (dsp->cmx_delay) dsp_cmx_receive()
1243 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay) dsp_cmx_receive()
1246 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1)) dsp_cmx_receive()
1249 dsp->rx_R = 0; dsp_cmx_receive()
1250 if (dsp->cmx_delay) dsp_cmx_receive()
1251 dsp->rx_W = dsp->cmx_delay; dsp_cmx_receive()
1253 dsp->rx_W = dsp_poll >> 1; dsp_cmx_receive()
1255 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff)); dsp_cmx_receive()
1258 if (dsp->cmx_delay) dsp_cmx_receive()
1259 if (((dsp->rx_W - dsp->rx_R) & CMX_BUFF_MASK) >= dsp_cmx_receive()
1260 (dsp->cmx_delay << 1)) { dsp_cmx_receive()
1263 "cmx_receive(dsp=%lx): OVERRUN (because " dsp_cmx_receive()
1266 (u_long)dsp, dsp->name); dsp_cmx_receive()
1268 if (dsp->features.unordered) { dsp_cmx_receive()
1269 dsp->rx_R = (hh->id & CMX_BUFF_MASK); dsp_cmx_receive()
1270 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay) dsp_cmx_receive()
1273 dsp->rx_R = 0; dsp_cmx_receive()
1274 dsp->rx_W = dsp->cmx_delay; dsp_cmx_receive()
1276 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff)); dsp_cmx_receive()
1282 "cmx_receive(dsp=%lx): rx_R(dsp)=%05x rx_W(dsp)=%05x len=%d %s\n", dsp_cmx_receive()
1283 (u_long)dsp, dsp->rx_R, dsp->rx_W, len, dsp->name); dsp_cmx_receive()
1288 d = dsp->rx_buff; dsp_cmx_receive()
1289 w = dsp->rx_W; dsp_cmx_receive()
1298 dsp->rx_W = ((dsp->rx_W + len) & CMX_BUFF_MASK); dsp_cmx_receive()
1300 showdelay(dsp, len, (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK); dsp_cmx_receive()
1309 dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members) argument
1311 struct dsp_conf *conf = dsp->conf;
1312 struct dsp *member, *other;
1322 if (!dsp->b_active) { /* if not active */
1323 dsp->last_tx = 0;
1326 if (((dsp->conf && dsp->conf->hardware) || /* hardware conf */
1327 dsp->echo.hardware) && /* OR hardware echo */
1328 dsp->tx_R == dsp->tx_W && /* AND no tx-data */
1329 !(dsp->tone.tone && dsp->tone.software)) { /* AND not soft tones */
1330 if (!dsp->tx_data) { /* no tx_data for user space required */
1331 dsp->last_tx = 0;
1334 if (dsp->conf && dsp->conf->software && dsp->conf->hardware)
1336 if (dsp->echo.software && dsp->echo.hardware)
1342 "SEND members=%d dsp=%s, conf=%p, rx_R=%05x rx_W=%05x\n",
1343 members, dsp->name, conf, dsp->rx_R, dsp->rx_W);
1347 if (dsp->cmx_delay && !dsp->last_tx) {
1364 dsp->last_tx = 1;
1367 member = dsp;
1368 p = dsp->tx_buff; /* transmit data */
1369 q = dsp->rx_buff; /* received data */
1371 t = dsp->tx_R; /* tx-pointers */
1372 tt = dsp->tx_W;
1373 r = dsp->rx_R; /* rx-pointers */
1383 if (dsp->tone.tone && dsp->tone.software) {
1385 dsp_tone_copy(dsp, d, len);
1386 dsp->tx_R = 0; /* clear tx buffer */
1387 dsp->tx_W = 0;
1391 if (!dsp->tx_mix && t != tt) {
1407 dsp->tx_R = t;
1421 if (!dsp->echo.software) {
1450 dsp->tx_R = t;
1461 struct dsp_conf_member, list))->dsp;
1464 struct dsp_conf_member, list))->dsp;
1471 if (!dsp->echo.software) {
1511 dsp->tx_R = t;
1516 if (!dsp->echo.software) {
1571 dsp->tx_R = t;
1579 if (dsp->tx_data) {
1584 skb_queue_tail(&dsp->sendq, nskb);
1585 schedule_work(&dsp->workq);
1601 skb_queue_tail(&dsp->sendq, txskb);
1608 if (dsp->tx_volume)
1609 dsp_change_volume(nskb, dsp->tx_volume);
1611 if (dsp->pipeline.inuse)
1612 dsp_pipeline_process_tx(&dsp->pipeline, nskb->data,
1615 if (dsp->bf_enable)
1616 dsp_bf_encrypt(dsp, nskb->data, nskb->len);
1618 skb_queue_tail(&dsp->sendq, nskb);
1619 schedule_work(&dsp->workq);
1633 struct dsp *dsp; local
1669 list_for_each_entry(dsp, &dsp_ilist, list) {
1670 if (dsp->hdlc)
1672 conf = dsp->conf;
1687 dsp_cmx_send_member(dsp, length, mixbuffer, members);
1708 if (member->dsp->hdlc)
1713 dsp = member->dsp;
1716 q = dsp->rx_buff;
1717 r = dsp->rx_R;
1729 dsp_cmx_send_member(member->dsp, length,
1736 list_for_each_entry(dsp, &dsp_ilist, list) {
1737 if (dsp->hdlc)
1739 p = dsp->rx_buff;
1740 q = dsp->tx_buff;
1741 r = dsp->rx_R;
1743 if (!dsp->rx_is_off) {
1751 dsp->rx_R = r; /* write incremented read pointer */
1755 delay = (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK;
1759 if (delay < dsp->rx_delay[0])
1760 dsp->rx_delay[0] = delay;
1762 delay = (dsp->tx_W-dsp->tx_R) & CMX_BUFF_MASK;
1766 if (delay < dsp->tx_delay[0])
1767 dsp->tx_delay[0] = delay;
1770 delay = dsp->rx_delay[0];
1773 if (delay > dsp->rx_delay[i])
1774 delay = dsp->rx_delay[i];
1782 if (delay > dsp_poll && !dsp->cmx_delay) {
1786 " dsp %s are now removed.\n",
1788 dsp->name);
1789 r = dsp->rx_R;
1798 dsp->rx_R = r;
1802 delay = dsp->tx_delay[0];
1805 if (delay > dsp->tx_delay[i])
1806 delay = dsp->tx_delay[i];
1813 if (delay > dsp_poll && dsp->tx_dejitter) {
1817 " dsp %s are now removed.\n",
1819 dsp->name);
1820 r = dsp->tx_R;
1829 dsp->tx_R = r;
1835 dsp->rx_delay[i] = dsp->rx_delay[i - 1];
1836 dsp->tx_delay[i] = dsp->tx_delay[i - 1];
1839 dsp->tx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1840 dsp->rx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1858 * audio data is transmitted from upper layer to the dsp
1861 dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb) dsp_cmx_transmit() argument
1871 w = dsp->tx_W; dsp_cmx_transmit()
1872 ww = dsp->tx_R; dsp_cmx_transmit()
1873 p = dsp->tx_buff; dsp_cmx_transmit()
1887 dsp->tx_W = ww; dsp_cmx_transmit()
1892 "cmx_transmit(dsp=%lx) %d bytes to 0x%x-0x%x. %s\n", dsp_cmx_transmit()
1893 (u_long)dsp, (ww - w) & CMX_BUFF_MASK, w, ww, dsp->name); dsp_cmx_transmit()
1918 dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb) dsp_cmx_hdlc() argument
1925 if (!dsp->b_active) dsp_cmx_hdlc()
1933 if (!dsp->conf) { dsp_cmx_hdlc()
1935 if (dsp->echo.software) { dsp_cmx_hdlc()
1941 skb_queue_tail(&dsp->sendq, nskb); dsp_cmx_hdlc()
1942 schedule_work(&dsp->workq); dsp_cmx_hdlc()
1948 if (dsp->conf->hardware) dsp_cmx_hdlc()
1950 list_for_each_entry(member, &dsp->conf->mlist, list) { dsp_cmx_hdlc()
1951 if (dsp->echo.software || member->dsp != dsp) { dsp_cmx_hdlc()
1957 skb_queue_tail(&member->dsp->sendq, nskb); dsp_cmx_hdlc()
1958 schedule_work(&member->dsp->workq); dsp_cmx_hdlc()
H A Ddsp_core.c25 * The dsp module provides layer 2 for b-channels (64kbit). It provides
98 * NOTE: The channel must be activated in order to make dsp work, even if
139 * When data is received from upper or lower layer (card), the complete dsp
163 #include "dsp.h"
181 spinlock_t dsp_lock; /* global dsp lock */
190 dsp_rx_off_member(struct dsp *dsp) dsp_rx_off_member() argument
197 if (!dsp->features_rx_off) dsp_rx_off_member()
201 if (!dsp->rx_disabled) dsp_rx_off_member()
204 else if (dsp->dtmf.software) dsp_rx_off_member()
207 else if (dsp->echo.software) dsp_rx_off_member()
210 else if (dsp->conf && dsp->conf->software) dsp_rx_off_member()
215 if (rx_off == dsp->rx_is_off) dsp_rx_off_member()
218 if (!dsp->ch.peer) { dsp_rx_off_member()
226 if (dsp->ch.peer->ctrl(dsp->ch.peer, CONTROL_CHANNEL, &cq)) { dsp_rx_off_member()
231 dsp->rx_is_off = rx_off; dsp_rx_off_member()
234 __func__, dsp->name, rx_off); dsp_rx_off_member()
237 dsp_rx_off(struct dsp *dsp) dsp_rx_off() argument
245 if (!dsp->conf) { dsp_rx_off()
246 dsp_rx_off_member(dsp); dsp_rx_off()
250 list_for_each_entry(member, &dsp->conf->mlist, list) { dsp_rx_off()
251 dsp_rx_off_member(member->dsp); dsp_rx_off()
257 dsp_fill_empty(struct dsp *dsp) dsp_fill_empty() argument
263 if (!dsp->ch.peer) { dsp_fill_empty()
272 if (dsp->ch.peer->ctrl(dsp->ch.peer, CONTROL_CHANNEL, &cq)) { dsp_fill_empty()
279 __func__, dsp->name); dsp_fill_empty()
283 dsp_control_req(struct dsp *dsp, struct mISDNhead *hh, struct sk_buff *skb) dsp_control_req() argument
301 if (dsp->hdlc) { dsp_control_req()
311 dsp->dtmf.treshold = (*(int *)data) * 10000; dsp_control_req()
313 dsp->dtmf.enable = 1; dsp_control_req()
315 dsp_dtmf_goertzel_init(dsp); dsp_control_req()
318 dsp_dtmf_hardware(dsp); dsp_control_req()
319 dsp_rx_off(dsp); dsp_control_req()
324 dsp->dtmf.enable = 0; dsp_control_req()
325 dsp->dtmf.hardware = 0; dsp_control_req()
326 dsp->dtmf.software = 0; dsp_control_req()
338 ret = dsp_cmx_conf(dsp, *((u32 *)data)); dsp_control_req()
340 dsp_rx_off(dsp); dsp_control_req()
342 dsp_cmx_debug(dsp); dsp_control_req()
348 ret = dsp_cmx_conf(dsp, 0); dsp_control_req()
351 dsp_cmx_debug(dsp); dsp_control_req()
352 dsp_rx_off(dsp); dsp_control_req()
355 if (dsp->hdlc) { dsp_control_req()
366 ret = dsp_tone(dsp, *((int *)data)); dsp_control_req()
368 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
369 dsp_rx_off(dsp); dsp_control_req()
371 if (!dsp->tone.tone) dsp_control_req()
375 if (dsp->hdlc) { dsp_control_req()
381 dsp_tone(dsp, 0); dsp_control_req()
382 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
383 dsp_rx_off(dsp); dsp_control_req()
386 dsp->rx_W = 0; dsp_control_req()
387 dsp->rx_R = 0; dsp_control_req()
390 if (dsp->hdlc) { dsp_control_req()
398 dsp->tx_volume = *((int *)data); dsp_control_req()
401 __func__, dsp->tx_volume); dsp_control_req()
402 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
403 dsp_dtmf_hardware(dsp); dsp_control_req()
404 dsp_rx_off(dsp); dsp_control_req()
407 if (dsp->hdlc) { dsp_control_req()
415 dsp->rx_volume = *((int *)data); dsp_control_req()
418 __func__, dsp->tx_volume); dsp_control_req()
419 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
420 dsp_dtmf_hardware(dsp); dsp_control_req()
421 dsp_rx_off(dsp); dsp_control_req()
424 dsp->echo.software = 1; /* soft echo */ dsp_control_req()
427 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
428 dsp_rx_off(dsp); dsp_control_req()
430 dsp_cmx_debug(dsp); dsp_control_req()
433 dsp->echo.software = 0; dsp_control_req()
434 dsp->echo.hardware = 0; dsp_control_req()
437 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
438 dsp_rx_off(dsp); dsp_control_req()
440 dsp_cmx_debug(dsp); dsp_control_req()
446 dsp->rx_disabled = 0; dsp_control_req()
447 dsp_rx_off(dsp); dsp_control_req()
453 dsp->rx_disabled = 1; dsp_control_req()
454 dsp_rx_off(dsp); dsp_control_req()
457 if (dsp->hdlc) { dsp_control_req()
464 dsp->tx_mix = 1; dsp_control_req()
465 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
466 dsp_rx_off(dsp); dsp_control_req()
468 dsp_cmx_debug(dsp); dsp_control_req()
471 if (dsp->hdlc) { dsp_control_req()
478 dsp->tx_mix = 0; dsp_control_req()
479 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
480 dsp_rx_off(dsp); dsp_control_req()
482 dsp_cmx_debug(dsp); dsp_control_req()
485 dsp->tx_data = 1; dsp_control_req()
488 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
489 dsp_rx_off(dsp); dsp_control_req()
491 dsp_cmx_debug(dsp); dsp_control_req()
494 dsp->tx_data = 0; dsp_control_req()
497 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
498 dsp_rx_off(dsp); dsp_control_req()
500 dsp_cmx_debug(dsp); dsp_control_req()
504 if (dsp->hdlc) { dsp_control_req()
512 dsp->cmx_delay = (*((int *)data)) << 3; dsp_control_req()
514 if (dsp->cmx_delay >= (CMX_BUFF_HALF >> 1)) dsp_control_req()
517 dsp->cmx_delay = (CMX_BUFF_HALF >> 1) - 1; dsp_control_req()
521 __func__, dsp->cmx_delay); dsp_control_req()
525 if (dsp->hdlc) { dsp_control_req()
529 dsp->cmx_delay = 0; dsp_control_req()
535 if (dsp->hdlc) { dsp_control_req()
539 dsp->tx_dejitter = 1; dsp_control_req()
545 if (dsp->hdlc) { dsp_control_req()
549 dsp->tx_dejitter = 0; dsp_control_req()
555 if (dsp->hdlc) { dsp_control_req()
564 dsp->pipeline.inuse = 1; dsp_control_req()
565 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
566 ret = dsp_pipeline_build(&dsp->pipeline, dsp_control_req()
568 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
569 dsp_rx_off(dsp); dsp_control_req()
573 if (dsp->hdlc) { dsp_control_req()
584 ret = dsp_bf_init(dsp, (u8 *)data, len); dsp_control_req()
594 if (dsp->up) { dsp_control_req()
595 if (dsp->up->send(dsp->up, nskb)) dsp_control_req()
601 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
602 dsp_dtmf_hardware(dsp); dsp_control_req()
603 dsp_rx_off(dsp); dsp_control_req()
607 if (dsp->hdlc) { dsp_control_req()
613 dsp_bf_cleanup(dsp); dsp_control_req()
614 dsp_cmx_hardware(dsp->conf, dsp); dsp_control_req()
615 dsp_dtmf_hardware(dsp); dsp_control_req()
616 dsp_rx_off(dsp); dsp_control_req()
630 struct dsp *dsp = container_of(ch, struct dsp, ch); get_features() local
647 dsp->features_rx_off = 1; get_features()
649 dsp->features_fill_empty = 1; get_features()
654 *((u_long *)&cq.p1) = (u_long)&dsp->features; get_features()
662 __func__, dsp->name); get_features()
668 struct dsp *dsp = container_of(ch, struct dsp, ch); dsp_function() local
678 dsp->data_pending = 0; dsp_function()
680 if (dsp->hdlc) { dsp_function()
682 if (dsp->b_active) dsp_function()
683 schedule_work(&dsp->workq); dsp_function()
693 if (dsp->rx_is_off) { dsp_function()
697 __func__, dsp->name); dsp_function()
699 if (dsp->hdlc) { dsp_function()
702 dsp_cmx_hdlc(dsp, skb); dsp_function()
704 if (dsp->rx_disabled) { dsp_function()
709 if (dsp->up) dsp_function()
710 return dsp->up->send(dsp->up, skb); dsp_function()
717 if (dsp->bf_enable) dsp_function()
718 dsp_bf_decrypt(dsp, skb->data, skb->len); dsp_function()
720 if (dsp->pipeline.inuse) dsp_function()
721 dsp_pipeline_process_rx(&dsp->pipeline, skb->data, dsp_function()
724 if (dsp->rx_volume) dsp_function()
725 dsp_change_volume(skb, dsp->rx_volume); dsp_function()
727 if (dsp->dtmf.software) { dsp_function()
728 digits = dsp_dtmf_goertzel_decode(dsp, skb->data, dsp_function()
732 if (dsp->conf && dsp->conf->software) { dsp_function()
734 dsp_cmx_receive(dsp, skb); dsp_function()
747 __func__, *digits, dsp->name); dsp_function()
753 if (dsp->up) { dsp_function()
754 if (dsp->up->send( dsp_function()
755 dsp->up, nskb)) dsp_function()
763 if (dsp->rx_disabled) { dsp_function()
768 if (dsp->up) dsp_function()
769 return dsp->up->send(dsp->up, skb); dsp_function()
775 hh->id, skb->len, dsp->name); dsp_function()
778 if (!dsp->dtmf.hardware) { dsp_function()
785 digits = dsp_dtmf_goertzel_decode(dsp, skb->data, dsp_function()
793 __func__, *digits, dsp->name); dsp_function()
799 if (dsp->up) { dsp_function()
800 if (dsp->up->send( dsp_function()
801 dsp->up, nskb)) dsp_function()
815 dsp->tx_volume = *((int *)skb->data); dsp_function()
818 "%d\n", __func__, dsp->tx_volume); dsp_function()
819 dsp_cmx_hardware(dsp->conf, dsp); dsp_function()
820 dsp_dtmf_hardware(dsp); dsp_function()
821 dsp_rx_off(dsp); dsp_function()
827 "%s\n", __func__, hh->id, dsp->name); dsp_function()
835 __func__, dsp->name); dsp_function()
838 dsp->b_active = 1; dsp_function()
839 dsp->data_pending = 0; dsp_function()
840 dsp->rx_init = 1; dsp_function()
842 dsp->rx_W = 0; dsp_function()
843 dsp->rx_R = 0; dsp_function()
844 memset(dsp->rx_buff, 0, sizeof(dsp->rx_buff)); dsp_function()
845 dsp_cmx_hardware(dsp->conf, dsp); dsp_function()
846 dsp_dtmf_hardware(dsp); dsp_function()
847 dsp_rx_off(dsp); dsp_function()
852 dsp->name); dsp_function()
855 if (dsp->up) dsp_function()
856 return dsp->up->send(dsp->up, skb); dsp_function()
862 __func__, dsp->name); dsp_function()
865 dsp->b_active = 0; dsp_function()
866 dsp->data_pending = 0; dsp_function()
867 dsp_cmx_hardware(dsp->conf, dsp); dsp_function()
868 dsp_rx_off(dsp); dsp_function()
871 if (dsp->up) dsp_function()
872 return dsp->up->send(dsp->up, skb); dsp_function()
881 if (dsp->hdlc) { dsp_function()
883 if (!dsp->b_active) { dsp_function()
889 skb_queue_tail(&dsp->sendq, skb); dsp_function()
890 schedule_work(&dsp->workq); dsp_function()
895 if (!dsp->tone.tone) { dsp_function()
897 dsp_cmx_transmit(dsp, skb); dsp_function()
903 ret = dsp_control_req(dsp, hh, skb); dsp_function()
910 __func__, dsp->name); dsp_function()
911 if (dsp->dtmf.hardware || dsp->dtmf.software) dsp_function()
912 dsp_dtmf_goertzel_init(dsp); dsp_function()
915 if (dsp->features_fill_empty) dsp_function()
916 dsp_fill_empty(dsp); dsp_function()
926 __func__, dsp->name); dsp_function()
928 dsp->tone.tone = 0; dsp_function()
929 dsp->tone.hardware = 0; dsp_function()
930 dsp->tone.software = 0; dsp_function()
931 if (timer_pending(&dsp->tone.tl)) dsp_function()
932 del_timer(&dsp->tone.tl); dsp_function()
933 if (dsp->conf) dsp_function()
934 dsp_cmx_conf(dsp, 0); /* dsp_cmx_hardware will also be dsp_function()
936 skb_queue_purge(&dsp->sendq); dsp_function()
945 __func__, hh->prim, dsp->name); dsp_function()
956 struct dsp *dsp = container_of(ch, struct dsp, ch); dsp_ctrl() local
967 if (dsp->ch.peer) dsp_ctrl()
968 dsp->ch.peer->ctrl(dsp->ch.peer, CLOSE_CHANNEL, NULL); dsp_ctrl()
974 dsp->b_active = 0; dsp_ctrl()
977 cancel_work_sync(&dsp->workq); dsp_ctrl()
979 if (timer_pending(&dsp->tone.tl)) dsp_ctrl()
980 del_timer(&dsp->tone.tl); dsp_ctrl()
981 skb_queue_purge(&dsp->sendq); dsp_ctrl()
984 __func__, dsp->name); dsp_ctrl()
985 dsp->b_active = 0; dsp_ctrl()
986 dsp_cmx_conf(dsp, 0); /* dsp_cmx_hardware will also be called dsp_ctrl()
988 dsp_pipeline_destroy(&dsp->pipeline); dsp_ctrl()
992 __func__, dsp->name); dsp_ctrl()
993 list_del(&dsp->list); dsp_ctrl()
997 printk(KERN_DEBUG "%s: dsp instance released\n", dsp_ctrl()
999 vfree(dsp); dsp_ctrl()
1009 struct dsp *dsp = container_of(work, struct dsp, workq); dsp_send_bh() local
1013 if (dsp->hdlc && dsp->data_pending) dsp_send_bh()
1017 while ((skb = skb_dequeue(&dsp->sendq))) { dsp_send_bh()
1019 if (dsp->data_pending) { dsp_send_bh()
1022 "no bug!\n", __func__, dsp->name); dsp_send_bh()
1030 if (dsp->up) { dsp_send_bh()
1031 if (dsp->up->send(dsp->up, skb)) dsp_send_bh()
1037 if (dsp->ch.peer) { dsp_send_bh()
1038 dsp->data_pending = 1; dsp_send_bh()
1039 if (dsp->ch.recv(dsp->ch.peer, skb)) { dsp_send_bh()
1041 dsp->data_pending = 0; dsp_send_bh()
1052 struct dsp *ndsp; dspcreate()
1058 ndsp = vzalloc(sizeof(struct dsp)); dspcreate()
1060 printk(KERN_ERR "%s: vmalloc struct dsp failed\n", __func__); dspcreate()
1064 printk(KERN_DEBUG "%s: creating new dsp instance\n", __func__); dspcreate()
1116 .name = "dsp",
H A Ddsp_dtmf.c15 #include "dsp.h"
40 void dsp_dtmf_goertzel_init(struct dsp *dsp) dsp_dtmf_goertzel_init() argument
42 dsp->dtmf.size = 0; dsp_dtmf_goertzel_init()
43 dsp->dtmf.lastwhat = '\0'; dsp_dtmf_goertzel_init()
44 dsp->dtmf.lastdigit = '\0'; dsp_dtmf_goertzel_init()
45 dsp->dtmf.count = 0; dsp_dtmf_goertzel_init()
50 void dsp_dtmf_hardware(struct dsp *dsp) dsp_dtmf_hardware() argument
54 if (!dsp->dtmf.enable) dsp_dtmf_hardware()
57 if (!dsp->features.hfc_dtmf) dsp_dtmf_hardware()
61 if (dsp->tx_volume) { dsp_dtmf_hardware()
63 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, " dsp_dtmf_hardware()
65 __func__, dsp->name); dsp_dtmf_hardware()
68 if (dsp->rx_volume) { dsp_dtmf_hardware()
70 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, " dsp_dtmf_hardware()
72 __func__, dsp->name); dsp_dtmf_hardware()
76 if (dsp->bf_enable) { dsp_dtmf_hardware()
78 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, " dsp_dtmf_hardware()
80 __func__, dsp->name); dsp_dtmf_hardware()
84 if (dsp->pipeline.inuse) { dsp_dtmf_hardware()
86 printk(KERN_DEBUG "%s dsp %s cannot do hardware DTMF, " dsp_dtmf_hardware()
88 __func__, dsp->name); dsp_dtmf_hardware()
92 dsp->dtmf.hardware = hardware; dsp_dtmf_hardware()
93 dsp->dtmf.software = !hardware; dsp_dtmf_hardware()
118 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len, int fmt) dsp_dtmf_goertzel_decode() argument
130 dsp->dtmf.digits[0] = '\0'; dsp_dtmf_goertzel_decode()
137 size = dsp->dtmf.size; dsp_dtmf_goertzel_decode()
138 buf = dsp->dtmf.buffer; dsp_dtmf_goertzel_decode()
155 return dsp->dtmf.digits; dsp_dtmf_goertzel_decode()
176 dsp->dtmf.size = size; dsp_dtmf_goertzel_decode()
179 return dsp->dtmf.digits; dsp_dtmf_goertzel_decode()
181 dsp->dtmf.size = 0; dsp_dtmf_goertzel_decode()
188 buf = dsp->dtmf.buffer; dsp_dtmf_goertzel_decode()
214 if (result[i] > dsp->dtmf.treshold) { dsp_dtmf_goertzel_decode()
287 if (dsp->dtmf.lastwhat != what) dsp_dtmf_goertzel_decode()
288 dsp->dtmf.count = 0; dsp_dtmf_goertzel_decode()
291 if (dsp->dtmf.count == 2) { dsp_dtmf_goertzel_decode()
292 if (dsp->dtmf.lastdigit != what) { dsp_dtmf_goertzel_decode()
293 dsp->dtmf.lastdigit = what; dsp_dtmf_goertzel_decode()
298 if ((strlen(dsp->dtmf.digits) + 1) dsp_dtmf_goertzel_decode()
299 < sizeof(dsp->dtmf.digits)) { dsp_dtmf_goertzel_decode()
300 dsp->dtmf.digits[strlen( dsp_dtmf_goertzel_decode()
301 dsp->dtmf.digits) + 1] = '\0'; dsp_dtmf_goertzel_decode()
302 dsp->dtmf.digits[strlen( dsp_dtmf_goertzel_decode()
303 dsp->dtmf.digits)] = what; dsp_dtmf_goertzel_decode()
308 dsp->dtmf.count++; dsp_dtmf_goertzel_decode()
310 dsp->dtmf.lastwhat = what; dsp_dtmf_goertzel_decode()
H A Ddsp.h91 /* all members within a conference (this is linked 1:1 with the dsp) */
92 struct dsp;
95 struct dsp *dsp; member in struct:dsp_conf_member
170 struct dsp { struct
245 extern void dsp_cmx_debug(struct dsp *dsp);
246 extern void dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp);
247 extern int dsp_cmx_conf(struct dsp *dsp, u32 conf_id);
248 extern void dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb);
249 extern void dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb);
251 extern void dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb);
252 extern int dsp_cmx_del_conf_member(struct dsp *dsp);
255 extern void dsp_dtmf_goertzel_init(struct dsp *dsp);
256 extern void dsp_dtmf_hardware(struct dsp *dsp);
257 extern u8 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len,
260 extern int dsp_tone(struct dsp *dsp, int tone);
261 extern void dsp_tone_copy(struct dsp *dsp, u8 *data, int len);
264 extern void dsp_bf_encrypt(struct dsp *dsp, u8 *data, int len);
265 extern void dsp_bf_decrypt(struct dsp *dsp, u8 *data, int len);
266 extern int dsp_bf_init(struct dsp *dsp, const u8 *key, unsigned int keylen);
267 extern void dsp_bf_cleanup(struct dsp *dsp);
H A Ddsp_hwec.c3 * builtin mISDN dsp pipeline element for enabling the hw echocanceller
33 #include "dsp.h"
51 void dsp_hwec_enable(struct dsp *dsp, const char *arg) dsp_hwec_enable() argument
57 if (!dsp) { dsp_hwec_enable()
58 printk(KERN_ERR "%s: failed to enable hwec: dsp is NULL\n", dsp_hwec_enable()
100 if (!dsp->ch.peer->ctrl(&dsp->ch, CONTROL_CHANNEL, &cq)) { dsp_hwec_enable()
107 void dsp_hwec_disable(struct dsp *dsp) dsp_hwec_disable() argument
111 if (!dsp) { dsp_hwec_disable()
112 printk(KERN_ERR "%s: failed to disable hwec: dsp is NULL\n", dsp_hwec_disable()
120 if (!dsp->ch.peer->ctrl(&dsp->ch, CONTROL_CHANNEL, &cq)) { dsp_hwec_disable()
H A Ddsp_blowfish.c14 #include "dsp.h"
369 dsp_bf_encrypt(struct dsp *dsp, u8 *data, int len) dsp_bf_encrypt() argument
371 int i = 0, j = dsp->bf_crypt_pos; dsp_bf_encrypt()
372 u8 *bf_data_in = dsp->bf_data_in; dsp_bf_encrypt()
373 u8 *bf_crypt_out = dsp->bf_crypt_out; dsp_bf_encrypt()
374 u32 *P = dsp->bf_p; dsp_bf_encrypt()
375 u32 *S = dsp->bf_s; dsp_bf_encrypt()
448 dsp->bf_crypt_pos = j; dsp_bf_encrypt()
458 dsp_bf_decrypt(struct dsp *dsp, u8 *data, int len) dsp_bf_decrypt() argument
461 u8 j = dsp->bf_decrypt_in_pos; dsp_bf_decrypt()
462 u8 k = dsp->bf_decrypt_out_pos; dsp_bf_decrypt()
463 u8 *bf_crypt_inring = dsp->bf_crypt_inring; dsp_bf_decrypt()
464 u8 *bf_data_out = dsp->bf_data_out; dsp_bf_decrypt()
465 u16 sync = dsp->bf_sync; dsp_bf_decrypt()
466 u32 *P = dsp->bf_p; dsp_bf_decrypt()
467 u32 *S = dsp->bf_s; dsp_bf_decrypt()
555 dsp->bf_decrypt_in_pos = j; dsp_bf_decrypt()
556 dsp->bf_decrypt_out_pos = k; dsp_bf_decrypt()
557 dsp->bf_sync = sync; dsp_bf_decrypt()
593 * initialize the dsp for encryption and decryption using the same key
599 dsp_bf_init(struct dsp *dsp, const u8 *key, uint keylen) dsp_bf_init() argument
603 u32 *P = (u32 *)dsp->bf_p; dsp_bf_init()
604 u32 *S = (u32 *)dsp->bf_s; dsp_bf_init()
609 /* Set dsp states */ dsp_bf_init()
612 dsp->bf_crypt_out[i] = 0xff; dsp_bf_init()
613 dsp->bf_data_out[i] = dsp_silence; dsp_bf_init()
616 dsp->bf_crypt_pos = 0; dsp_bf_init()
617 dsp->bf_decrypt_in_pos = 0; dsp_bf_init()
618 dsp->bf_decrypt_out_pos = 0; dsp_bf_init()
619 dsp->bf_sync = 0x1ff; dsp_bf_init()
620 dsp->bf_enable = 1; dsp_bf_init()
669 dsp_bf_cleanup(struct dsp *dsp) dsp_bf_cleanup() argument
671 dsp->bf_enable = 0; dsp_bf_cleanup()
H A Ddsp_tones.c15 #include "dsp.h"
373 * if tones has finished (e.g. knocking tone), dsp->tones is turned off
375 void dsp_tone_copy(struct dsp *dsp, u8 *data, int len) dsp_tone_copy() argument
379 struct dsp_tone *tone = &dsp->tone; dsp_tone_copy()
438 dsp_tone_hw_message(struct dsp *dsp, u8 *sample, int len) dsp_tone_hw_message() argument
447 if (dsp->ch.peer) { dsp_tone_hw_message()
448 if (dsp->ch.recv(dsp->ch.peer, nskb)) dsp_tone_hw_message()
462 struct dsp *dsp = arg; dsp_tone_timeout() local
463 struct dsp_tone *tone = &dsp->tone; dsp_tone_timeout()
477 dsp_tone_hw_message(dsp, NULL, 0); dsp_tone_timeout()
479 dsp_tone_hw_message(dsp, pat->data[index], *(pat->siz[index])); dsp_tone_timeout()
497 dsp_tone(struct dsp *dsp, int tone) dsp_tone() argument
501 struct dsp_tone *tonet = &dsp->tone; dsp_tone()
508 if (dsp->features.hfc_loops && timer_pending(&tonet->tl)) dsp_tone()
510 if (dsp->features.hfc_loops) dsp_tone()
511 dsp_tone_hw_message(dsp, NULL, 0); dsp_tone()
526 printk(KERN_WARNING "dsp: given tone 0x%x is invalid\n", tone); dsp_tone()
537 if (dsp->features.hfc_loops) { dsp_tone()
540 dsp_tone_hw_message(dsp, pat->data[0], *(pat->siz[0])); dsp_tone()
H A Ddsp_pipeline.c34 #include "dsp.h"
166 printk(KERN_DEBUG "%s: dsp pipeline module initialized\n", __func__); dsp_pipeline_module_init()
190 printk(KERN_DEBUG "%s: dsp pipeline module exited\n", __func__); dsp_pipeline_module_exit()
202 printk(KERN_DEBUG "%s: dsp pipeline ready\n", __func__); dsp_pipeline_init()
215 dsp_hwec_disable(container_of(pipeline, struct dsp, _dsp_pipeline_destroy()
232 printk(KERN_DEBUG "%s: dsp pipeline destroyed\n", __func__); dsp_pipeline_destroy()
280 struct dsp, pipeline), args); dsp_pipeline_build()
324 printk(KERN_DEBUG "%s: dsp pipeline built%s: %s\n", dsp_pipeline_build()
H A Ddsp_audio.c18 #include "dsp.h"
/linux-4.4.14/sound/soc/codecs/
H A Dwm_adsp.c241 struct wm_adsp *dsp; member in struct:wm_coeff_ctl
253 static void wm_adsp_debugfs_save_wmfwname(struct wm_adsp *dsp, const char *s) wm_adsp_debugfs_save_wmfwname() argument
257 mutex_lock(&dsp->debugfs_lock); wm_adsp_debugfs_save_wmfwname()
258 kfree(dsp->wmfw_file_name); wm_adsp_debugfs_save_wmfwname()
259 dsp->wmfw_file_name = tmp; wm_adsp_debugfs_save_wmfwname()
260 mutex_unlock(&dsp->debugfs_lock); wm_adsp_debugfs_save_wmfwname()
263 static void wm_adsp_debugfs_save_binname(struct wm_adsp *dsp, const char *s) wm_adsp_debugfs_save_binname() argument
267 mutex_lock(&dsp->debugfs_lock); wm_adsp_debugfs_save_binname()
268 kfree(dsp->bin_file_name); wm_adsp_debugfs_save_binname()
269 dsp->bin_file_name = tmp; wm_adsp_debugfs_save_binname()
270 mutex_unlock(&dsp->debugfs_lock); wm_adsp_debugfs_save_binname()
273 static void wm_adsp_debugfs_clear(struct wm_adsp *dsp) wm_adsp_debugfs_clear() argument
275 mutex_lock(&dsp->debugfs_lock); wm_adsp_debugfs_clear()
276 kfree(dsp->wmfw_file_name); wm_adsp_debugfs_clear()
277 kfree(dsp->bin_file_name); wm_adsp_debugfs_clear()
278 dsp->wmfw_file_name = NULL; wm_adsp_debugfs_clear()
279 dsp->bin_file_name = NULL; wm_adsp_debugfs_clear()
280 mutex_unlock(&dsp->debugfs_lock); wm_adsp_debugfs_clear()
287 struct wm_adsp *dsp = file->private_data; wm_adsp_debugfs_wmfw_read() local
290 mutex_lock(&dsp->debugfs_lock); wm_adsp_debugfs_wmfw_read()
292 if (!dsp->wmfw_file_name || !dsp->running) wm_adsp_debugfs_wmfw_read()
296 dsp->wmfw_file_name, wm_adsp_debugfs_wmfw_read()
297 strlen(dsp->wmfw_file_name)); wm_adsp_debugfs_wmfw_read()
299 mutex_unlock(&dsp->debugfs_lock); wm_adsp_debugfs_wmfw_read()
307 struct wm_adsp *dsp = file->private_data; wm_adsp_debugfs_bin_read() local
310 mutex_lock(&dsp->debugfs_lock); wm_adsp_debugfs_bin_read()
312 if (!dsp->bin_file_name || !dsp->running) wm_adsp_debugfs_bin_read()
316 dsp->bin_file_name, wm_adsp_debugfs_bin_read()
317 strlen(dsp->bin_file_name)); wm_adsp_debugfs_bin_read()
319 mutex_unlock(&dsp->debugfs_lock); wm_adsp_debugfs_bin_read()
343 static void wm_adsp2_init_debugfs(struct wm_adsp *dsp, wm_adsp2_init_debugfs() argument
351 adsp_err(dsp, "No codec debugfs root\n"); wm_adsp2_init_debugfs()
359 snprintf(root_name, PAGE_SIZE, "dsp%d", dsp->num); wm_adsp2_init_debugfs()
366 if (!debugfs_create_bool("running", S_IRUGO, root, &dsp->running)) wm_adsp2_init_debugfs()
369 if (!debugfs_create_x32("fw_id", S_IRUGO, root, &dsp->fw_id)) wm_adsp2_init_debugfs()
373 &dsp->fw_id_version)) wm_adsp2_init_debugfs()
378 S_IRUGO, root, dsp, wm_adsp2_init_debugfs()
383 dsp->debugfs_root = root; wm_adsp2_init_debugfs()
388 adsp_err(dsp, "Failed to create debugfs\n"); wm_adsp2_init_debugfs()
391 static void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp) wm_adsp2_cleanup_debugfs() argument
393 wm_adsp_debugfs_clear(dsp); wm_adsp2_cleanup_debugfs()
394 debugfs_remove_recursive(dsp->debugfs_root); wm_adsp2_cleanup_debugfs()
397 static inline void wm_adsp2_init_debugfs(struct wm_adsp *dsp, wm_adsp2_init_debugfs() argument
402 static inline void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp) wm_adsp2_cleanup_debugfs() argument
406 static inline void wm_adsp_debugfs_save_wmfwname(struct wm_adsp *dsp, wm_adsp_debugfs_save_wmfwname() argument
411 static inline void wm_adsp_debugfs_save_binname(struct wm_adsp *dsp, wm_adsp_debugfs_save_binname() argument
416 static inline void wm_adsp_debugfs_clear(struct wm_adsp *dsp) wm_adsp_debugfs_clear() argument
426 struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); wm_adsp_fw_get() local
428 ucontrol->value.integer.value[0] = dsp[e->shift_l].fw; wm_adsp_fw_get()
438 struct wm_adsp *dsp = snd_soc_codec_get_drvdata(codec); wm_adsp_fw_put() local
440 if (ucontrol->value.integer.value[0] == dsp[e->shift_l].fw) wm_adsp_fw_put()
446 if (dsp[e->shift_l].running) wm_adsp_fw_put()
449 dsp[e->shift_l].fw = ucontrol->value.integer.value[0]; wm_adsp_fw_put()
473 static struct wm_adsp_region const *wm_adsp_find_region(struct wm_adsp *dsp, wm_adsp_find_region() argument
478 for (i = 0; i < dsp->num_mems; i++) wm_adsp_find_region()
479 if (dsp->mem[i].type == type) wm_adsp_find_region()
480 return &dsp->mem[i]; wm_adsp_find_region()
507 static void wm_adsp2_show_fw_status(struct wm_adsp *dsp) wm_adsp2_show_fw_status() argument
512 ret = regmap_raw_read(dsp->regmap, dsp->base + ADSP2_SCRATCH0, wm_adsp2_show_fw_status()
515 adsp_err(dsp, "Failed to read SCRATCH regs: %d\n", ret); wm_adsp2_show_fw_status()
519 adsp_dbg(dsp, "FW SCRATCH 0:0x%x 1:0x%x 2:0x%x 3:0x%x\n", wm_adsp2_show_fw_status()
541 struct wm_adsp *dsp = ctl->dsp; wm_coeff_write_control() local
546 mem = wm_adsp_find_region(dsp, alg_region->type); wm_coeff_write_control()
548 adsp_err(dsp, "No base for region %x\n", wm_coeff_write_control()
560 ret = regmap_raw_write(dsp->regmap, reg, scratch, wm_coeff_write_control()
563 adsp_err(dsp, "Failed to write %zu bytes to %x: %d\n", wm_coeff_write_control()
568 adsp_dbg(dsp, "Wrote %zu bytes to %x\n", ctl->len, reg); wm_coeff_write_control()
595 struct wm_adsp *dsp = ctl->dsp; wm_coeff_read_control() local
600 mem = wm_adsp_find_region(dsp, alg_region->type); wm_coeff_read_control()
602 adsp_err(dsp, "No base for region %x\n", wm_coeff_read_control()
614 ret = regmap_raw_read(dsp->regmap, reg, scratch, ctl->len); wm_coeff_read_control()
616 adsp_err(dsp, "Failed to read %zu bytes from %x: %d\n", wm_coeff_read_control()
621 adsp_dbg(dsp, "Read %zu bytes from %x\n", ctl->len, reg); wm_coeff_read_control()
648 struct wm_adsp *dsp; member in struct:wmfw_ctl_work
653 static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) wmfw_add_ctl() argument
681 ret = snd_soc_add_card_controls(dsp->card, wmfw_add_ctl()
688 ctl->kcontrol = snd_soc_card_get_kcontrol(dsp->card, wmfw_add_ctl()
698 static int wm_coeff_init_control_caches(struct wm_adsp *dsp) wm_coeff_init_control_caches() argument
703 list_for_each_entry(ctl, &dsp->ctl_list, list) { wm_coeff_init_control_caches()
719 static int wm_coeff_sync_controls(struct wm_adsp *dsp) wm_coeff_sync_controls() argument
724 list_for_each_entry(ctl, &dsp->ctl_list, list) { wm_coeff_sync_controls()
745 wmfw_add_ctl(ctl_work->dsp, ctl_work->ctl); wm_adsp_ctl_work()
749 static int wm_adsp_create_control(struct wm_adsp *dsp, wm_adsp_create_control() argument
781 adsp_err(dsp, "Unknown region type: %d\n", alg_region->type); wm_adsp_create_control()
785 switch (dsp->fw_ver) { wm_adsp_create_control()
789 dsp->num, region_name, alg_region->alg); wm_adsp_create_control()
793 "DSP%d%c %.12s %x", dsp->num, *region_name, wm_adsp_create_control()
794 wm_adsp_fw_text[dsp->fw], alg_region->alg); wm_adsp_create_control()
811 list_for_each_entry(ctl, &dsp->ctl_list, wm_adsp_create_control()
823 ctl->fw_name = wm_adsp_fw_text[dsp->fw]; wm_adsp_create_control()
834 ctl->dsp = dsp; wm_adsp_create_control()
839 adsp_warn(dsp, "Truncating control %s from %d\n", wm_adsp_create_control()
850 list_add(&ctl->list, &dsp->ctl_list); wm_adsp_create_control()
858 ctl_work->dsp = dsp; wm_adsp_create_control()
935 static inline void wm_coeff_parse_alg(struct wm_adsp *dsp, const u8 **data, wm_coeff_parse_alg() argument
940 switch (dsp->fw_ver) { wm_coeff_parse_alg()
960 adsp_dbg(dsp, "Algorithm ID: %#x\n", blk->id); wm_coeff_parse_alg()
961 adsp_dbg(dsp, "Algorithm name: %.*s\n", blk->name_len, blk->name); wm_coeff_parse_alg()
962 adsp_dbg(dsp, "# of coefficient descriptors: %#x\n", blk->ncoeff); wm_coeff_parse_alg()
965 static inline void wm_coeff_parse_coeff(struct wm_adsp *dsp, const u8 **data, wm_coeff_parse_coeff() argument
972 switch (dsp->fw_ver) { wm_coeff_parse_coeff()
1003 adsp_dbg(dsp, "\tCoefficient type: %#x\n", blk->mem_type); wm_coeff_parse_coeff()
1004 adsp_dbg(dsp, "\tCoefficient offset: %#x\n", blk->offset); wm_coeff_parse_coeff()
1005 adsp_dbg(dsp, "\tCoefficient name: %.*s\n", blk->name_len, blk->name); wm_coeff_parse_coeff()
1006 adsp_dbg(dsp, "\tCoefficient flags: %#x\n", blk->flags); wm_coeff_parse_coeff()
1007 adsp_dbg(dsp, "\tALSA control type: %#x\n", blk->ctl_type); wm_coeff_parse_coeff()
1008 adsp_dbg(dsp, "\tALSA control len: %#x\n", blk->len); wm_coeff_parse_coeff()
1011 static int wm_adsp_parse_coeff(struct wm_adsp *dsp, wm_adsp_parse_coeff() argument
1020 wm_coeff_parse_alg(dsp, &data, &alg_blk); wm_adsp_parse_coeff()
1022 wm_coeff_parse_coeff(dsp, &data, &coeff_blk); wm_adsp_parse_coeff()
1028 adsp_err(dsp, "Unknown control type: %d\n", wm_adsp_parse_coeff()
1036 ret = wm_adsp_create_control(dsp, &alg_region, wm_adsp_parse_coeff()
1043 adsp_err(dsp, "Failed to create control: %.*s, %d\n", wm_adsp_parse_coeff()
1050 static int wm_adsp_load(struct wm_adsp *dsp) wm_adsp_load() argument
1054 struct regmap *regmap = dsp->regmap; wm_adsp_load()
1073 snprintf(file, PAGE_SIZE, "%s-dsp%d-%s.wmfw", dsp->part, dsp->num, wm_adsp_load()
1074 wm_adsp_fw[dsp->fw].file); wm_adsp_load()
1077 ret = request_firmware(&firmware, file, dsp->dev); wm_adsp_load()
1079 adsp_err(dsp, "Failed to request '%s'\n", file); wm_adsp_load()
1086 adsp_err(dsp, "%s: file too short, %zu bytes\n", wm_adsp_load()
1094 adsp_err(dsp, "%s: invalid magic\n", file); wm_adsp_load()
1100 adsp_warn(dsp, "%s: Depreciated file format %d\n", wm_adsp_load()
1107 adsp_err(dsp, "%s: unknown file format %d\n", wm_adsp_load()
1112 adsp_info(dsp, "Firmware version: %d\n", header->ver); wm_adsp_load()
1113 dsp->fw_ver = header->ver; wm_adsp_load()
1115 if (header->core != dsp->type) { wm_adsp_load()
1116 adsp_err(dsp, "%s: invalid core %d != %d\n", wm_adsp_load()
1117 file, header->core, dsp->type); wm_adsp_load()
1121 switch (dsp->type) { wm_adsp_load()
1128 adsp_dbg(dsp, "%s: %d DM, %d PM, %d ZM\n", wm_adsp_load()
1140 adsp_dbg(dsp, "%s: %d XM, %d YM %d PM, %d ZM\n", wm_adsp_load()
1154 adsp_err(dsp, "%s: unexpected header length %d\n", wm_adsp_load()
1159 adsp_dbg(dsp, "%s: timestamp %llu\n", file, wm_adsp_load()
1170 mem = wm_adsp_find_region(dsp, type); wm_adsp_load()
1180 ret = wm_adsp_parse_coeff(dsp, region); wm_adsp_load()
1214 adsp_warn(dsp, wm_adsp_load()
1220 adsp_dbg(dsp, "%s.%d: %d bytes at %d in %s\n", file, wm_adsp_load()
1226 adsp_info(dsp, "%s: %s\n", file, text); wm_adsp_load()
1235 adsp_err(dsp, "Out of memory\n"); wm_adsp_load()
1243 adsp_err(dsp, wm_adsp_load()
1258 adsp_err(dsp, "Failed to complete async write: %d\n", ret); wm_adsp_load()
1263 adsp_warn(dsp, "%s.%d: %zu bytes at end of file\n", wm_adsp_load()
1266 wm_adsp_debugfs_save_wmfwname(dsp, file); wm_adsp_load()
1278 static void wm_adsp_ctl_fixup_base(struct wm_adsp *dsp, wm_adsp_ctl_fixup_base() argument
1283 list_for_each_entry(ctl, &dsp->ctl_list, list) { wm_adsp_ctl_fixup_base()
1284 if (ctl->fw_name == wm_adsp_fw_text[dsp->fw] && wm_adsp_ctl_fixup_base()
1292 static void *wm_adsp_read_algs(struct wm_adsp *dsp, size_t n_algs, wm_adsp_read_algs() argument
1300 adsp_err(dsp, "No algorithms\n"); wm_adsp_read_algs()
1305 adsp_err(dsp, "Algorithm count %zx excessive\n", n_algs); wm_adsp_read_algs()
1310 ret = regmap_raw_read(dsp->regmap, pos + len, &val, sizeof(val)); wm_adsp_read_algs()
1312 adsp_err(dsp, "Failed to read algorithm list end: %d\n", wm_adsp_read_algs()
1318 adsp_warn(dsp, "Algorithm list end %x 0x%x != 0xbeadead\n", wm_adsp_read_algs()
1325 ret = regmap_raw_read(dsp->regmap, pos, alg, len * 2); wm_adsp_read_algs()
1327 adsp_err(dsp, "Failed to read algorithm list: %d\n", wm_adsp_read_algs()
1336 static struct wm_adsp_alg_region *wm_adsp_create_region(struct wm_adsp *dsp, wm_adsp_create_region() argument
1350 list_add_tail(&alg_region->list, &dsp->alg_regions); wm_adsp_create_region()
1352 if (dsp->fw_ver > 0) wm_adsp_create_region()
1353 wm_adsp_ctl_fixup_base(dsp, alg_region); wm_adsp_create_region()
1358 static int wm_adsp1_setup_algs(struct wm_adsp *dsp) wm_adsp1_setup_algs() argument
1368 mem = wm_adsp_find_region(dsp, WMFW_ADSP1_DM); wm_adsp1_setup_algs()
1372 ret = regmap_raw_read(dsp->regmap, mem->base, &adsp1_id, wm_adsp1_setup_algs()
1375 adsp_err(dsp, "Failed to read algorithm info: %d\n", wm_adsp1_setup_algs()
1381 dsp->fw_id = be32_to_cpu(adsp1_id.fw.id); wm_adsp1_setup_algs()
1382 adsp_info(dsp, "Firmware: %x v%d.%d.%d, %zu algorithms\n", wm_adsp1_setup_algs()
1383 dsp->fw_id, wm_adsp1_setup_algs()
1389 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, wm_adsp1_setup_algs()
1394 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, wm_adsp1_setup_algs()
1402 adsp1_alg = wm_adsp_read_algs(dsp, n_algs, mem->base + pos, len); wm_adsp1_setup_algs()
1407 adsp_info(dsp, "%d: ID %x v%d.%d.%d DM@%x ZM@%x\n", wm_adsp1_setup_algs()
1415 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_DM, wm_adsp1_setup_algs()
1422 if (dsp->fw_ver == 0) { wm_adsp1_setup_algs()
1427 wm_adsp_create_control(dsp, alg_region, 0, wm_adsp1_setup_algs()
1430 adsp_warn(dsp, "Missing length info for region DM with ID %x\n", wm_adsp1_setup_algs()
1435 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP1_ZM, wm_adsp1_setup_algs()
1442 if (dsp->fw_ver == 0) { wm_adsp1_setup_algs()
1447 wm_adsp_create_control(dsp, alg_region, 0, wm_adsp1_setup_algs()
1450 adsp_warn(dsp, "Missing length info for region ZM with ID %x\n", wm_adsp1_setup_algs()
1461 static int wm_adsp2_setup_algs(struct wm_adsp *dsp) wm_adsp2_setup_algs() argument
1471 mem = wm_adsp_find_region(dsp, WMFW_ADSP2_XM); wm_adsp2_setup_algs()
1475 ret = regmap_raw_read(dsp->regmap, mem->base, &adsp2_id, wm_adsp2_setup_algs()
1478 adsp_err(dsp, "Failed to read algorithm info: %d\n", wm_adsp2_setup_algs()
1484 dsp->fw_id = be32_to_cpu(adsp2_id.fw.id); wm_adsp2_setup_algs()
1485 dsp->fw_id_version = be32_to_cpu(adsp2_id.fw.ver); wm_adsp2_setup_algs()
1486 adsp_info(dsp, "Firmware: %x v%d.%d.%d, %zu algorithms\n", wm_adsp2_setup_algs()
1487 dsp->fw_id, wm_adsp2_setup_algs()
1488 (dsp->fw_id_version & 0xff0000) >> 16, wm_adsp2_setup_algs()
1489 (dsp->fw_id_version & 0xff00) >> 8, wm_adsp2_setup_algs()
1490 dsp->fw_id_version & 0xff, wm_adsp2_setup_algs()
1493 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, wm_adsp2_setup_algs()
1498 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, wm_adsp2_setup_algs()
1503 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, wm_adsp2_setup_algs()
1511 adsp2_alg = wm_adsp_read_algs(dsp, n_algs, mem->base + pos, len); wm_adsp2_setup_algs()
1516 adsp_info(dsp, wm_adsp2_setup_algs()
1526 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_XM, wm_adsp2_setup_algs()
1533 if (dsp->fw_ver == 0) { wm_adsp2_setup_algs()
1538 wm_adsp_create_control(dsp, alg_region, 0, wm_adsp2_setup_algs()
1541 adsp_warn(dsp, "Missing length info for region XM with ID %x\n", wm_adsp2_setup_algs()
1546 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_YM, wm_adsp2_setup_algs()
1553 if (dsp->fw_ver == 0) { wm_adsp2_setup_algs()
1558 wm_adsp_create_control(dsp, alg_region, 0, wm_adsp2_setup_algs()
1561 adsp_warn(dsp, "Missing length info for region YM with ID %x\n", wm_adsp2_setup_algs()
1566 alg_region = wm_adsp_create_region(dsp, WMFW_ADSP2_ZM, wm_adsp2_setup_algs()
1573 if (dsp->fw_ver == 0) { wm_adsp2_setup_algs()
1578 wm_adsp_create_control(dsp, alg_region, 0, wm_adsp2_setup_algs()
1581 adsp_warn(dsp, "Missing length info for region ZM with ID %x\n", wm_adsp2_setup_algs()
1592 static int wm_adsp_load_coeff(struct wm_adsp *dsp) wm_adsp_load_coeff() argument
1595 struct regmap *regmap = dsp->regmap; wm_adsp_load_coeff()
1610 snprintf(file, PAGE_SIZE, "%s-dsp%d-%s.bin", dsp->part, dsp->num, wm_adsp_load_coeff()
1611 wm_adsp_fw[dsp->fw].file); wm_adsp_load_coeff()
1614 ret = request_firmware(&firmware, file, dsp->dev); wm_adsp_load_coeff()
1616 adsp_warn(dsp, "Failed to request '%s'\n", file); wm_adsp_load_coeff()
1623 adsp_err(dsp, "%s: file too short, %zu bytes\n", wm_adsp_load_coeff()
1630 adsp_err(dsp, "%s: invalid magic\n", file); wm_adsp_load_coeff()
1638 adsp_err(dsp, "%s: Unsupported coefficient file format %d\n", wm_adsp_load_coeff()
1644 adsp_dbg(dsp, "%s: v%d.%d.%d\n", file, wm_adsp_load_coeff()
1659 adsp_dbg(dsp, "%s.%d: %x v%d.%d.%d\n", wm_adsp_load_coeff()
1664 adsp_dbg(dsp, "%s.%d: %d bytes at 0x%x in %x\n", wm_adsp_load_coeff()
1678 if (le32_to_cpu(blk->id) == dsp->fw_id && wm_adsp_load_coeff()
1681 mem = wm_adsp_find_region(dsp, type); wm_adsp_load_coeff()
1683 adsp_err(dsp, "No ZM\n"); wm_adsp_load_coeff()
1698 adsp_dbg(dsp, "%s.%d: %d bytes in %x for %x\n", wm_adsp_load_coeff()
1702 mem = wm_adsp_find_region(dsp, type); wm_adsp_load_coeff()
1704 adsp_err(dsp, "No base for region %x\n", type); wm_adsp_load_coeff()
1710 &dsp->alg_regions, list) { wm_adsp_load_coeff()
1722 adsp_err(dsp, "No %x for algorithm %x\n", wm_adsp_load_coeff()
1727 adsp_err(dsp, "%s.%d: Unknown region type %x at %d\n", wm_adsp_load_coeff()
1737 adsp_err(dsp, "Out of memory\n"); wm_adsp_load_coeff()
1742 adsp_dbg(dsp, "%s.%d: Writing %d bytes at %x\n", wm_adsp_load_coeff()
1748 adsp_err(dsp, wm_adsp_load_coeff()
1760 adsp_err(dsp, "Failed to complete async write: %d\n", ret); wm_adsp_load_coeff()
1763 adsp_warn(dsp, "%s.%d: %zu bytes at end of file\n", wm_adsp_load_coeff()
1766 wm_adsp_debugfs_save_binname(dsp, file); wm_adsp_load_coeff()
1777 int wm_adsp1_init(struct wm_adsp *dsp) wm_adsp1_init() argument
1779 INIT_LIST_HEAD(&dsp->alg_regions); wm_adsp1_init()
1782 mutex_init(&dsp->debugfs_lock); wm_adsp1_init()
1794 struct wm_adsp *dsp = &dsps[w->shift]; wm_adsp1_event() local
1800 dsp->card = codec->component.card; wm_adsp1_event()
1804 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_30, wm_adsp1_event()
1811 if(dsp->sysclk_reg) { wm_adsp1_event()
1812 ret = regmap_read(dsp->regmap, dsp->sysclk_reg, &val); wm_adsp1_event()
1814 adsp_err(dsp, "Failed to read SYSCLK state: %d\n", wm_adsp1_event()
1819 val = (val & dsp->sysclk_mask) wm_adsp1_event()
1820 >> dsp->sysclk_shift; wm_adsp1_event()
1822 ret = regmap_update_bits(dsp->regmap, wm_adsp1_event()
1823 dsp->base + ADSP1_CONTROL_31, wm_adsp1_event()
1826 adsp_err(dsp, "Failed to set clock rate: %d\n", wm_adsp1_event()
1832 ret = wm_adsp_load(dsp); wm_adsp1_event()
1836 ret = wm_adsp1_setup_algs(dsp); wm_adsp1_event()
1840 ret = wm_adsp_load_coeff(dsp); wm_adsp1_event()
1845 ret = wm_coeff_init_control_caches(dsp); wm_adsp1_event()
1850 ret = wm_coeff_sync_controls(dsp); wm_adsp1_event()
1855 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_30, wm_adsp1_event()
1862 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_30, wm_adsp1_event()
1865 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_19, wm_adsp1_event()
1868 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_30, wm_adsp1_event()
1871 list_for_each_entry(ctl, &dsp->ctl_list, list) wm_adsp1_event()
1874 while (!list_empty(&dsp->alg_regions)) { wm_adsp1_event()
1875 alg_region = list_first_entry(&dsp->alg_regions, wm_adsp1_event()
1890 regmap_update_bits(dsp->regmap, dsp->base + ADSP1_CONTROL_30, wm_adsp1_event()
1896 static int wm_adsp2_ena(struct wm_adsp *dsp) wm_adsp2_ena() argument
1901 ret = regmap_update_bits_async(dsp->regmap, dsp->base + ADSP2_CONTROL, wm_adsp2_ena()
1908 ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, wm_adsp2_ena()
1920 adsp_err(dsp, "Failed to start DSP RAM\n"); wm_adsp2_ena()
1924 adsp_dbg(dsp, "RAM ready after %d polls\n", count); wm_adsp2_ena()
1931 struct wm_adsp *dsp = container_of(work, wm_adsp2_boot_work() local
1941 ret = regmap_read(dsp->regmap, ARIZONA_SYSTEM_CLOCK_1, &val); wm_adsp2_boot_work()
1943 adsp_err(dsp, "Failed to read SYSCLK state: %d\n", ret); wm_adsp2_boot_work()
1949 ret = regmap_update_bits_async(dsp->regmap, wm_adsp2_boot_work()
1950 dsp->base + ADSP2_CLOCKING, wm_adsp2_boot_work()
1953 adsp_err(dsp, "Failed to set clock rate: %d\n", ret); wm_adsp2_boot_work()
1957 ret = wm_adsp2_ena(dsp); wm_adsp2_boot_work()
1961 ret = wm_adsp_load(dsp); wm_adsp2_boot_work()
1965 ret = wm_adsp2_setup_algs(dsp); wm_adsp2_boot_work()
1969 ret = wm_adsp_load_coeff(dsp); wm_adsp2_boot_work()
1974 ret = wm_coeff_init_control_caches(dsp); wm_adsp2_boot_work()
1979 ret = wm_coeff_sync_controls(dsp); wm_adsp2_boot_work()
1983 dsp->running = true; wm_adsp2_boot_work()
1988 regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL, wm_adsp2_boot_work()
1997 struct wm_adsp *dsp = &dsps[w->shift]; wm_adsp2_early_event() local
1999 dsp->card = codec->component.card; wm_adsp2_early_event()
2003 queue_work(system_unbound_wq, &dsp->boot_work); wm_adsp2_early_event()
2018 struct wm_adsp *dsp = &dsps[w->shift]; wm_adsp2_event() local
2025 flush_work(&dsp->boot_work); wm_adsp2_event()
2027 if (!dsp->running) wm_adsp2_event()
2030 ret = regmap_update_bits(dsp->regmap, wm_adsp2_event()
2031 dsp->base + ADSP2_CONTROL, wm_adsp2_event()
2040 wm_adsp2_show_fw_status(dsp); wm_adsp2_event()
2042 wm_adsp_debugfs_clear(dsp); wm_adsp2_event()
2044 dsp->fw_id = 0; wm_adsp2_event()
2045 dsp->fw_id_version = 0; wm_adsp2_event()
2046 dsp->running = false; wm_adsp2_event()
2048 regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL, wm_adsp2_event()
2053 regmap_write(dsp->regmap, dsp->base + ADSP2_WDMA_CONFIG_1, 0); wm_adsp2_event()
2054 regmap_write(dsp->regmap, dsp->base + ADSP2_WDMA_CONFIG_2, 0); wm_adsp2_event()
2055 regmap_write(dsp->regmap, dsp->base + ADSP2_RDMA_CONFIG_1, 0); wm_adsp2_event()
2057 list_for_each_entry(ctl, &dsp->ctl_list, list) wm_adsp2_event()
2060 while (!list_empty(&dsp->alg_regions)) { wm_adsp2_event()
2061 alg_region = list_first_entry(&dsp->alg_regions, wm_adsp2_event()
2068 adsp_dbg(dsp, "Shutdown complete\n"); wm_adsp2_event()
2077 regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL, wm_adsp2_event()
2083 int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec) wm_adsp2_codec_probe() argument
2085 wm_adsp2_init_debugfs(dsp, codec); wm_adsp2_codec_probe()
2088 &wm_adsp_fw_controls[dsp->num - 1], wm_adsp2_codec_probe()
2093 int wm_adsp2_codec_remove(struct wm_adsp *dsp, struct snd_soc_codec *codec) wm_adsp2_codec_remove() argument
2095 wm_adsp2_cleanup_debugfs(dsp); wm_adsp2_codec_remove()
2101 int wm_adsp2_init(struct wm_adsp *dsp) wm_adsp2_init() argument
2109 ret = regmap_update_bits(dsp->regmap, dsp->base + ADSP2_CONTROL, wm_adsp2_init()
2112 adsp_err(dsp, "Failed to clear memory retention: %d\n", ret); wm_adsp2_init()
2116 INIT_LIST_HEAD(&dsp->alg_regions); wm_adsp2_init()
2117 INIT_LIST_HEAD(&dsp->ctl_list); wm_adsp2_init()
2118 INIT_WORK(&dsp->boot_work, wm_adsp2_boot_work); wm_adsp2_init()
2121 mutex_init(&dsp->debugfs_lock); wm_adsp2_init()
H A Dwm_adsp.h88 int wm_adsp1_init(struct wm_adsp *dsp);
89 int wm_adsp2_init(struct wm_adsp *dsp);
90 int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec);
91 int wm_adsp2_codec_remove(struct wm_adsp *dsp, struct snd_soc_codec *codec);
H A Drt5670-dsp.h2 * rt5670-dsp.h -- RT5670 ALSA SoC DSP driver
H A Dwm2200.c87 struct wm_adsp dsp[2]; member in struct:wm2200_priv
2217 wm2200->dsp[i].type = WMFW_ADSP1; wm2200_i2c_probe()
2218 wm2200->dsp[i].part = "wm2200"; wm2200_i2c_probe()
2219 wm2200->dsp[i].num = i + 1; wm2200_i2c_probe()
2220 wm2200->dsp[i].dev = &i2c->dev; wm2200_i2c_probe()
2221 wm2200->dsp[i].regmap = wm2200->regmap; wm2200_i2c_probe()
2222 wm2200->dsp[i].sysclk_reg = WM2200_CLOCKING_3; wm2200_i2c_probe()
2223 wm2200->dsp[i].sysclk_mask = WM2200_SYSCLK_FREQ_MASK; wm2200_i2c_probe()
2224 wm2200->dsp[i].sysclk_shift = WM2200_SYSCLK_FREQ_SHIFT; wm2200_i2c_probe()
2227 wm2200->dsp[0].base = WM2200_DSP1_CONTROL_1; wm2200_i2c_probe()
2228 wm2200->dsp[0].mem = wm2200_dsp1_regions; wm2200_i2c_probe()
2229 wm2200->dsp[0].num_mems = ARRAY_SIZE(wm2200_dsp1_regions); wm2200_i2c_probe()
2231 wm2200->dsp[1].base = WM2200_DSP2_CONTROL_1; wm2200_i2c_probe()
2232 wm2200->dsp[1].mem = wm2200_dsp2_regions; wm2200_i2c_probe()
2233 wm2200->dsp[1].num_mems = ARRAY_SIZE(wm2200_dsp2_regions); wm2200_i2c_probe()
2235 for (i = 0; i < ARRAY_SIZE(wm2200->dsp); i++) wm2200_i2c_probe()
2236 wm_adsp1_init(&wm2200->dsp[i]); wm2200_i2c_probe()
H A Dwm0010.c358 u8 *out, dsp; wm0010_firmware_load() local
373 dsp = inforec->dsp_target; wm0010_firmware_load()
398 if (dsp != DEVICE_ID_WM0010) { wm0010_firmware_load()
H A Dwm8996.c1742 int dsp = 0; wm8996_hw_params() local
1794 dsp |= i << dsp_shift; wm8996_hw_params()
1809 WM8996_DSP1_DIV_MASK << dsp_shift, dsp); wm8996_hw_params()
H A Dwm8985.c642 /* frame inversion is not valid for dsp modes */ wm8985_set_fmt()
H A Dwm8990.c1273 * register the mixer and dsp interfaces with the kernel
H A Dtlv320aic31xx.c720 /* This is fine if using dsp format, but if using i2s aic31xx_setup_pll()
/linux-4.4.14/sound/soc/intel/common/
H A DMakefile1 snd-soc-sst-dsp-objs := sst-dsp.o
6 snd-soc-sst-dsp-objs += sst-firmware.o
9 obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o
H A Dsst-firmware.c34 #include "sst-dsp.h"
35 #include "sst-dsp-priv.h"
114 static void block_list_remove(struct sst_dsp *dsp, block_list_remove() argument
126 dev_err(dsp->dev, list_for_each_entry()
135 list_move(&block->list, &dsp->free_block_list); list_for_each_entry_safe()
136 dev_dbg(dsp->dev, "block freed %d:%d at offset 0x%x\n", list_for_each_entry_safe()
142 static int block_list_prepare(struct sst_dsp *dsp, block_list_prepare() argument
154 dev_err(dsp->dev, list_for_each_entry()
206 struct sst_dsp *dsp = (struct sst_dsp *)param; dma_chan_filter() local
208 return chan->device->dev == dsp->dma_dev; dma_chan_filter()
211 int sst_dsp_dma_get_channel(struct sst_dsp *dsp, int chan_id) sst_dsp_dma_get_channel() argument
213 struct sst_dma *dma = dsp->dma; sst_dsp_dma_get_channel()
222 dma->ch = dma_request_channel(mask, dma_chan_filter, dsp); sst_dsp_dma_get_channel()
224 dev_err(dsp->dev, "error: DMA request channel failed\n"); sst_dsp_dma_get_channel()
236 dev_err(dsp->dev, "error: unable to set DMA slave config %d\n", sst_dsp_dma_get_channel()
246 void sst_dsp_dma_put_channel(struct sst_dsp *dsp) sst_dsp_dma_put_channel() argument
248 struct sst_dma *dma = dsp->dma; sst_dsp_dma_put_channel()
328 struct sst_fw *sst_fw_new(struct sst_dsp *dsp, sst_fw_new() argument
334 if (!dsp->ops->parse_fw) sst_fw_new()
341 sst_fw->dsp = dsp; sst_fw_new()
346 sst_fw->dma_buf = dma_alloc_coherent(dsp->dma_dev, sst_fw->size, sst_fw_new()
349 dev_err(dsp->dev, "error: DMA alloc failed\n"); sst_fw_new()
357 if (dsp->fw_use_dma) { sst_fw_new()
358 err = sst_dsp_dma_get_channel(dsp, 0); sst_fw_new()
364 err = dsp->ops->parse_fw(sst_fw); sst_fw_new()
366 dev_err(dsp->dev, "error: parse fw failed %d\n", err); sst_fw_new()
370 if (dsp->fw_use_dma) sst_fw_new()
371 sst_dsp_dma_put_channel(dsp); sst_fw_new()
373 mutex_lock(&dsp->mutex); sst_fw_new()
374 list_add(&sst_fw->list, &dsp->fw_list); sst_fw_new()
375 mutex_unlock(&dsp->mutex); sst_fw_new()
380 if (dsp->fw_use_dma) sst_fw_new()
381 sst_dsp_dma_put_channel(dsp); sst_fw_new()
383 dma_free_coherent(dsp->dma_dev, sst_fw->size, sst_fw_new()
394 struct sst_dsp *dsp = sst_fw->dsp; sst_fw_reload() local
397 dev_dbg(dsp->dev, "reloading firmware\n"); sst_fw_reload()
400 ret = dsp->ops->parse_fw(sst_fw); sst_fw_reload()
402 dev_err(dsp->dev, "error: parse fw failed %d\n", ret); sst_fw_reload()
410 struct sst_dsp *dsp = sst_fw->dsp; sst_fw_unload() local
414 dev_dbg(dsp->dev, "unloading firmware\n"); sst_fw_unload()
416 mutex_lock(&dsp->mutex); sst_fw_unload()
419 list_for_each_entry_safe(module, mtmp, &dsp->module_list, list) { sst_fw_unload()
425 block_list_remove(dsp, &runtime->block_list); sst_fw_unload()
431 block_list_remove(dsp, &module->block_list); sst_fw_unload()
438 block_list_remove(dsp, &dsp->scratch_block_list); sst_fw_unload()
440 mutex_unlock(&dsp->mutex); sst_fw_unload()
447 struct sst_dsp *dsp = sst_fw->dsp; sst_fw_free() local
449 mutex_lock(&dsp->mutex); sst_fw_free()
451 mutex_unlock(&dsp->mutex); sst_fw_free()
454 dma_free_coherent(dsp->dma_dev, sst_fw->size, sst_fw->dma_buf, sst_fw_free()
461 void sst_fw_free_all(struct sst_dsp *dsp) sst_fw_free_all() argument
465 mutex_lock(&dsp->mutex); sst_fw_free_all()
466 list_for_each_entry_safe(sst_fw, t, &dsp->fw_list, list) { sst_fw_free_all()
469 dma_free_coherent(dsp->dev, sst_fw->size, sst_fw->dma_buf, sst_fw_free_all()
473 mutex_unlock(&dsp->mutex); sst_fw_free_all()
481 struct sst_dsp *dsp = sst_fw->dsp; sst_module_new() local
489 sst_module->dsp = dsp; sst_module_new()
499 mutex_lock(&dsp->mutex); sst_module_new()
500 list_add(&sst_module->list, &dsp->module_list); sst_module_new()
501 mutex_unlock(&dsp->mutex); sst_module_new()
510 struct sst_dsp *dsp = sst_module->dsp; sst_module_free() local
512 mutex_lock(&dsp->mutex); sst_module_free()
514 mutex_unlock(&dsp->mutex); sst_module_free()
523 struct sst_dsp *dsp = module->dsp; sst_module_runtime_new() local
531 runtime->dsp = dsp; sst_module_runtime_new()
535 mutex_lock(&dsp->mutex); sst_module_runtime_new()
537 mutex_unlock(&dsp->mutex); sst_module_runtime_new()
545 struct sst_dsp *dsp = runtime->dsp; sst_module_runtime_free() local
547 mutex_lock(&dsp->mutex); sst_module_runtime_free()
549 mutex_unlock(&dsp->mutex); sst_module_runtime_free()
555 static struct sst_mem_block *find_block(struct sst_dsp *dsp, find_block() argument
560 list_for_each_entry(block, &dsp->free_block_list, list) { find_block()
569 static int block_alloc_contiguous(struct sst_dsp *dsp, block_alloc_contiguous() argument
579 block = find_block(dsp, ba); block_alloc_contiguous()
581 list_splice(&tmp, &dsp->free_block_list); block_alloc_contiguous()
602 dev_dbg(dsp->dev, "block allocated %d:%d at offset 0x%x\n", block_alloc_contiguous()
606 list_splice(&tmp, &dsp->used_block_list); block_alloc_contiguous()
611 static int block_alloc(struct sst_dsp *dsp, struct sst_block_allocator *ba, block_alloc() argument
621 list_for_each_entry_safe(block, tmp, &dsp->free_block_list, list) { block_alloc()
633 list_move(&block->list, &dsp->used_block_list); block_alloc()
634 dev_dbg(dsp->dev, "block allocated %d:%d at offset 0x%x\n", block_alloc()
640 list_for_each_entry_safe(block, tmp, &dsp->free_block_list, list) { block_alloc()
652 ret = block_alloc_contiguous(dsp, ba, block_list); block_alloc()
663 int sst_alloc_blocks(struct sst_dsp *dsp, struct sst_block_allocator *ba, sst_alloc_blocks() argument
668 dev_dbg(dsp->dev, "block request 0x%x bytes at offset 0x%x type %d\n", sst_alloc_blocks()
671 mutex_lock(&dsp->mutex); sst_alloc_blocks()
673 ret = block_alloc(dsp, ba, block_list); sst_alloc_blocks()
675 dev_err(dsp->dev, "error: can't alloc blocks %d\n", ret); sst_alloc_blocks()
680 ret = block_list_prepare(dsp, block_list); sst_alloc_blocks()
682 dev_err(dsp->dev, "error: prepare failed\n"); sst_alloc_blocks()
685 mutex_unlock(&dsp->mutex); sst_alloc_blocks()
690 int sst_free_blocks(struct sst_dsp *dsp, struct list_head *block_list) sst_free_blocks() argument
692 mutex_lock(&dsp->mutex); sst_free_blocks()
693 block_list_remove(dsp, block_list); sst_free_blocks()
694 mutex_unlock(&dsp->mutex); sst_free_blocks()
700 static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba, block_alloc_fixed() argument
731 err = block_alloc_contiguous(dsp, &ba_tmp, block_list); list_for_each_entry_safe()
741 list_for_each_entry_safe(block, tmp, &dsp->free_block_list, list) {
752 list_move(&block->list, &dsp->used_block_list);
754 dev_dbg(dsp->dev, "block allocated %d:%d at offset 0x%x\n",
763 list_move(&block->list, &dsp->used_block_list);
769 err = block_alloc_contiguous(dsp, &ba_tmp, block_list);
783 struct sst_dsp *dsp = module->dsp; sst_module_alloc_blocks() local
793 dev_dbg(dsp->dev, "block request 0x%x bytes at offset 0x%x type %d\n", sst_module_alloc_blocks()
796 mutex_lock(&dsp->mutex); sst_module_alloc_blocks()
799 ret = block_alloc_fixed(dsp, &ba, &module->block_list); sst_module_alloc_blocks()
801 dev_err(dsp->dev, sst_module_alloc_blocks()
804 mutex_unlock(&dsp->mutex); sst_module_alloc_blocks()
809 ret = block_list_prepare(dsp, &module->block_list); sst_module_alloc_blocks()
811 dev_err(dsp->dev, "error: fw module prepare failed\n"); sst_module_alloc_blocks()
816 if (dsp->fw_use_dma) { sst_module_alloc_blocks()
817 ret = sst_dsp_dma_copyto(dsp, sst_module_alloc_blocks()
818 dsp->addr.lpe_base + module->offset, sst_module_alloc_blocks()
822 dev_err(dsp->dev, "error: module copy failed\n"); sst_module_alloc_blocks()
826 sst_memcpy32(dsp->addr.lpe + module->offset, module->data, sst_module_alloc_blocks()
829 mutex_unlock(&dsp->mutex); sst_module_alloc_blocks()
833 block_list_remove(dsp, &module->block_list); sst_module_alloc_blocks()
834 mutex_unlock(&dsp->mutex); sst_module_alloc_blocks()
842 struct sst_dsp *dsp = module->dsp; sst_module_free_blocks() local
844 mutex_lock(&dsp->mutex); sst_module_free_blocks()
845 block_list_remove(dsp, &module->block_list); sst_module_free_blocks()
846 mutex_unlock(&dsp->mutex); sst_module_free_blocks()
854 struct sst_dsp *dsp = runtime->dsp; sst_module_runtime_alloc_blocks() local
866 mutex_lock(&dsp->mutex); sst_module_runtime_alloc_blocks()
873 dev_dbg(dsp->dev, "persistent fixed block request 0x%x bytes type %d offset 0x%x\n", sst_module_runtime_alloc_blocks()
877 ret = block_alloc_fixed(dsp, &ba, &runtime->block_list); sst_module_runtime_alloc_blocks()
880 dev_dbg(dsp->dev, "persistent block request 0x%x bytes type %d\n", sst_module_runtime_alloc_blocks()
884 ret = block_alloc(dsp, &ba, &runtime->block_list); sst_module_runtime_alloc_blocks()
887 dev_err(dsp->dev, sst_module_runtime_alloc_blocks()
890 mutex_unlock(&dsp->mutex); sst_module_runtime_alloc_blocks()
896 ret = block_list_prepare(dsp, &runtime->block_list); sst_module_runtime_alloc_blocks()
898 dev_err(dsp->dev, "error: runtime block prepare failed\n"); sst_module_runtime_alloc_blocks()
902 mutex_unlock(&dsp->mutex); sst_module_runtime_alloc_blocks()
906 block_list_remove(dsp, &module->block_list); sst_module_runtime_alloc_blocks()
907 mutex_unlock(&dsp->mutex); sst_module_runtime_alloc_blocks()
914 struct sst_dsp *dsp = runtime->dsp; sst_module_runtime_free_blocks() local
916 mutex_lock(&dsp->mutex); sst_module_runtime_free_blocks()
917 block_list_remove(dsp, &runtime->block_list); sst_module_runtime_free_blocks()
918 mutex_unlock(&dsp->mutex); sst_module_runtime_free_blocks()
926 struct sst_dsp *dsp = runtime->dsp; sst_module_runtime_save() local
930 dev_dbg(dsp->dev, "saving runtime %d memory at 0x%x size 0x%x\n", sst_module_runtime_save()
934 context->buffer = dma_alloc_coherent(dsp->dma_dev, sst_module_runtime_save()
938 dev_err(dsp->dev, "error: DMA context alloc failed\n"); sst_module_runtime_save()
942 mutex_lock(&dsp->mutex); sst_module_runtime_save()
944 if (dsp->fw_use_dma) { sst_module_runtime_save()
946 ret = sst_dsp_dma_get_channel(dsp, 0); sst_module_runtime_save()
950 ret = sst_dsp_dma_copyfrom(dsp, context->dma_buffer, sst_module_runtime_save()
951 dsp->addr.lpe_base + runtime->persistent_offset, sst_module_runtime_save()
953 sst_dsp_dma_put_channel(dsp); sst_module_runtime_save()
955 dev_err(dsp->dev, "error: context copy failed\n"); sst_module_runtime_save()
959 sst_memcpy32(context->buffer, dsp->addr.lpe + sst_module_runtime_save()
964 mutex_unlock(&dsp->mutex); sst_module_runtime_save()
972 struct sst_dsp *dsp = runtime->dsp; sst_module_runtime_restore() local
976 dev_dbg(dsp->dev, "restoring runtime %d memory at 0x%x size 0x%x\n", sst_module_runtime_restore()
980 mutex_lock(&dsp->mutex); sst_module_runtime_restore()
983 dev_info(dsp->dev, "no context buffer need to restore!\n"); sst_module_runtime_restore()
987 if (dsp->fw_use_dma) { sst_module_runtime_restore()
989 ret = sst_dsp_dma_get_channel(dsp, 0); sst_module_runtime_restore()
993 ret = sst_dsp_dma_copyto(dsp, sst_module_runtime_restore()
994 dsp->addr.lpe_base + runtime->persistent_offset, sst_module_runtime_restore()
996 sst_dsp_dma_put_channel(dsp); sst_module_runtime_restore()
998 dev_err(dsp->dev, "error: module copy failed\n"); sst_module_runtime_restore()
1002 sst_memcpy32(dsp->addr.lpe + runtime->persistent_offset, sst_module_runtime_restore()
1005 dma_free_coherent(dsp->dma_dev, module->persistent_size, sst_module_runtime_restore()
1010 mutex_unlock(&dsp->mutex); sst_module_runtime_restore()
1016 struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, sst_mem_block_register() argument
1030 block->dsp = dsp; sst_mem_block_register()
1034 mutex_lock(&dsp->mutex); sst_mem_block_register()
1035 list_add(&block->list, &dsp->free_block_list); sst_mem_block_register()
1036 mutex_unlock(&dsp->mutex); sst_mem_block_register()
1043 void sst_mem_block_unregister_all(struct sst_dsp *dsp) sst_mem_block_unregister_all() argument
1047 mutex_lock(&dsp->mutex); sst_mem_block_unregister_all()
1050 list_for_each_entry_safe(block, tmp, &dsp->used_block_list, list) { sst_mem_block_unregister_all()
1056 list_for_each_entry_safe(block, tmp, &dsp->free_block_list, list) { sst_mem_block_unregister_all()
1061 mutex_unlock(&dsp->mutex); sst_mem_block_unregister_all()
1066 int sst_block_alloc_scratch(struct sst_dsp *dsp) sst_block_alloc_scratch() argument
1072 mutex_lock(&dsp->mutex); sst_block_alloc_scratch()
1075 dsp->scratch_size = 0; sst_block_alloc_scratch()
1076 list_for_each_entry(module, &dsp->module_list, list) { sst_block_alloc_scratch()
1077 dev_dbg(dsp->dev, "module %d scratch req 0x%x bytes\n", sst_block_alloc_scratch()
1079 if (dsp->scratch_size < module->scratch_size) sst_block_alloc_scratch()
1080 dsp->scratch_size = module->scratch_size; sst_block_alloc_scratch()
1083 dev_dbg(dsp->dev, "scratch buffer required is 0x%x bytes\n", sst_block_alloc_scratch()
1084 dsp->scratch_size); sst_block_alloc_scratch()
1086 if (dsp->scratch_size == 0) { sst_block_alloc_scratch()
1087 dev_info(dsp->dev, "no modules need scratch buffer\n"); sst_block_alloc_scratch()
1088 mutex_unlock(&dsp->mutex); sst_block_alloc_scratch()
1093 dev_dbg(dsp->dev, "allocating scratch blocks\n"); sst_block_alloc_scratch()
1095 ba.size = dsp->scratch_size; sst_block_alloc_scratch()
1099 if (dsp->scratch_offset != 0) { sst_block_alloc_scratch()
1101 dev_dbg(dsp->dev, "block request 0x%x bytes type %d at 0x%x\n", sst_block_alloc_scratch()
1104 ba.offset = dsp->scratch_offset; sst_block_alloc_scratch()
1107 ret = block_alloc_fixed(dsp, &ba, &dsp->scratch_block_list); sst_block_alloc_scratch()
1110 dev_dbg(dsp->dev, "block request 0x%x bytes type %d\n", sst_block_alloc_scratch()
1114 ret = block_alloc(dsp, &ba, &dsp->scratch_block_list); sst_block_alloc_scratch()
1117 dev_err(dsp->dev, "error: can't alloc scratch blocks\n"); sst_block_alloc_scratch()
1118 mutex_unlock(&dsp->mutex); sst_block_alloc_scratch()
1122 ret = block_list_prepare(dsp, &dsp->scratch_block_list); sst_block_alloc_scratch()
1124 dev_err(dsp->dev, "error: scratch block prepare failed\n"); sst_block_alloc_scratch()
1125 mutex_unlock(&dsp->mutex); sst_block_alloc_scratch()
1130 dsp->scratch_offset = ba.offset; sst_block_alloc_scratch()
1131 mutex_unlock(&dsp->mutex); sst_block_alloc_scratch()
1132 return dsp->scratch_size; sst_block_alloc_scratch()
1137 void sst_block_free_scratch(struct sst_dsp *dsp) sst_block_free_scratch() argument
1139 mutex_lock(&dsp->mutex); sst_block_free_scratch()
1140 block_list_remove(dsp, &dsp->scratch_block_list); sst_block_free_scratch()
1141 mutex_unlock(&dsp->mutex); sst_block_free_scratch()
1146 struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id) sst_module_get_from_id() argument
1150 mutex_lock(&dsp->mutex); sst_module_get_from_id()
1152 list_for_each_entry(module, &dsp->module_list, list) { sst_module_get_from_id()
1154 mutex_unlock(&dsp->mutex); sst_module_get_from_id()
1159 mutex_unlock(&dsp->mutex); sst_module_get_from_id()
1168 struct sst_dsp *dsp = module->dsp; sst_module_runtime_get_from_id() local
1170 mutex_lock(&dsp->mutex); sst_module_runtime_get_from_id()
1174 mutex_unlock(&dsp->mutex); sst_module_runtime_get_from_id()
1179 mutex_unlock(&dsp->mutex); sst_module_runtime_get_from_id()
1185 u32 sst_dsp_get_offset(struct sst_dsp *dsp, u32 offset, sst_dsp_get_offset() argument
1190 return offset - dsp->addr.iram_offset + sst_dsp_get_offset()
1191 dsp->addr.dsp_iram_offset; sst_dsp_get_offset()
1193 return offset - dsp->addr.dram_offset + sst_dsp_get_offset()
1194 dsp->addr.dsp_dram_offset; sst_dsp_get_offset()
H A Dsst-ipc.c32 #include "sst-dsp.h"
33 #include "sst-dsp-priv.h"
65 spin_lock_irqsave(&ipc->dsp->spinlock, flags); tx_wait_done()
81 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); tx_wait_done()
92 spin_lock_irqsave(&ipc->dsp->spinlock, flags); ipc_tx_message()
96 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); ipc_tx_message()
112 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); ipc_tx_message()
166 spin_lock_irqsave(&ipc->dsp->spinlock, flags); ipc_tx_msgs()
169 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); ipc_tx_msgs()
175 if (ipc->ops.is_dsp_busy && ipc->ops.is_dsp_busy(ipc->dsp)) { ipc_tx_msgs()
176 dev_dbg(ipc->dev, "ipc_tx_msgs dsp busy\n"); ipc_tx_msgs()
177 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); ipc_tx_msgs()
187 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); ipc_tx_msgs()
250 spin_lock_irqsave(&ipc->dsp->spinlock, flags); sst_ipc_drop_all()
262 spin_unlock_irqrestore(&ipc->dsp->spinlock, flags); sst_ipc_drop_all()
H A Dsst-dsp.h216 void *dsp; member in struct:sst_pdata
268 int sst_dsp_dma_get_channel(struct sst_dsp *dsp, int chan_id);
269 void sst_dsp_dma_put_channel(struct sst_dsp *dsp);
276 void sst_dsp_ipc_msg_tx(struct sst_dsp *dsp, u32 msg);
277 u32 sst_dsp_ipc_msg_rx(struct sst_dsp *dsp);
280 int sst_dsp_mailbox_init(struct sst_dsp *dsp, u32 inbox_offset,
282 void sst_dsp_inbox_write(struct sst_dsp *dsp, void *message, size_t bytes);
283 void sst_dsp_inbox_read(struct sst_dsp *dsp, void *message, size_t bytes);
284 void sst_dsp_outbox_write(struct sst_dsp *dsp, void *message, size_t bytes);
285 void sst_dsp_outbox_read(struct sst_dsp *dsp, void *message, size_t bytes);
286 void sst_dsp_mailbox_dump(struct sst_dsp *dsp, size_t bytes);
287 int sst_dsp_register_poll(struct sst_dsp *dsp, u32 offset, u32 mask,
H A Dsst-dsp-priv.h25 #include "../skylake/skl-sst-dsp.h"
114 struct sst_dsp *dsp; member in struct:sst_fw
156 struct sst_dsp *dsp; member in struct:sst_module_runtime
195 struct sst_dsp *dsp; member in struct:sst_module
238 struct sst_dsp *dsp; member in struct:sst_mem_block
339 struct sst_fw *sst_fw_new(struct sst_dsp *dsp,
342 void sst_fw_free_all(struct sst_dsp *dsp);
350 struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id);
369 int sst_alloc_blocks(struct sst_dsp *dsp, struct sst_block_allocator *ba,
371 int sst_free_blocks(struct sst_dsp *dsp, struct list_head *block_list);
374 int sst_block_alloc_scratch(struct sst_dsp *dsp);
375 void sst_block_free_scratch(struct sst_dsp *dsp);
378 struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset,
381 void sst_mem_block_unregister_all(struct sst_dsp *dsp);
387 u32 sst_dsp_get_offset(struct sst_dsp *dsp, u32 offset,
H A Dsst-ipc.h54 bool (*is_dsp_busy)(struct sst_dsp *dsp);
60 struct sst_dsp *dsp; member in struct:sst_generic_ipc
H A Dsst-dsp.c25 #include "sst-dsp.h"
26 #include "sst-dsp-priv.h"
342 void sst_dsp_ipc_msg_tx(struct sst_dsp *dsp, u32 msg) sst_dsp_ipc_msg_tx() argument
344 sst_dsp_shim_write_unlocked(dsp, SST_IPCX, msg | SST_IPCX_BUSY); sst_dsp_ipc_msg_tx()
349 u32 sst_dsp_ipc_msg_rx(struct sst_dsp *dsp) sst_dsp_ipc_msg_rx() argument
353 msg = sst_dsp_shim_read_unlocked(dsp, SST_IPCX); sst_dsp_ipc_msg_rx()
H A Dsst-acpi.c23 #include "sst-dsp.h"
/linux-4.4.14/arch/mips/include/asm/
H A Ddsp.h45 tsk->thread.dsp.dspr[0] = mfhi1(); \
46 tsk->thread.dsp.dspr[1] = mflo1(); \
47 tsk->thread.dsp.dspr[2] = mfhi2(); \
48 tsk->thread.dsp.dspr[3] = mflo2(); \
49 tsk->thread.dsp.dspr[4] = mfhi3(); \
50 tsk->thread.dsp.dspr[5] = mflo3(); \
51 tsk->thread.dsp.dspcontrol = rddsp(DSP_MASK); \
62 mthi1(tsk->thread.dsp.dspr[0]); \
63 mtlo1(tsk->thread.dsp.dspr[1]); \
64 mthi2(tsk->thread.dsp.dspr[2]); \
65 mtlo2(tsk->thread.dsp.dspr[3]); \
66 mthi3(tsk->thread.dsp.dspr[4]); \
67 mtlo3(tsk->thread.dsp.dspr[5]); \
68 wrdsp(tsk->thread.dsp.dspcontrol, DSP_MASK); \
82 tsk->thread.dsp.dspr; \
H A Dsigcontext.h26 __u32 sc_dsp; /* dsp status, was sc_ssflags */
H A Dmipsregs.h1525 " .set dsp \n" \
1537 " .set dsp \n" \
1549 " .set dsp \n" \
1561 " .set dsp \n" \
1573 " .set dsp \n" \
1585 " .set dsp \n" \
1597 " .set dsp \n" \
1609 " .set dsp \n" \
1621 " .set dsp \n" \
1633 " .set dsp \n" \
1645 " .set dsp \n" \
1656 " .set dsp \n" \
1667 " .set dsp \n" \
1678 " .set dsp \n" \
1689 " .set dsp \n" \
1700 " .set dsp \n" \
1711 " .set dsp \n" \
1722 " .set dsp \n" \
H A Dswitch_to.h17 #include <asm/dsp.h>
H A Dprocessor.h263 struct mips_dsp_state dsp; member in struct:thread_struct
325 .dsp = { \
/linux-4.4.14/sound/isa/sb/
H A DMakefile7 snd-sb8-dsp-objs := sb8_main.o sb8_midi.o
8 snd-sb16-dsp-objs := sb16_main.o
18 obj-$(CONFIG_SND_SB16_DSP) += snd-sb16-dsp.o
19 obj-$(CONFIG_SND_SB8_DSP) += snd-sb8-dsp.o
/linux-4.4.14/sound/soc/intel/baytrail/
H A DMakefile2 sst-baytrail-ipc.o sst-baytrail-pcm.o sst-baytrail-dsp.o
H A Dsst-baytrail-ipc.c32 #include "../common/sst-dsp.h"
33 #include "../common/sst-dsp-priv.h"
171 struct sst_dsp *dsp; member in struct:sst_byt
260 sst_dsp_inbox_read(byt->dsp, msg->rx_data, msg->rx_size); sst_byt_process_reply()
284 struct sst_dsp *sst = byt->dsp; sst_byt_process_notification()
358 struct sst_dsp *sst = byt->dsp; sst_byt_stream_new()
451 struct sst_dsp *sst = byt->dsp; sst_byt_stream_free()
559 struct sst_dsp *sst = byt->dsp; sst_byt_get_dsp_position()
573 return byt->dsp; sst_byt_get_dsp()
583 struct sst_byt *byt = pdata->dsp; sst_byt_dsp_suspend_late()
585 dev_dbg(byt->dev, "dsp reset\n"); sst_byt_dsp_suspend_late()
586 sst_dsp_reset(byt->dsp); sst_byt_dsp_suspend_late()
588 dev_dbg(byt->dev, "dsp in reset\n"); sst_byt_dsp_suspend_late()
599 struct sst_byt *byt = pdata->dsp; sst_byt_dsp_boot()
602 dev_dbg(byt->dev, "reload dsp fw\n"); sst_byt_dsp_boot()
604 sst_dsp_reset(byt->dsp); sst_byt_dsp_boot()
614 sst_dsp_boot(byt->dsp); sst_byt_dsp_boot()
615 dev_dbg(byt->dev, "dsp booting...\n"); sst_byt_dsp_boot()
623 struct sst_byt *byt = pdata->dsp; sst_byt_dsp_wait_for_ready()
626 dev_dbg(byt->dev, "wait for dsp reboot\n"); sst_byt_dsp_wait_for_ready()
635 dev_dbg(byt->dev, "dsp rebooted\n"); sst_byt_dsp_wait_for_ready()
643 sst_dsp_outbox_write(ipc->dsp, msg->tx_data, msg->tx_size); byt_tx_msg()
645 sst_dsp_shim_write64_unlocked(ipc->dsp, SST_IPCX, msg->header); byt_tx_msg()
650 struct sst_dsp *sst = ipc->dsp; byt_shim_dbg()
682 static bool byt_is_dsp_busy(struct sst_dsp *dsp) byt_is_dsp_busy() argument
686 ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX); byt_is_dsp_busy()
725 byt->dsp = sst_dsp_new(dev, &byt_dev, pdata); sst_byt_dsp_init()
726 if (byt->dsp == NULL) { sst_byt_dsp_init()
731 ipc->dsp = byt->dsp; sst_byt_dsp_init()
734 sst_dsp_reset(byt->dsp); sst_byt_dsp_init()
736 byt_sst_fw = sst_fw_new(byt->dsp, pdata->fw, byt); sst_byt_dsp_init()
744 sst_dsp_boot(byt->dsp); sst_byt_dsp_init()
754 sst_dsp_inbox_read(byt->dsp, &init, sizeof(init)); sst_byt_dsp_init()
762 pdata->dsp = byt; sst_byt_dsp_init()
768 sst_dsp_reset(byt->dsp); sst_byt_dsp_init()
771 sst_dsp_free(byt->dsp); sst_byt_dsp_init()
782 struct sst_byt *byt = pdata->dsp; sst_byt_dsp_free()
784 sst_dsp_reset(byt->dsp); sst_byt_dsp_free()
785 sst_fw_free_all(byt->dsp); sst_byt_dsp_free()
786 sst_dsp_free(byt->dsp); sst_byt_dsp_free()
H A Dsst-baytrail-dsp.c25 #include "../common/sst-dsp.h"
26 #include "../common/sst-dsp-priv.h"
65 static int sst_byt_parse_module(struct sst_dsp *dsp, struct sst_fw *fw, sst_byt_parse_module() argument
86 dev_err(dsp->dev, "block %d size invalid\n", count); sst_byt_parse_module()
93 dsp->addr.iram_offset; sst_byt_parse_module()
98 dsp->addr.dram_offset; sst_byt_parse_module()
103 (dsp->addr.fw_ext - dsp->addr.lpe); sst_byt_parse_module()
107 dev_err(dsp->dev, "wrong ram type 0x%x in block0x%x\n", sst_byt_parse_module()
126 struct sst_dsp *dsp = sst_fw->dsp; sst_byt_parse_fw_image() local
136 dev_err(dsp->dev, "Invalid FW sign/filesize mismatch\n"); sst_byt_parse_fw_image()
140 dev_dbg(dsp->dev, sst_byt_parse_fw_image()
148 ret = sst_byt_parse_module(dsp, sst_fw, module); sst_byt_parse_fw_image()
150 dev_err(dsp->dev, "invalid module %d\n", count); sst_byt_parse_fw_image()
H A Dsst-baytrail-pcm.c23 #include "../common/sst-dsp-priv.h"
24 #include "../common/sst-dsp.h"
380 priv_data->byt = plat_data->dsp; sst_byt_pcm_probe()
/linux-4.4.14/sound/soc/intel/haswell/
H A DMakefile2 sst-haswell-ipc.o sst-haswell-pcm.o sst-haswell-dsp.o
H A Dsst-haswell-ipc.c37 #include "../common/sst-dsp.h"
38 #include "../common/sst-dsp-priv.h"
282 struct sst_dsp *dsp; member in struct:sst_hsw
453 sst_dsp_read(hsw->dsp, &fw_ready, offset, sizeof(fw_ready)); hsw_fw_ready()
455 sst_dsp_mailbox_init(hsw->dsp, fw_ready.inbox_offset, hsw_fw_ready()
496 sst_dsp_inbox_read(hsw->dsp, glitch, sizeof(*glitch)); hsw_notification_work()
506 sst_dsp_inbox_read(hsw->dsp, pos, sizeof(*pos)); hsw_notification_work()
519 sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD, hsw_notification_work()
523 sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); hsw_notification_work()
580 sst_dsp_inbox_read(hsw->dsp, msg->rx_data, hsw_process_reply()
585 sst_dsp_outbox_read(hsw->dsp, msg->rx_data, hsw_process_reply()
716 hsw->dsp, &stream->curr_pos, sizeof(stream->curr_pos)); hsw_log_message()
726 struct sst_dsp *sst = hsw->dsp; hsw_process_notification()
786 ipcx = sst_dsp_ipc_msg_rx(hsw->dsp); hsw_irq_thread()
852 sst_dsp_read(hsw->dsp, volume, sst_hsw_stream_get_volume()
917 sst_dsp_read(hsw->dsp, volume, sst_hsw_mixer_get_volume()
983 struct sst_dsp *sst = hsw->dsp; sst_hsw_stream_new()
1009 struct sst_dsp *sst = hsw->dsp; sst_hsw_stream_free()
1164 struct sst_dsp *dsp = sst_hsw_get_dsp(hsw); sst_hsw_stream_set_module_info() local
1178 sst_dsp_get_offset(dsp, runtime->persistent_offset, SST_MEM_DRAM); sst_hsw_stream_set_module_info()
1182 sst_dsp_get_offset(dsp, dsp->scratch_offset, SST_MEM_DRAM); sst_hsw_stream_set_module_info()
1183 stream->request.scratch_mem.size = dsp->scratch_size; sst_hsw_stream_set_module_info()
1377 sst_dsp_read(hsw->dsp, &rpos, sst_hsw_get_dsp_position()
1389 sst_dsp_read(hsw->dsp, &ppos, sst_hsw_get_dsp_presentation_position()
1464 struct sst_dsp *dsp = hsw->dsp; sst_hsw_runtime_module_create() local
1469 module = sst_module_get_from_id(dsp, mod_id); sst_hsw_runtime_module_create()
1471 dev_err(dsp->dev, "error: failed to get module %d for pcm\n", sst_hsw_runtime_module_create()
1478 dev_err(dsp->dev, "error: failed to create module %d runtime\n", sst_hsw_runtime_module_create()
1485 dev_err(dsp->dev, "error: failed to alloc blocks for module %d runtime\n", sst_hsw_runtime_module_create()
1491 dev_dbg(dsp->dev, "runtime id %d created for module %d\n", runtime->id, sst_hsw_runtime_module_create()
1505 struct sst_dsp *sst = hsw->dsp; sst_hsw_dx_state_dump()
1558 struct sst_dsp *sst = hsw->dsp; sst_hsw_dx_state_restore()
1587 struct sst_dsp *dsp = hsw->dsp; sst_hsw_dsp_load() local
1593 ret = sst_dsp_wake(dsp); sst_hsw_dsp_load()
1599 ret = sst_dsp_dma_get_channel(dsp, 0); sst_hsw_dsp_load()
1605 list_for_each_entry_safe_reverse(sst_fw, t, &dsp->fw_list, list) { sst_hsw_dsp_load()
1609 sst_dsp_dma_put_channel(dsp); sst_hsw_dsp_load()
1613 ret = sst_block_alloc_scratch(hsw->dsp); sst_hsw_dsp_load()
1617 sst_dsp_dma_put_channel(dsp); sst_hsw_dsp_load()
1623 struct sst_dsp *dsp = hsw->dsp; sst_hsw_dsp_restore() local
1628 ret = sst_dsp_dma_get_channel(dsp, 0); sst_hsw_dsp_restore()
1637 sst_dsp_dma_put_channel(dsp); sst_hsw_dsp_restore()
1640 sst_dsp_dma_put_channel(dsp); sst_hsw_dsp_restore()
1643 sst_dsp_boot(dsp); sst_hsw_dsp_restore()
1652 dev_dbg(hsw->dev, "audio dsp runtime suspend\n"); sst_hsw_dsp_runtime_suspend()
1658 sst_dsp_stall(hsw->dsp); sst_hsw_dsp_runtime_suspend()
1672 struct sst_dsp *dsp = hsw->dsp; sst_hsw_dsp_runtime_sleep() local
1674 list_for_each_entry_safe(sst_fw, t, &dsp->fw_list, list) { sst_hsw_dsp_runtime_sleep()
1677 sst_block_free_scratch(dsp); sst_hsw_dsp_runtime_sleep()
1681 sst_dsp_sleep(dsp); sst_hsw_dsp_runtime_sleep()
1691 dev_dbg(dev, "audio dsp runtime resume\n"); sst_hsw_dsp_runtime_resume()
1706 sst_dsp_shim_read_unlocked(hsw->dsp, SST_IPCD), sst_hsw_dsp_runtime_resume()
1707 sst_dsp_shim_read_unlocked(hsw->dsp, SST_IPCX)); sst_hsw_dsp_runtime_resume()
1724 return hsw->dsp; sst_hsw_get_dsp()
1734 module = sst_module_get_from_id(hsw->dsp, id); sst_hsw_init_module_state()
1749 module = sst_module_get_from_id(hsw->dsp, module_id); sst_hsw_is_module_loaded()
1760 module = sst_module_get_from_id(hsw->dsp, module_id); sst_hsw_is_module_active()
1851 struct sst_dsp *dsp = hsw->dsp; sst_hsw_module_load() local
1855 module = sst_module_get_from_id(dsp, module_id); sst_hsw_module_load()
1860 fw = dsp->pdata->fw; sst_hsw_module_load()
1876 hsw_sst_fw = sst_fw_new(dsp, fw, hsw); sst_hsw_module_load()
1882 module = sst_module_get_from_id(dsp, module_id); sst_hsw_module_load()
1907 struct sst_dsp *dsp = hsw->dsp; sst_hsw_module_enable() local
1919 module = sst_module_get_from_id(dsp, module_id); sst_hsw_module_enable()
1941 sst_dsp_get_offset(dsp, sst_hsw_module_enable()
1946 sst_dsp_get_offset(dsp, sst_hsw_module_enable()
1947 dsp->scratch_offset, SST_MEM_DRAM); sst_hsw_module_enable()
1973 struct sst_dsp *dsp = hsw->dsp; sst_hsw_module_disable() local
1985 module = sst_module_get_from_id(dsp, module_id); sst_hsw_module_disable()
2057 dma_free_coherent(hsw->dsp->dma_dev, sst_hsw_module_set_param()
2071 sst_dsp_outbox_write(ipc->dsp, msg->tx_data, msg->tx_size); hsw_tx_msg()
2072 sst_dsp_ipc_msg_tx(ipc->dsp, msg->header); hsw_tx_msg()
2077 struct sst_dsp *sst = ipc->dsp; hsw_shim_dbg()
2105 static bool hsw_is_dsp_busy(struct sst_dsp *dsp) hsw_is_dsp_busy() argument
2109 ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX); hsw_is_dsp_busy()
2148 hsw->dsp = sst_dsp_new(dev, &hsw_dev, pdata); sst_hsw_dsp_init()
2149 if (hsw->dsp == NULL) { sst_hsw_dsp_init()
2154 ipc->dsp = hsw->dsp; sst_hsw_dsp_init()
2157 hsw->dx_context = dma_alloc_coherent(hsw->dsp->dma_dev, sst_hsw_dsp_init()
2165 sst_dsp_reset(hsw->dsp); sst_hsw_dsp_init()
2176 ret = sst_block_alloc_scratch(hsw->dsp); sst_hsw_dsp_init()
2184 sst_dsp_boot(hsw->dsp); sst_hsw_dsp_init()
2190 sst_dsp_shim_read_unlocked(hsw->dsp, SST_IPCD), sst_hsw_dsp_init()
2191 sst_dsp_shim_read_unlocked(hsw->dsp, SST_IPCX)); sst_hsw_dsp_init()
2208 pdata->dsp = hsw; sst_hsw_dsp_init()
2212 sst_dsp_reset(hsw->dsp); sst_hsw_dsp_init()
2213 sst_fw_free_all(hsw->dsp); sst_hsw_dsp_init()
2215 dma_free_coherent(hsw->dsp->dma_dev, SST_HSW_DX_CONTEXT_SIZE, sst_hsw_dsp_init()
2218 sst_dsp_free(hsw->dsp); sst_hsw_dsp_init()
2228 struct sst_hsw *hsw = pdata->dsp; sst_hsw_dsp_free()
2230 sst_dsp_reset(hsw->dsp); sst_hsw_dsp_free()
2231 sst_fw_free_all(hsw->dsp); sst_hsw_dsp_free()
2232 dma_free_coherent(hsw->dsp->dma_dev, SST_HSW_DX_CONTEXT_SIZE, sst_hsw_dsp_free()
2234 sst_dsp_free(hsw->dsp); sst_hsw_dsp_free()
H A Dsst-haswell-dsp.c31 #include "../common/sst-dsp.h"
32 #include "../common/sst-dsp-priv.h"
88 static int hsw_parse_module(struct sst_dsp *dsp, struct sst_fw *fw, hsw_parse_module() argument
107 dev_dbg(dsp->dev, "new module sign 0x%s size 0x%x blocks 0x%x type 0x%x\n", hsw_parse_module()
110 dev_dbg(dsp->dev, " entrypoint 0x%x\n", module->entry_point); hsw_parse_module()
111 dev_dbg(dsp->dev, " persistent 0x%x scratch 0x%x\n", hsw_parse_module()
129 dev_err(dsp->dev, hsw_parse_module()
137 ram = dsp->addr.lpe; hsw_parse_module()
139 block->ram_offset + dsp->addr.iram_offset; hsw_parse_module()
144 ram = dsp->addr.lpe; hsw_parse_module()
149 dev_err(dsp->dev, "error: bad type 0x%x for block 0x%x\n", hsw_parse_module()
159 dev_dbg(dsp->dev, "module block %d type 0x%x " hsw_parse_module()
166 dev_err(dsp->dev, "error: could not allocate blocks for module %d\n", hsw_parse_module()
183 struct sst_dsp *dsp = sst_fw->dsp; hsw_parse_fw_image() local
192 dev_err(dsp->dev, "error: invalid fw sign/filesize mismatch\n"); hsw_parse_fw_image()
196 dev_dbg(dsp->dev, "header size=0x%x modules=0x%x fmt=0x%x size=%zu\n", hsw_parse_fw_image()
205 ret = hsw_parse_module(dsp, sst_fw, module); hsw_parse_fw_image()
207 dev_err(dsp->dev, "error: invalid module %d\n", count); hsw_parse_fw_image()
420 dev_dbg(sst->dev, "HSW_PM dsp runtime suspend\n"); hsw_sleep()
428 dev_dbg(sst->dev, "HSW_PM dsp runtime suspend exit\n"); hsw_sleep()
435 dev_dbg(sst->dev, "HSW_PM dsp runtime resume\n"); hsw_wake()
441 dev_dbg(sst->dev, "HSW_PM dsp runtime resume exit\n"); hsw_wake()
500 struct sst_dsp *sst = block->dsp; hsw_block_get_bit()
531 struct sst_dsp *sst = block->dsp; sst_mem_block_dummy_read()
540 struct sst_dsp *sst = block->dsp; hsw_block_enable()
546 dev_dbg(block->dsp->dev, " enabled block %d:%d at offset 0x%x\n", hsw_block_enable()
576 struct sst_dsp *sst = block->dsp; hsw_block_disable()
582 dev_dbg(block->dsp->dev, " disabled block %d:%d at offset 0x%x\n", hsw_block_disable()
H A Dsst-haswell-pcm.c33 #include "../common/sst-dsp-priv.h"
34 #include "../common/sst-dsp.h"
480 struct sst_dsp *dsp; hsw_pcm_hw_params() local
635 dsp = sst_hsw_get_dsp(hsw); hsw_pcm_hw_params()
637 module_data = sst_module_get_from_id(dsp, module_id); hsw_pcm_hw_params()
1069 priv_data->hsw = pdata->dsp; hsw_pcm_probe()
1173 priv_data->hsw = sst_pdata->dsp; hsw_pcm_dev_probe()
1280 /* put parameters from buffer to dsp */ hsw_pcm_runtime_resume()
/linux-4.4.14/include/uapi/linux/
H A Dsound.h14 #define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
16 #define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
26 #define SND_DEV_ADSP 12 /* Like /dev/dsp (obsolete) */
H A Dtelephony.h77 dsp enumerator in enum:__anon14520
H A Dsoundcard.h537 * IOCTL commands for /dev/dsp and /dev/audio
/linux-4.4.14/sound/soc/intel/skylake/
H A DMakefile7 snd-soc-skl-ipc-objs := skl-sst-ipc.o skl-sst-dsp.o skl-sst-cldma.o \
H A Dskl-sst-dsp.c2 * skl-sst-dsp.c - SKL SST library generic function
20 #include "../common/sst-dsp.h"
22 #include "../common/sst-dsp-priv.h"
124 dev_dbg(ctx->dev, "dsp unset reset fails\n"); skl_dsp_start_core()
191 dev_dbg(ctx->dev, "dsp core power up failed\n"); skl_dsp_enable_core()
204 dev_err(ctx->dev, "dsp core reset failed\n"); skl_dsp_disable_core()
211 dev_err(ctx->dev, "dsp core power down failed\n"); skl_dsp_disable_core()
228 dev_dbg(ctx->dev, "dsp core is already enabled, so reset the dap core\n"); skl_dsp_boot()
231 dev_err(ctx->dev, "dsp reset failed\n"); skl_dsp_boot()
237 dev_err(ctx->dev, "dsp start failed\n"); skl_dsp_boot()
245 dev_err(ctx->dev, "dsp disable core failes\n"); skl_dsp_boot()
334 void skl_dsp_free(struct sst_dsp *dsp) skl_dsp_free() argument
336 skl_ipc_int_disable(dsp); skl_dsp_free()
338 free_irq(dsp->irq, dsp); skl_dsp_free()
339 skl_dsp_disable_core(dsp); skl_dsp_free()
H A Dskl-sst.c22 #include "../common/sst-dsp.h"
23 #include "../common/sst-dsp-priv.h"
90 dev_err(ctx->dev, "Boot dsp core failed ret: %d", ret); skl_load_base_firmware()
185 dev_err(ctx->dev, "disable dsp core failed ret: %d\n", ret); skl_set_dsp_D3()
226 struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp) skl_sst_dsp_init()
239 skl->dsp = skl_dsp_ctx_init(dev, &skl_dev, irq); skl_sst_dsp_init()
240 if (!skl->dsp) { skl_sst_dsp_init()
245 sst = skl->dsp; skl_sst_dsp_init()
265 if (dsp) skl_sst_dsp_init()
266 *dsp = skl; skl_sst_dsp_init()
278 ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp); skl_sst_dsp_cleanup()
279 ctx->dsp->ops->free(ctx->dsp); skl_sst_dsp_cleanup()
225 skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp) skl_sst_dsp_init() argument
H A Dskl-sst-ipc.h50 struct sst_dsp *dsp; member in struct:skl_sst
117 void skl_ipc_int_enable(struct sst_dsp *dsp);
120 void skl_ipc_int_disable(struct sst_dsp *dsp);
122 bool skl_ipc_int_status(struct sst_dsp *dsp);
H A Dskl-sst-ipc.c17 #include "../common/sst-dsp.h"
18 #include "../common/sst-dsp-priv.h"
19 #include "skl-sst-dsp.h"
258 static bool skl_ipc_is_dsp_busy(struct sst_dsp *dsp) skl_ipc_is_dsp_busy() argument
262 hipci = sst_dsp_shim_read_unlocked(dsp, SKL_ADSP_REG_HIPCI); skl_ipc_is_dsp_busy()
272 sst_dsp_outbox_write(ipc->dsp, msg->tx_data, msg->tx_size); skl_ipc_tx_msg()
273 sst_dsp_shim_write_unlocked(ipc->dsp, SKL_ADSP_REG_HIPCIE, skl_ipc_tx_msg()
275 sst_dsp_shim_write_unlocked(ipc->dsp, SKL_ADSP_REG_HIPCI, skl_ipc_tx_msg()
368 ipc->dsp->fw_ops.get_fw_errcode(ipc->dsp)); skl_ipc_process_reply()
377 struct sst_dsp *dsp = context; skl_dsp_irq_thread_handler() local
378 struct skl_sst *skl = sst_dsp_get_thread_context(dsp); skl_dsp_irq_thread_handler()
384 if (dsp->intr_status & SKL_ADSPIS_CL_DMA) skl_dsp_irq_thread_handler()
385 skl_cldma_process_intr(dsp); skl_dsp_irq_thread_handler()
388 if (!(dsp->intr_status & SKL_ADSPIS_IPC)) skl_dsp_irq_thread_handler()
391 hipcie = sst_dsp_shim_read_unlocked(dsp, SKL_ADSP_REG_HIPCIE); skl_dsp_irq_thread_handler()
392 hipct = sst_dsp_shim_read_unlocked(dsp, SKL_ADSP_REG_HIPCT); skl_dsp_irq_thread_handler()
396 sst_dsp_shim_update_bits(dsp, SKL_ADSP_REG_HIPCCTL, skl_dsp_irq_thread_handler()
400 sst_dsp_shim_update_bits_forced(dsp, SKL_ADSP_REG_HIPCIE, skl_dsp_irq_thread_handler()
406 sst_dsp_shim_update_bits(dsp, SKL_ADSP_REG_HIPCCTL, skl_dsp_irq_thread_handler()
412 hipcte = sst_dsp_shim_read_unlocked(dsp, SKL_ADSP_REG_HIPCTE); skl_dsp_irq_thread_handler()
415 dev_dbg(dsp->dev, "IPC irq: Firmware respond primary:%x", skl_dsp_irq_thread_handler()
417 dev_dbg(dsp->dev, "IPC irq: Firmware respond extension:%x", skl_dsp_irq_thread_handler()
424 dev_dbg(dsp->dev, "IPC irq: Notification from firmware\n"); skl_dsp_irq_thread_handler()
428 sst_dsp_shim_update_bits_forced(dsp, SKL_ADSP_REG_HIPCT, skl_dsp_irq_thread_handler()
436 skl_ipc_int_enable(dsp); skl_dsp_irq_thread_handler()
491 ipc->dsp = skl->dsp; skl_ipc_init()
511 sst_dsp_shim_update_bits(ipc->dsp, SKL_ADSP_REG_HIPCCTL, skl_ipc_free()
515 sst_dsp_shim_update_bits(ipc->dsp, SKL_ADSP_REG_HIPCCTL, skl_ipc_free()
H A Dskl-sst-dsp.h138 void skl_dsp_free(struct sst_dsp *dsp);
142 struct skl_dsp_loader_ops dsp_ops, struct skl_sst **dsp);
H A Dskl-messages.c24 #include "skl-sst-dsp.h"
27 #include "../common/sst-dsp.h"
28 #include "../common/sst-dsp-priv.h"
104 dev_dbg(bus->dev, "dsp registration status=%d\n", ret); skl_init_dsp()
119 if (ctx->dsp->addr.lpe) skl_free_dsp()
120 iounmap(ctx->dsp->addr.lpe); skl_free_dsp()
132 ret = skl_dsp_sleep(ctx->dsp); skl_suspend_dsp()
156 ret = skl_dsp_wake(ctx->dsp); skl_resume_dsp()
H A Dskl-sst-cldma.c21 #include "../common/sst-dsp.h"
22 #include "../common/sst-dsp-priv.h"
H A Dskl.c472 /* check if dsp is there */ skl_probe()
476 dev_dbg(bus->dev, "error failed to register dsp\n"); skl_probe()
H A Dskl-topology.c24 #include "skl-sst-dsp.h"
/linux-4.4.14/arch/um/drivers/
H A Dhostaudio_kern.c24 #define HOSTAUDIO_DEV_DSP "/dev/sound/dsp"
32 static char *dsp = HOSTAUDIO_DEV_DSP; variable
36 " This is used to specify the host dsp device to the hostaudio driver.\n" \
43 module_param(dsp, charp, 0644);
44 MODULE_PARM_DESC(dsp, DSP_HELP);
51 dsp = name; set_dsp()
55 __uml_setup("dsp=", set_dsp, "dsp=<dsp device>\n" DSP_HELP);
68 /* /dev/dsp file operations */
189 printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp); hostaudio_open()
204 ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); hostaudio_open()
272 "err = %d\n", dsp, -ret); hostmixer_open_mixdev()
330 printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", hostaudio_init_module()
331 dsp, mixer); hostaudio_init_module()
/linux-4.4.14/include/media/
H A Dtimb_radio.h25 int i2c_adapter; /* I2C adapter where the tuner and dsp are attached */
27 struct i2c_board_info *dsp; member in struct:timb_radio_platform_data
/linux-4.4.14/drivers/media/pci/cx88/
H A DMakefile2 cx88-dsp.o cx88-input.o
H A Dcx88-dsp.c72 MODULE_PARM_DESC(dsp_debug, "enable audio dsp debug messages");
H A Dcx88-tvaudio.c766 /* prepare all dsp registers */ cx88_set_tvaudio()
H A Dcx88.h711 /* cx88-dsp.c */
/linux-4.4.14/sound/pci/asihpi/
H A Dhpidspcd.h30 /** Header structure for dsp firmware file
59 /** Expected number of words in the whole dsp code,INCL header */
87 /** Read one word from the dsp code file
95 /** Get a block of dsp code into an internal buffer, and provide a pointer to
96 that buffer. (If dsp code is already an array in memory, it is referenced,
H A Dhpidspcd.c44 sprintf(fw_name, "asihpi/dsp%04x.bin", adapter); hpi_dsp_code_open()
82 HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name); hpi_dsp_code_open()
106 HPI_DEBUG_LOG(DEBUG, "dsp code closed\n"); hpi_dsp_code_close()
H A Dhpi6205.c390 HPI_DEBUG_LOG(WARNING, " %d,%d dsp crashed.\n", phm->object, _HPI_6205()
1279 int dsp = 0, i = 0; adapter_boot_load_dsp() local
1375 for (dsp = 0; dsp < HPI6205_MAX_FILES_TO_LOAD; dsp++) { adapter_boot_load_dsp()
1377 if (boot_code_id[dsp] == 0) adapter_boot_load_dsp()
1380 err = boot_loader_config_emif(pao, dsp); adapter_boot_load_dsp()
1384 err = boot_loader_test_internal_memory(pao, dsp); adapter_boot_load_dsp()
1388 err = boot_loader_test_external_memory(pao, dsp); adapter_boot_load_dsp()
1392 err = boot_loader_test_pld(pao, dsp); adapter_boot_load_dsp()
1397 err = hpi_dsp_code_open(boot_code_id[dsp], pao->pci.pci_dev, adapter_boot_load_dsp()
1425 boot_loader_write_mem32(pao, dsp, address, adapter_boot_load_dsp()
1430 boot_loader_read_mem32(pao, dsp, adapter_boot_load_dsp()
1460 data = boot_loader_read_mem32(pao, dsp, adapter_boot_load_dsp()
1491 wmb(); /* ensure ack is written before dsp writes back */ adapter_boot_load_dsp()
H A Dhpi6000.c350 HPI_DEBUG_LOG(DEBUG, "adapter %d dsp crashed\n", HPI_6000()
485 HPI_DEBUG_LOG(VERBOSE, "csr %p, dsp %p\n", phw->dw2040_HPICSR, create_adapter_obj()
621 phr->u.ax.assert.dsp_index = -1; /* "dsp index" */ adapter_get_asserts()
1717 /** Get dsp index for multi DSP adapters only */ get_dsp_index()
1786 phr->u.ax.assert.dsp_index = 0; /* dsp 0 default */ hw_message()
1789 /* no assert from dsp 0, check dsp 1 */ hw_message()
H A Dhpi_internal.h1030 struct hpi_clock_msg t; /* dsp time */
1091 struct hpi_clock_res t; /* dsp time */
/linux-4.4.14/sound/pci/pcxhr/
H A Dpcxhr_hwdep.c149 /* stereo cards mute with reset of dsp */ pcxhr_reset_board()
151 /* reset pcxhr dsp */ pcxhr_reset_board()
248 /* allocate the pipes on the dsp */ pcxhr_config_pipes()
277 /* start all the pipes on the dsp */ pcxhr_start_pipes()
290 const struct firmware *dsp) pcxhr_dsp_load()
295 "loading dsp [%d] size = %Zd\n", index, dsp->size); pcxhr_dsp_load()
300 return pcxhr_load_xilinx_binary(mgr, dsp, 0); pcxhr_dsp_load()
304 return pcxhr_load_xilinx_binary(mgr, dsp, 1); pcxhr_dsp_load()
308 return pcxhr_load_eeprom_binary(mgr, dsp); pcxhr_dsp_load()
311 return pcxhr_load_boot_binary(mgr, dsp); pcxhr_dsp_load()
314 err = pcxhr_load_dsp_binary(mgr, dsp); pcxhr_dsp_load()
394 /* fake hwdep dsp record */ pcxhr_setup_firmware()
289 pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, const struct firmware *dsp) pcxhr_dsp_load() argument
H A Dpcxhr.h38 /* transfer granularity of pipes and the dsp time (MBOX4) */
90 unsigned int dsp_loaded; /* bit flags of loaded dsp indices */
111 int dsp_time_last; /* the last dsp time (read by interrupt) */
112 int dsp_time_err; /* dsp time errors */
113 unsigned int src_it_dsp; /* dsp interrupt source */
H A Dpcxhr_core.c333 static int pcxhr_download_dsp(struct pcxhr_mgr *mgr, const struct firmware *dsp) pcxhr_download_dsp() argument
341 if (dsp->size <= 0) pcxhr_download_dsp()
343 if (dsp->size % 3) pcxhr_download_dsp()
345 if (snd_BUG_ON(!dsp->data)) pcxhr_download_dsp()
348 for (i = 0; i < dsp->size; i += 3) { pcxhr_download_dsp()
349 data = dsp->data + i; pcxhr_download_dsp()
355 if (len && (dsp->size != (len + 2) * 3)) pcxhr_download_dsp()
365 "dsp loading error at position %d\n", i); pcxhr_download_dsp()
443 * load the final dsp image
445 int pcxhr_load_dsp_binary(struct pcxhr_mgr *mgr, const struct firmware *dsp) pcxhr_load_dsp_binary() argument
455 err = pcxhr_download_dsp(mgr, dsp); pcxhr_load_dsp_binary()
1187 * dsp time (MBOX4) pcxhr_update_timer_pos()
1294 /* handle dsp counter wraparound without resync */ pcxhr_threaded_irq()
H A Dpcxhr.c609 /* bug with old dsp versions: */ pcxhr_set_format()
756 /* the dsp lost format and buffer info with the stop pipe */ pcxhr_start_linked_stream()
900 /* last dsp time invalid */ pcxhr_hardware_timer()
1265 snd_iprintf(buffer, "dsp version %d.%d.%d\n", pcxhr_proc_info()
1272 /* calc cpu load of the dsp */ pcxhr_proc_info()
1294 snd_iprintf(buffer, "dsp time errors : %d\n", pcxhr_proc_info()
1296 snd_iprintf(buffer, "dsp async pipe xrun errors : %d\n", pcxhr_proc_info()
1298 snd_iprintf(buffer, "dsp async stream xrun errors : %d\n", pcxhr_proc_info()
1300 snd_iprintf(buffer, "dsp async last other error : %x\n", pcxhr_proc_info()
1302 /* debug zone dsp */ pcxhr_proc_info()
1450 /*snd_iprintf(buffer, "dsp ref time: 0x%06x%06x\n", pcxhr_proc_ltc()
H A Dpcxhr_core.h36 int pcxhr_load_dsp_binary(struct pcxhr_mgr *mgr, const struct firmware *dsp);
/linux-4.4.14/sound/pci/mixart/
H A Dmixart_hwdep.c102 static int mixart_load_elf(struct mixart_mgr *mgr, const struct firmware *dsp ) mixart_load_elf()
108 elf_header = (struct snd_mixart_elf32_ehdr *)dsp->data; mixart_load_elf()
119 memcpy( &elf_programheader, dsp->data + pos, sizeof(elf_programheader) ); mixart_load_elf()
124 dsp->data + be32_to_cpu( elf_programheader.p_offset ), mixart_load_elf()
345 static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmware *dsp) mixart_dsp_load() argument
381 if (((u32*)(dsp->data))[0] == 0xffffffff) mixart_dsp_load()
383 if (dsp->size % 4) mixart_dsp_load()
392 writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_SIZE_OFFSET )); mixart_dsp_load()
395 memcpy_toio( MIXART_MEM( mgr, MIXART_MOTHERBOARD_XLX_BASE_ADDRESS), dsp->data, dsp->size); mixart_dsp_load()
434 err = mixart_load_elf( mgr, dsp ); mixart_dsp_load()
488 if (((u32*)(dsp->data))[0] == 0xffffffff) mixart_dsp_load()
490 if (dsp->size % 4) mixart_dsp_load()
494 writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_SIZE_OFFSET )); mixart_dsp_load()
512 memcpy_toio( MIXART_MEM( mgr, val), dsp->data, dsp->size); mixart_dsp_load()
579 /* fake hwdep dsp record */ snd_mixart_setup_firmware()
H A Dmixart.h97 unsigned int dsp_loaded; /* bit flags of loaded dsp indices */
/linux-4.4.14/arch/mips/power/
H A Dcpu.c12 #include <asm/dsp.h>
/linux-4.4.14/sound/usb/usx2y/
H A DusX2Yhwdep.c199 struct snd_hwdep_dsp_image *dsp) snd_usX2Y_hwdep_dsp_load()
203 snd_printdd( "dsp_load %s\n", dsp->name); snd_usX2Y_hwdep_dsp_load()
205 if (access_ok(VERIFY_READ, dsp->image, dsp->length)) { snd_usX2Y_hwdep_dsp_load()
209 buf = memdup_user(dsp->image, dsp->length); snd_usX2Y_hwdep_dsp_load()
217 err = usb_bulk_msg(dev, usb_sndbulkpipe(dev, 2), buf, dsp->length, &lret, 6000); snd_usX2Y_hwdep_dsp_load()
222 if (dsp->index == 1) { snd_usX2Y_hwdep_dsp_load()
198 snd_usX2Y_hwdep_dsp_load(struct snd_hwdep *hw, struct snd_hwdep_dsp_image *dsp) snd_usX2Y_hwdep_dsp_load() argument
/linux-4.4.14/net/dns_resolver/
H A Ddns_key.c183 const char *src = key->description, *dsp = match_data->raw_data; dns_resolver_cmp() local
185 kenter("%s,%s", src, dsp); dns_resolver_cmp()
187 if (!src || !dsp) dns_resolver_cmp()
190 if (strcasecmp(src, dsp) == 0) dns_resolver_cmp()
194 dlen = strlen(dsp); dns_resolver_cmp()
199 if (dsp[dlen - 1] == '.') dns_resolver_cmp()
201 if (slen != dlen || strncasecmp(src, dsp, slen) != 0) dns_resolver_cmp()
/linux-4.4.14/arch/mips/include/asm/mach-bcm63xx/
H A Dboard_bcm963xx.h46 struct bcm63xx_dsp_platform_data dsp; member in struct:board_info
/linux-4.4.14/arch/mips/bcm63xx/
H A Ddev-dsp.c33 .name = "bcm63xx-voip-dsp",
/linux-4.4.14/drivers/scsi/
H A D53c700.c563 struct scsi_cmnd *SCp, __u32 dsp) save_for_reselection()
570 slot->resume_offset = dsp; save_for_reselection()
781 struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps) process_extended_message()
783 __u32 resume_offset = dsp, temp = dsp + 8; process_extended_message()
863 struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps) process_message()
866 __u32 temp = dsp + 8, resume_offset = dsp; process_message()
885 dsp, dsps); process_message()
951 process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, process_script_interrupt() argument
1088 save_for_reselection(hostdata, SCp, dsp); process_script_interrupt()
1191 printk(KERN_INFO "scsi%d: (%d:%d) RESELECTION DURING SELECTION, dsp=%08x[%04x] state=%d, count=%d\n", process_script_interrupt()
1192 host->host_no, reselection_id, lun, dsp, dsp - hostdata->pScript, hostdata->state, hostdata->command_slot_count); process_script_interrupt()
1246 dsp, dsps); process_script_interrupt()
1251 NCR_700_phase[j], dsp - hostdata->pScript); process_script_interrupt()
1263 host->host_no, pun, lun, dsps & 0xfff, dsp, dsp - hostdata->pScript);
1264 resume_offset = dsp;
1267 host->host_no, pun, lun, dsps, dsp - hostdata->pScript);
1281 process_selection(struct Scsi_Host *host, __u32 dsp) process_selection() argument
1314 DEBUG((" ID %d WARNING: RESELECTION OF BUSY HOST, saving cmd %p, slot %p, addr %x [%04x], resume %x!\n", id, hostdata->cmd, slot, dsp, dsp - hostdata->pScript, resume_offset)); process_selection()
1316 switch(dsp - hostdata->pScript) { process_selection()
1335 process_script_interrupt(A_GOOD_STATUS_AFTER_STATUS, dsp, SCp, host, hostdata); process_selection()
1501 __u32 dsp; NCR_700_intr() local
1522 dsp = NCR_700_readl(host, DSP_REG); NCR_700_intr()
1524 DEBUG(("scsi%d: istat %02x sstat0 %02x dstat %02x dsp %04x[%08x] dsps 0x%x\n", NCR_700_intr()
1526 (dsp - (__u32)(hostdata->pScript))/4, NCR_700_intr()
1527 dsp, dsps)); NCR_700_intr()
1540 printk(KERN_ERR "scsi%d: Bus Reset detected, executing command %p, slot %p, dsp %08x[%04x]\n", NCR_700_intr()
1541 host->host_no, SCp, SCp == NULL ? NULL : SCp->host_scribble, dsp, dsp - hostdata->pScript); NCR_700_intr()
1590 if(dsp == Ent_SendMessage + 8 + hostdata->pScript) {
1599 } else if(dsp >= to32bit(&slot->pSG[0].ins) &&
1600 dsp <= to32bit(&slot->pSG[NCR_700_SG_SEGMENTS].ins)) {
1602 int SGcount = (dsp - to32bit(&slot->pSG[0].ins))/sizeof(struct NCR_700_SG_List);
1653 host->host_no, pun, lun, dsp - hostdata->pScript, sbcl_to_string(sbcl));
1668 resume_offset = process_script_interrupt(dsps, dsp, SCp, host, hostdata);
1673 dsp, dsp - hostdata->pScript);
1703 resume_offset = process_selection(host, dsp);
562 save_for_reselection(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, __u32 dsp) save_for_reselection() argument
779 process_extended_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps) process_extended_message() argument
862 process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, __u32 dsp, __u32 dsps) process_message() argument
H A Dncr53c8xx.c5797 ** "ncr0 targ 0?: ERROR (ds:si) (so-si-sd) (sxfer/scntl3) @ name (dsp:dbc)."
5814 ** dsp: script address (relative to start of script).
5825 u32 dsp; ncr_log_hard_error() local
5832 dsp = INL (nc_dsp); ncr_log_hard_error()
5834 if (dsp > np->p_script && dsp <= np->p_script + sizeof(struct script)) { ncr_log_hard_error()
5835 script_ofs = dsp - np->p_script; ncr_log_hard_error()
5840 else if (np->p_scripth < dsp && ncr_log_hard_error()
5841 dsp <= np->p_scripth + sizeof(struct scripth)) { ncr_log_hard_error()
5842 script_ofs = dsp - np->p_scripth; ncr_log_hard_error()
5847 script_ofs = dsp; ncr_log_hard_error()
6247 u32 dsp; ncr_int_ma() local
6258 dsp = INL (nc_dsp); ncr_int_ma()
6334 if (dsp > np->p_script && ncr_int_ma()
6335 dsp <= np->p_script + sizeof(struct script)) { ncr_int_ma()
6336 vdsp = (u32 *)((char*)np->script0 + (dsp-np->p_script-8)); ncr_int_ma()
6337 nxtdsp = dsp; ncr_int_ma()
6339 else if (dsp > np->p_scripth && ncr_int_ma()
6340 dsp <= np->p_scripth + sizeof(struct scripth)) { ncr_int_ma()
6341 vdsp = (u32 *)((char*)np->scripth0 + (dsp-np->p_scripth-8)); ncr_int_ma()
6342 nxtdsp = dsp; ncr_int_ma()
6345 if (dsp == CCB_PHYS (cp, patch[2])) { ncr_int_ma()
6349 else if (dsp == CCB_PHYS (cp, patch[6])) { ncr_int_ma()
6362 (unsigned)dsp, ncr_int_ma()
6501 dsp -= 8; ncr_int_ma()
6514 np->scripth->nxtdsp_go_on[0] = cpu_to_scr(dsp + 8); ncr_int_ma()
6515 if (dsp == NCB_SCRIPT_PHYS (np, send_ident)) { ncr_int_ma()
6519 else if (dsp == NCB_SCRIPTH_PHYS (np, send_wdtr) || ncr_int_ma()
6520 dsp == NCB_SCRIPTH_PHYS (np, send_sdtr)) { ncr_int_ma()
H A Dosst.h115 u8 dsp; /* Device Specific Parameter */ member in struct:__anon9926
/linux-4.4.14/arch/mips/ar7/
H A Dclock.c76 struct tnetd7300_clock dsp; member in struct:tnetd7300_clocks
96 struct tnetd7200_clock dsp; member in struct:tnetd7200_clocks
267 tnetd7300_set_clock(DSP_PLL_SOURCE_SHIFT, &clocks->dsp, tnetd7300_init_clocks()
355 tnetd7200_set_clock(dsp_base, &clocks->dsp, tnetd7200_init_clocks()
385 tnetd7200_set_clock(dsp_base, &clocks->dsp, tnetd7200_init_clocks()
396 tnetd7200_set_clock(dsp_base, &clocks->dsp, tnetd7200_init_clocks()
446 if (!strcmp(id, "dsp")) clk_get()
/linux-4.4.14/sound/soc/intel/atom/sst/
H A Dsst_pvt.c37 #include "../../common/sst-dsp.h"
326 void sst_fill_header_dsp(struct ipc_dsp_hdr *dsp, int msg, sst_fill_header_dsp() argument
329 dsp->cmd_id = msg; sst_fill_header_dsp()
330 dsp->mod_index_id = 0xff; sst_fill_header_dsp()
331 dsp->pipe_id = pipe_id; sst_fill_header_dsp()
332 dsp->length = len; sst_fill_header_dsp()
333 dsp->mod_id = 0; sst_fill_header_dsp()
H A Dsst_loader.c22 * This file contains all dsp controlling functions like firmware download,
23 * setting/resetting dsp cores, etc
40 #include "../../common/sst-dsp.h"
H A Dsst.c35 #include "../../common/sst-dsp.h"
84 /* message from dsp so copy that */ intel_sst_interrupt_mrfld()
H A Dsst_acpi.c42 #include "../../common/sst-dsp.h"
H A Dsst_ipc.c35 #include "../../common/sst-dsp.h"
H A Dsst_stream.c34 #include "../../common/sst-dsp.h"
H A Dsst.h545 void sst_fill_header_dsp(struct ipc_dsp_hdr *dsp, int msg,
H A Dsst_drv_interface.c35 #include "../../common/sst-dsp.h"
/linux-4.4.14/arch/sh/
H A DMakefile29 isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp
61 # -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that
62 # support it, while -Wa,-dsp by itself limits the range of usable opcodes
64 # fall back on -Wa,-dsp for the old binutils versions. Even without DSP
71 $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp)
/linux-4.4.14/sound/oss/dmasound/
H A Ddmasound.h9 * reason the /dev/dsp is reserved for digitized audio use. There is a
22 #define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
24 #define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
164 SETTINGS dsp; /* /dev/dsp default settings */ member in struct:sound_settings
H A Ddmasound_q40.c563 dmasound.dsp.format = format; Q40SetFormat()
564 dmasound.dsp.size = 8; Q40SetFormat()
H A Ddmasound_core.c255 dmasound.dsp.speed = dmasound.soft.speed; sound_set_speed()
269 dmasound.dsp.stereo = stereo; sound_set_stereo()
798 dmasound.dsp = dmasound.mach.default_soft ; sq_open()
1196 dmasound.dsp = dmasound.mach.default_soft ; sq_init()
1405 /* Set up sound queue, /dev/audio and /dev/dsp. */ dmasound_init()
H A Ddmasound_paula.c413 dmasound.dsp.format = format; AmiSetFormat()
414 dmasound.dsp.size = dmasound.soft.size; AmiSetFormat()
H A Ddmasound_atari.c975 dmasound.dsp.format = format; TTSetFormat()
976 dmasound.dsp.size = 8; TTSetFormat()
1140 dmasound.dsp.format = format; FalconSetFormat()
1141 dmasound.dsp.size = dmasound.soft.size; FalconSetFormat()
/linux-4.4.14/arch/mips/kernel/
H A Dpm.c15 #include <asm/dsp.h>
H A Dptrace32.c28 #include <asm/dsp.h>
152 tmp = child->thread.dsp.dspcontrol; compat_arch_ptrace()
248 child->thread.dsp.dspcontrol = data; compat_arch_ptrace()
H A Dproc.c115 if (cpu_has_dsp) seq_printf(m, "%s", " dsp"); show_cpuinfo()
H A Dptrace.c37 #include <asm/dsp.h>
762 tmp = child->thread.dsp.dspcontrol; arch_ptrace()
841 child->thread.dsp.dspcontrol = data; arch_ptrace()
H A Dgenex.S448 BUILD_HANDLER dsp dsp sti silent /* #26 */
H A Dsignal32.c34 #include <asm/dsp.h>
H A Dprocess.c33 #include <asm/dsp.h>
H A Dsignal.c39 #include <asm/dsp.h>
/linux-4.4.14/arch/arm/mach-omap2/
H A Dcm2xxx.h63 extern void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core,
H A Dprminst44xx.c117 * Some IPs like dsp, ipu or iva contain processors that require an HW
144 * Some IPs like dsp, ipu or iva contain processors that require an HW
H A Dcm2xxx.c373 void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, u32 mdm) omap2xxx_cm_set_mod_dividers() argument
378 omap2_cm_write_mod_reg(dsp, OMAP24XX_DSP_MOD, CM_CLKSEL); omap2xxx_cm_set_mod_dividers()
H A Domap_hwmod_2420_data.c67 .name = "dsp",
76 .name = "dsp",
H A Dprm2xxx_3xxx.c49 * Some IPs like dsp or iva contain processors that require an HW
76 * Some IPs like dsp or iva contain processors that require an HW
H A Dprm33xx.c86 * Some IPs like dsp, ipu or iva contain processors that require an HW
113 * Some IPs like dsp, ipu or iva contain processors that require an HW
H A Dopp2430_data.c17 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
H A Dopp2xxx.h18 * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
47 unsigned long cm_clksel_dsp; /* dsp+iva1 div(2420), iva2.1(2430) */
H A Dpowerdomains3xxx_data.c356 .voltdm = { .name = "dsp" },
370 .voltdm = { .name = "dsp" },
H A Domap_hwmod_44xx_data.c529 * 'dsp' class
530 * dsp sub-system
534 .name = "dsp",
537 /* dsp */
539 { .name = "dsp", .rst_shift = 0 },
543 .name = "dsp",
2136 /* mmu dsp */
2156 /* l4_cfg -> dsp */
3186 /* dsp -> l3_main_1 */
3378 /* dsp -> l4_abe */
3642 /* dsp -> iva */
3650 /* dsp -> sl2if */
3658 /* l4_cfg -> dsp */
H A Dpm.c104 _init_omap_device("dsp"); omap2_init_processor_devices()
H A Dtimer.c181 of_get_property(np, "ti,timer-dsp", NULL) || for_each_matching_node()
H A Domap_hwmod.c1637 * Some IP like dsp, ipu or iva contain processor that require an HW
1670 * Some IP like dsp, ipu or iva contain processor that require an HW
2298 /* XXX what about the other system initiators here? dma, dsp */ _shutdown()
3729 * Some IP like dsp, ipu or iva contain processor that require
3756 * Some IP like dsp, ipu or iva contain processor that require
/linux-4.4.14/sound/drivers/vx/
H A Dvx_core.c441 /* reset dsp */ snd_vx_load_boot_image()
452 snd_printk(KERN_ERR "dsp boot failed at %d\n", i); snd_vx_load_boot_image()
461 snd_printk(KERN_ERR "dsp boot failed at %d\n", i); snd_vx_load_boot_image()
678 * @dsp: firmware data
680 int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp) snd_vx_dsp_load() argument
687 if (dsp->size % 3) snd_vx_dsp_load()
693 for (i = 0; i < dsp->size; i += 3) { snd_vx_dsp_load()
694 image = dsp->data + i; snd_vx_dsp_load()
698 "dsp loading error at position %d\n", i); snd_vx_dsp_load()
/linux-4.4.14/drivers/char/mwave/
H A Dtp3780i.h60 #define TP_ABILITIES_MWAVEOS_NAME "mwaveos0700.dsp"
61 #define TP_ABILITIES_BIOSTASK_NAME "mwbio701.dsp"
H A Dmwavepub.h70 unsigned short usDspAddress; /* The dsp address */
/linux-4.4.14/sound/soc/intel/boards/
H A Dhaswell.c24 #include "../common/sst-dsp.h"
91 struct sst_hsw *haswell = pdata->dsp; haswell_rtd_init()
H A Dbroadwell.c25 #include "../common/sst-dsp.h"
136 struct sst_hsw *broadwell = pdata->dsp; broadwell_rtd_init()
H A Dbyt-rt5640.c28 #include "../common/sst-dsp.h"
/linux-4.4.14/arch/mips/include/uapi/asm/
H A Dsigcontext.h43 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
/linux-4.4.14/sound/isa/msnd/
H A Dmsnd_pinnacle_mixer.c232 case MSND_MIXER_SYNTH: /* synth vol (dsp mix) */ snd_msndmix_set()
233 case MSND_MIXER_PCM: /* pcm vol (dsp mix) */ snd_msndmix_set()
234 case MSND_MIXER_IMIX: /* input monitor (dsp mix) */ snd_msndmix_set()
/linux-4.4.14/sound/
H A Dsound_core.c95 * Secondly we need to allocate the dsp, dsp16 and audio devices as
383 name = "dsp"; register_sound_special_device()
488 * This function allocates both the audio and dsp device entries together
498 "dsp", S_IWUSR | S_IRUSR, NULL); register_sound_dsp()
590 if(chain==4 || chain==5) /* dsp/audio/dsp16 */ soundcore_open()
/linux-4.4.14/drivers/clk/sirf/
H A Dclk-common.c24 * - 8 clock domains: cpu/cpudiv, mem/memdiv, sys/io, dsp, graphic, multimedia,
29 * - dsp domain: gps, mf
286 * clock domains - cpu, mem, sys/io, dsp, gfx
525 /* dsp, gfx, mm, lcd and vpp domain */
528 .name = "dsp",
955 "dsp",
H A Dclk-atlas6.c62 rtc, osc, pll1, pll2, pll3, mem, sys, security, dsp, gps, enumerator in enum:atlas6_clk_index
H A Dclk-prima2.c61 rtc, osc, pll1, pll2, pll3, mem, sys, security, dsp, gps, enumerator in enum:prima2_clk_index
/linux-4.4.14/arch/mips/bcm63xx/boards/
H A Dboard_bcm963xx.c293 .dsp = {
405 .dsp = {
902 bcm63xx_dsp_register(&board.dsp); board_register_devices()
/linux-4.4.14/include/sound/
H A Dhwdep.h75 unsigned int dsp_loaded; /* bit fields of loaded dsp indices */
H A Dminors.h85 #define SNDRV_MINOR_OSS_PCM_8 3 /* /dev/dsp - 8bit PCM - OSS 3.XX compatible */
H A Dcompress_driver.h90 * This callback is mandatory and shall keep dsp ready to receive the stream
163 /* dsp driver callback apis
H A Dvx_core.h212 int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *dsp);
213 int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *dsp);
214 int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp);
/linux-4.4.14/arch/sh/kernel/cpu/
H A Dproc.c42 "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr",
H A Dinit.c56 onchip_setup(dsp); variable
/linux-4.4.14/arch/blackfin/include/uapi/asm/
H A Dptrace.h15 * 16 - 31 dsp registers I/B/L0 -- I/B/L3 & M0--M3
/linux-4.4.14/drivers/scsi/sym53c8xx_2/
H A Dsym_hipd.c1106 * sym0 targ 0?: ERROR (ds:si) (so-si-sd) (sx/s3/s4) @ name (dsp:dbc).
1124 * dsp: script address (relative to start of script).
1133 u32 dsp; sym_log_hard_error() local
1140 dsp = INL(np, nc_dsp); sym_log_hard_error()
1142 if (dsp > np->scripta_ba && sym_log_hard_error()
1143 dsp <= np->scripta_ba + np->scripta_sz) { sym_log_hard_error()
1144 script_ofs = dsp - np->scripta_ba; sym_log_hard_error()
1149 else if (np->scriptb_ba < dsp && sym_log_hard_error()
1150 dsp <= np->scriptb_ba + np->scriptb_sz) { sym_log_hard_error()
1151 script_ofs = dsp - np->scriptb_ba; sym_log_hard_error()
1156 script_ofs = dsp; sym_log_hard_error()
2188 u32 dsp = INL(np, nc_dsp); sym_recover_scsi_int() local
2197 if ((!(dsp > SCRIPTA_BA(np, getjob_begin) && sym_recover_scsi_int()
2198 dsp < SCRIPTA_BA(np, getjob_end) + 1)) && sym_recover_scsi_int()
2199 (!(dsp > SCRIPTA_BA(np, ungetjob) && sym_recover_scsi_int()
2200 dsp < SCRIPTA_BA(np, reselect) + 1)) && sym_recover_scsi_int()
2201 (!(dsp > SCRIPTB_BA(np, sel_for_abort) && sym_recover_scsi_int()
2202 dsp < SCRIPTB_BA(np, sel_for_abort_1) + 1)) && sym_recover_scsi_int()
2203 (!(dsp > SCRIPTA_BA(np, done) && sym_recover_scsi_int()
2204 dsp < SCRIPTA_BA(np, done_end) + 1))) { sym_recover_scsi_int()
2239 u32 dsp = INL(np, nc_dsp); sym_int_sto() local
2243 if (dsp == SCRIPTA_BA(np, wf_sel_done) + 8) sym_int_sto()
2313 u32 dsp = INL(np, nc_dsp); sym_int_par() local
2367 if (dsp == SCRIPTB_BA(np, pm_handle)) sym_int_par()
2368 OUTL_DSP(np, dsp); sym_int_par()
2374 sym_set_script_dp (np, cp, dsp); sym_int_par()
2403 u32 dsp; sym_int_ma() local
2416 dsp = INL(np, nc_dsp); sym_int_ma()
2497 if (dsp > np->scripta_ba && sym_int_ma()
2498 dsp <= np->scripta_ba + np->scripta_sz) { sym_int_ma()
2499 vdsp = (u32 *)((char*)np->scripta0 + (dsp-np->scripta_ba-8)); sym_int_ma()
2500 nxtdsp = dsp; sym_int_ma()
2502 else if (dsp > np->scriptb_ba && sym_int_ma()
2503 dsp <= np->scriptb_ba + np->scriptb_sz) { sym_int_ma()
2504 vdsp = (u32 *)((char*)np->scriptb0 + (dsp-np->scriptb_ba-8)); sym_int_ma()
2505 nxtdsp = dsp; sym_int_ma()
2513 cp, (unsigned)dsp, (unsigned)nxtdsp, vdsp, cmd); sym_int_ma()
2695 dsp -= 8; sym_int_ma()
2714 if (dsp == SCRIPTA_BA(np, send_ident)) { sym_int_ma()
2723 else if (dsp == SCRIPTB_BA(np, send_wdtr) || sym_int_ma()
2724 dsp == SCRIPTB_BA(np, send_sdtr) || sym_int_ma()
2725 dsp == SCRIPTB_BA(np, send_ppr)) { sym_int_ma()
2727 if (dsp == SCRIPTB_BA(np, send_ppr)) { sym_int_ma()
/linux-4.4.14/drivers/remoteproc/
H A Dda8xx_remoteproc.c29 "Name of DSP firmware file in /lib/firmware (if not specified defaults to 'rproc-dsp-fw')");
219 rproc = rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name, da8xx_rproc_probe()
/linux-4.4.14/arch/arc/include/asm/
H A Darcregs.h227 unsigned int pad:8, x1616:8, dsp:4, cycles:2, type:2, ver:8; member in struct:bcr_mpy
229 unsigned int ver:8, type:2, cycles:2, dsp:4, x1616:8, pad:8;
/linux-4.4.14/sound/pci/lx6464es/
H A Dlx_core.h38 /* dsp register access */
111 /* low-level dsp access */
H A Dlx6464es.c570 /* reset the dsp during initialization */ lx_init_xilinx_reset()
751 /* initialize and test the xilinx dsp chip */ lx_init_dsp()
1017 /* dsp port */ snd_lx6464es_create()
H A Dlx_core.c317 dev_warn(chip->card->dev, "lx_message_send: dsp timeout\n"); lx_message_send_atomic()
321 dev_warn(chip->card->dev, "lx_message_send: dsp crashed\n"); lx_message_send_atomic()
331 /* low-level dsp access */ lx_dsp_get_version()
/linux-4.4.14/sound/pci/vx222/
H A Dvx222_ops.c164 /* set the reset dsp bit to 0 */ vx2_reset_dsp()
170 /* set the reset dsp bit to 1 */ vx2_reset_dsp()
415 * load the boot/dsp images
417 static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp) vx2_load_dsp() argument
424 if ((err = vx2_load_xilinx_binary(vx, dsp)) < 0) vx2_load_dsp()
431 return snd_vx_dsp_boot(vx, dsp); vx2_load_dsp()
434 return snd_vx_dsp_load(vx, dsp); vx2_load_dsp()
/linux-4.4.14/drivers/usb/atm/
H A Dueagle-atm.c373 /* block information in eagle4 dsp firmware */
391 /* l1_code is eagle4 dsp firmware format */
759 /* modem management : dsp firmware, send/read CMV, monitoring statistic
765 static int check_dsp_e1(const u8 *dsp, unsigned int len) check_dsp_e1() argument
772 pagecount = FW_GET_BYTE(dsp); check_dsp_e1()
781 pageoffset = get_unaligned_le32(dsp + p); check_dsp_e1()
792 blockcount = FW_GET_BYTE(dsp + pp); check_dsp_e1()
802 blocksize = get_unaligned_le16(dsp + pp); check_dsp_e1()
816 static int check_dsp_e4(const u8 *dsp, int len) check_dsp_e4() argument
819 struct l1_code *p = (struct l1_code *) dsp; check_dsp_e4()
820 unsigned int sum = p->code - dsp; check_dsp_e4()
842 if ((u8 *)(blockidx + 1) - dsp >= len) check_dsp_e4()
1363 " (may be try other cmv/dsp)\n"); uea_stat_e1()
1384 /* release the dsp firmware as it is not needed until uea_stat_e1()
1507 "failed (may be try other cmv/dsp)\n"); uea_stat_e4()
1521 /* release the dsp firmware as it is not needed until uea_stat_e4()
/linux-4.4.14/drivers/isdn/hardware/eicon/
H A Dos_pri.c912 dsp_check_presence(volatile byte __iomem *addr, volatile byte __iomem *data, int dsp) dsp_check_presence() argument
924 dsp, pattern, DSP_SIGNATURE_PROBE_WORD)) dsp_check_presence()
936 dsp, pattern, (word)~DSP_SIGNATURE_PROBE_WORD)) dsp_check_presence()
940 DBG_TRC(("DSP[%d] present", dsp)) dsp_check_presence()
/linux-4.4.14/drivers/gpu/drm/radeon/
H A Dsumo_dpm.h110 u32 dsp; member in struct:sumo_power_info
H A Drv770_dpm.h123 u32 dsp; member in struct:rv7xx_power_info
H A Drv730_dpm.c374 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); rv730_populate_smc_initial_state()
H A Drv770_dpm.c310 smc_state->levels[i].bSP = cpu_to_be32(pi->dsp); rv770_populate_smc_sp()
833 pi->dsp = BSP(pi->bsp) | BSU(pi->bsu); rv770_setup_bsp()
836 WREG32(CG_BSP, pi->dsp); rv770_setup_bsp()
1080 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); rv770_populate_smc_initial_state()
H A Dsumo_dpm.c330 pi->dsp = BSP(pi->bsp) | BSU(pi->bsu); sumo_calculate_bsp()
356 WREG32(CG_BSP_0 + (i * 4), pi->dsp); sumo_program_bsp()
H A Dsi_dpm.c3770 pi->dsp = BSP(pi->bsp) | BSU(pi->bsu); si_setup_bsp()
3773 WREG32(CG_BSP, pi->dsp); si_setup_bsp()
4467 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); si_populate_smc_initial_state()
4983 smc_state->levels[i].bSP = cpu_to_be32(pi->dsp); si_populate_smc_sp()
H A Dcypress_dpm.c1299 table->initialState.levels[0].bSP = cpu_to_be32(pi->dsp); cypress_populate_smc_initial_state()
/linux-4.4.14/drivers/media/radio/
H A Dradio-timb.c140 i2c_get_adapter(pdata->i2c_adapter), pdata->dsp, NULL); timbradio_probe()
/linux-4.4.14/sound/soc/intel/atom/
H A Dsst-mfld-platform.h24 #include "sst-mfld-dsp.h"
/linux-4.4.14/drivers/media/pci/saa7134/
H A Dsaa7134-tvaudio.c674 pr_warn("%s: dsp access error\n", dev->name); saa_dsp_wait_bit()
680 pr_err("dsp access wait timeout [bit=%s]\n", saa_dsp_wait_bit()
699 audio_dbg(2, "dsp write reg 0x%x = 0x%06x\n", reg << 2, value); saa_dsp_writel()
H A Dsaa7134.h484 /* dmasound dsp status */
497 /* dsp */
/linux-4.4.14/arch/arc/kernel/
H A Dsetup.c230 if (cpu->extn_mpy.dsp) /* OPT 7-9 */ arc_cpu_mumbojumbo()
231 opt = cpu->extn_mpy.dsp + 6; arc_cpu_mumbojumbo()
/linux-4.4.14/arch/metag/kernel/
H A Dsetup.c583 static char capabilities[] = "dsp fpu";
585 static char capabilities[] = "dsp";
/linux-4.4.14/arch/arm/mach-davinci/
H A Ddm644x.c137 .name = "dsp",
300 CLK(NULL, "dsp", &dsp_clk),
H A Ddm646x.c166 .name = "dsp",
338 CLK(NULL, "dsp", &dsp_clk),
H A Dboard-omapl138-hawk.c318 pr_warn("%s: dsp/rproc registration failed: %d\n", omapl138_hawk_init()
H A Ddevices-da8xx.c782 { /* dsp irq */
H A Dboard-da850-evm.c1480 pr_warn("%s: dsp/rproc registration failed: %d\n", da850_evm_init()
H A Dda850.c380 .name = "dsp",
/linux-4.4.14/sound/pcmcia/vx/
H A Dvxp_ops.c115 /* set the reset dsp bit to 1 */ vxp_reset_dsp()
204 snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%Zx\n", c, fw->size); vxp_load_xilinx_binary()
/linux-4.4.14/fs/fscache/
H A Dstats.c273 seq_printf(m, "CacheOp: rap=%d ras=%d alp=%d als=%d wrp=%d ucp=%d dsp=%d\n", fscache_stats_show()
/linux-4.4.14/arch/avr32/kernel/
H A Dcpu.c238 "rmw", "dsp", "simd", "ocd", "perfctr", "java", "fpu",
/linux-4.4.14/arch/arm/mach-omap1/
H A Dmcbsp.c55 * FIXME: This should be moved to dsp code omap1_mcbsp_request()
/linux-4.4.14/drivers/gpio/
H A Dgpio-syscon.c180 .compatible = "ti,keystone-dsp-gpio",
/linux-4.4.14/sound/pci/au88x0/
H A Dau88x0.h127 int type; /* Output type (ac97, a3d, spdif, i2s, dsp) */
/linux-4.4.14/drivers/dma/
H A Dimx-sdma.c532 unsigned long evt, mcu, dsp; sdma_config_ownership() local
539 dsp = readl_relaxed(sdma->regs + SDMA_H_DSPOVR); sdma_config_ownership()
542 __clear_bit(channel, &dsp); sdma_config_ownership()
544 __set_bit(channel, &dsp); sdma_config_ownership()
558 writel_relaxed(dsp, sdma->regs + SDMA_H_DSPOVR); sdma_config_ownership()
/linux-4.4.14/drivers/video/fbdev/aty/
H A Daty128fb.c1426 static void aty128_set_fifo(const struct aty128_ddafifo *dsp, aty128_set_fifo() argument
1429 aty_st_le32(DDA_CONFIG, dsp->dda_config); aty128_set_fifo()
1430 aty_st_le32(DDA_ON_OFF, dsp->dda_on_off); aty128_set_fifo()
1434 static int aty128_ddafifo(struct aty128_ddafifo *dsp, aty128_ddafifo() argument
1484 dsp->dda_config = p << 16 | m->Rloop << 20 | x; aty128_ddafifo()
1485 dsp->dda_on_off = ron << 16 | roff; aty128_ddafifo()
/linux-4.4.14/drivers/isdn/hardware/mISDN/
H A DmISDNisar.c304 pr_info("ISAR send_mbox start dsp failed\n"); load_firmware()
309 pr_info("ISAR poll_mbox start dsp failed\n"); load_firmware()
314 pr_info("ISAR wrong start dsp response (%x,%x,%x)\n", load_firmware()
319 pr_debug("%s: ISAR start dsp success\n", isar->name); load_firmware()
/linux-4.4.14/firmware/
H A DMakefile86 fw-shipped-$(CONFIG_SND_KORG1212) += korg/k1212.dsp
/linux-4.4.14/drivers/scsi/be2iscsi/
H A Dbe_main.h761 u8 dsp; /* DWORD 0 */ member in struct:amap_iscsi_wrb
823 u8 dsp; /* DWORD 11 */ member in struct:amap_iscsi_wrb_v2
922 u8 dsp; /* DWORD 0 */ member in struct:amap_iscsi_target_context_update_wrb
H A Dbe_main.c2527 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, hwi_write_buffer()
2530 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, dsp, hwi_write_buffer()
2552 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, pwrb, 0); hwi_write_buffer()
4915 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, dsp, pwrb, 1); beiscsi_iotask_v2()
4919 AMAP_SET_BITS(struct amap_iscsi_wrb_v2, dsp, pwrb, 0); beiscsi_iotask_v2()
4976 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, pwrb, 1); beiscsi_iotask()
4980 AMAP_SET_BITS(struct amap_iscsi_wrb, dsp, pwrb, 0); beiscsi_iotask()
/linux-4.4.14/drivers/net/wireless/iwlegacy/
H A D4965.c789 u8 dsp; member in struct:gain_entry
1235 gain_table[band][power_idx].dsp; il4965_fill_txpower_tbl()
1238 "gain 0x%02x dsp %d\n", c, atten_value, il4965_fill_txpower_tbl()
H A D3945.c576 D_DROP("dsp size out of range [0,20]: %d\n", il3945_hdl_rx()
1433 D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", il3945_send_tx_power()
1444 D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", il3945_send_tx_power()
/linux-4.4.14/sound/oss/
H A Dmsnd_pinnacle.c472 case SOUND_MIXER_SYNTH: /* synth vol (dsp mix) */ mixer_set()
473 case SOUND_MIXER_PCM: /* pcm vol (dsp mix) */ mixer_set()
474 case SOUND_MIXER_IMIX: /* input monitor (dsp mix) */ mixer_set()
H A Daudio.c381 printk(KERN_DEBUG"/dev/dsp%d: No coprocessor for this device\n", dev); */ audio_ioctl()
H A Dsb_common.c586 printk(KERN_INFO "sb: dsp reset failed.\n"); sb_dsp_detect()
H A Dswarm_cs4297a.c35 * /dev/dsp standard /dev/dsp device, (mostly) OSS compatible
/linux-4.4.14/drivers/isdn/hisax/
H A Disar.c335 printk(KERN_ERR"isar sendmsg start dsp failed\n"); isar_load_firmware()
339 printk(KERN_ERR"isar waitrecmsg start dsp failed\n"); isar_load_firmware()
343 printk(KERN_ERR"isar wrong start dsp response (%x,%x,%x)\n", isar_load_firmware()
347 printk(KERN_DEBUG"isar start dsp success\n"); isar_load_firmware()
/linux-4.4.14/drivers/mfd/
H A Dtimberdale.c290 .dsp = &timberdale_saa7706_i2c_board_info
/linux-4.4.14/drivers/edac/
H A Dedac_core.h13 * Dave Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
/linux-4.4.14/sound/core/
H A Dhwdep.c230 /* check whether the dsp was already loaded */ snd_hwdep_dsp_load()
H A Dcompress_offload.c174 pr_debug("dsp consumed till %d total %d bytes\n", snd_compr_update_tstamp()
/linux-4.4.14/sound/pci/echoaudio/
H A Dechoaudio.c2006 char *dsp; snd_echo_probe() local
2031 dsp = "56301"; snd_echo_probe()
2033 dsp = "56361"; snd_echo_probe()
2036 card->shortname, pci_id->subdevice & 0x000f, dsp, snd_echo_probe()
/linux-4.4.14/sound/pci/
H A Dmaestro3.c951 * access 16bit words to the code or data regions of the dsp's memory.
1200 /* dsp buffers */ snd_m3_pcm_setup1()
2432 /* save dsp image */ m3_suspend()
2460 /* restore dsp image */ m3_resume()
/linux-4.4.14/drivers/iommu/
H A Domap-iommu.c890 if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu")) omap_iommu_dra7_get_dsp_system_cfg()
1003 { .compatible = "ti,dra7-dsp-iommu" },
/linux-4.4.14/arch/x86/kernel/cpu/
H A Dperf_event_intel_uncore_nhmex.c867 DEFINE_UNCORE_FORMAT_ATTR(dsp, dsp, "config1:0-31");
/linux-4.4.14/drivers/media/usb/s2255/
H A Ds2255drv.c276 /* dsp firmware version (f2255usb.bin) */
1742 __le32 *pdword; /*data from dsp is little endian */ save_frame()
2321 pr_info("s2255 dsp fw version %x\n", le32_to_cpu(*pRel)); s2255_probe()
/linux-4.4.14/sound/pci/korg1212/
H A Dkorg1212.c406 MODULE_FIRMWARE("korg/k1212.dsp");
2332 err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev); snd_korg1212_create()
2342 snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size); snd_korg1212_create()
/linux-4.4.14/drivers/net/ethernet/atheros/alx/
H A Dreg.h144 /* bit0: out of dsp RST state */
/linux-4.4.14/arch/arm/plat-omap/
H A Ddmtimer.c838 if (of_find_property(dev->of_node, "ti,timer-dsp", NULL)) omap_dm_timer_probe()
/linux-4.4.14/drivers/media/usb/ttusb-budget/
H A Ddvb-ttusb-budget.c309 /* upload dsp code in 32 byte steps (36 didn't work for me ...) */ ttusb_boot_dsp()
467 printk("%s: dsp-version: %c%c%c\n", __func__, ttusb_init_controller()
/linux-4.4.14/drivers/media/dvb-frontends/
H A Dsi2165.c690 /* dsp clock disable */ si2165_sleep()
/linux-4.4.14/drivers/net/wireless/iwlwifi/dvm/
H A Drx.c896 IWL_DEBUG_DROP(priv, "dsp size out of range [0,20]: %d\n", iwlagn_rx_reply_rx()
/linux-4.4.14/sound/pci/cs46xx/
H A Dcs46xx_lib.c1235 /* old dsp */ snd_cs46xx_playback_prepare()
1400 /* old dsp */ snd_cs46xx_interrupt()
H A Ddsp_spos.c798 if ((entry = snd_info_create_card_entry(card, "dsp", card->proc_root)) != NULL) { cs46xx_dsp_proc_init()
/linux-4.4.14/drivers/gpu/drm/rockchip/
H A Drockchip_drm_vop.c718 * if dsp hold valid irq happen, it means standby complete. vop_disable()

Completed in 5810 milliseconds

12