Lines Matching refs:dsp

132 #include "dsp.h"
159 dsp_cmx_debug(struct dsp *dsp)
163 struct dsp *odsp;
172 if (dsp == odsp)
184 member->dsp->name, member->dsp->pcm_slot_tx,
185 member->dsp->pcm_bank_tx, member->dsp->pcm_slot_rx,
186 member->dsp->pcm_bank_rx, member->dsp->hfc_conf,
187 member->dsp->tx_data, member->dsp->rx_is_off,
188 (member->dsp == dsp) ? " *this*" : "");
220 dsp_cmx_add_conf_member(struct dsp *dsp, struct dsp_conf *conf)
224 if (!conf || !dsp) {
225 printk(KERN_WARNING "%s: conf or dsp is 0.\n", __func__);
228 if (dsp->member) {
229 printk(KERN_WARNING "%s: dsp is already member in a conf.\n",
234 if (dsp->conf) {
235 printk(KERN_WARNING "%s: dsp is already in a conf.\n",
245 member->dsp = dsp;
247 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
248 dsp->rx_init = 1; /* rx_W and rx_R will be adjusted on first frame */
249 dsp->rx_W = 0;
250 dsp->rx_R = 0;
254 dsp->conf = conf;
255 dsp->member = member;
265 dsp_cmx_del_conf_member(struct dsp *dsp)
269 if (!dsp) {
270 printk(KERN_WARNING "%s: dsp is 0.\n",
275 if (!dsp->conf) {
276 printk(KERN_WARNING "%s: dsp is not in a conf.\n",
281 if (list_empty(&dsp->conf->mlist)) {
282 printk(KERN_WARNING "%s: dsp has linked an empty conf.\n",
288 list_for_each_entry(member, &dsp->conf->mlist, list) {
289 if (member->dsp == dsp) {
291 dsp->conf = NULL;
292 dsp->member = NULL;
298 "%s: dsp is not present in its own conf_member list.\n",
361 dsp_cmx_hw_message(struct dsp *dsp, u32 message, u32 param1, u32 param2,
370 if (dsp->ch.peer)
371 dsp->ch.peer->ctrl(dsp->ch.peer, CONTROL_CHANNEL, &cq);
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)
387 struct dsp *finddsp;
394 /* dsp gets updated (no conf) */
396 if (!dsp)
399 printk(KERN_DEBUG "%s checking dsp %s\n",
400 __func__, dsp->name);
403 if (dsp->hfc_conf >= 0) {
407 "because dsp is split\n", __func__,
408 dsp->name, dsp->hfc_conf);
409 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_CONF_SPLIT,
411 dsp->hfc_conf = -1;
414 if (dsp->features.pcm_banks < 1)
416 if (!dsp->echo.software && !dsp->echo.hardware) {
418 if (dsp->pcm_slot_tx >= 0 || dsp->pcm_slot_rx >= 0) {
422 " dsp is split (no echo)\n",
423 __func__, dsp->name,
424 dsp->pcm_slot_tx, dsp->pcm_slot_rx);
425 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_DISC,
427 dsp->pcm_slot_tx = -1;
428 dsp->pcm_bank_tx = -1;
429 dsp->pcm_slot_rx = -1;
430 dsp->pcm_bank_rx = -1;
435 dsp->echo.software = dsp->tx_data;
436 dsp->echo.hardware = 0;
438 if (dsp->pcm_slot_tx >= 0 && dsp->pcm_slot_rx < 0 &&
439 dsp->pcm_bank_tx == 2 && dsp->pcm_bank_rx == 2) {
440 dsp->echo.hardware = 1;
444 if (dsp->pcm_slot_tx >= 0) {
445 dsp->pcm_slot_rx = dsp->pcm_slot_tx;
446 dsp->pcm_bank_tx = 2; /* 2 means loop */
447 dsp->pcm_bank_rx = 2;
451 __func__, dsp->name,
452 dsp->pcm_slot_tx);
453 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN,
454 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2);
455 dsp->echo.hardware = 1;
459 dsp->pcm_slot_tx = -1;
460 dsp->pcm_slot_rx = -1;
463 if (finddsp->features.pcm_id == dsp->features.pcm_id) {
473 ii = dsp->features.pcm_slots;
485 dsp->echo.software = 1;
489 dsp->pcm_slot_tx = i;
490 dsp->pcm_slot_rx = i;
491 dsp->pcm_bank_tx = 2; /* loop */
492 dsp->pcm_bank_rx = 2;
496 __func__, dsp->name, dsp->pcm_slot_tx);
497 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN,
498 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2);
499 dsp->echo.hardware = 1;
514 same_hfc = member->dsp->features.hfc_id;
515 same_pcm = member->dsp->features.pcm_id;
519 if (member->dsp->tx_mix) {
522 "%s dsp %s cannot form a conf, because "
524 member->dsp->name);
527 dsp = member->dsp;
529 if (dsp->hfc_conf >= 0) {
536 dsp->name,
537 dsp->hfc_conf);
538 dsp_cmx_hw_message(dsp,
541 dsp->hfc_conf = -1;
544 if (dsp->pcm_slot_tx >= 0 ||
545 dsp->pcm_slot_rx >= 0) {
552 dsp->name,
553 dsp->pcm_slot_tx,
554 dsp->pcm_slot_rx);
555 dsp_cmx_hw_message(dsp,
558 dsp->pcm_slot_tx = -1;
559 dsp->pcm_bank_tx = -1;
560 dsp->pcm_slot_rx = -1;
561 dsp->pcm_bank_rx = -1;
569 if (member->dsp->echo.hardware || member->dsp->echo.software) {
572 "%s dsp %s cannot form a conf, because "
574 member->dsp->name);
578 if (member->dsp->tx_mix) {
581 "%s dsp %s cannot form a conf, because "
583 __func__, member->dsp->name);
587 if (member->dsp->tx_volume) {
590 "%s dsp %s cannot form a conf, because "
592 __func__, member->dsp->name);
595 if (member->dsp->rx_volume) {
598 "%s dsp %s cannot form a conf, because "
600 __func__, member->dsp->name);
604 if (member->dsp->tx_data) {
607 "%s dsp %s tx_data is turned on\n",
608 __func__, member->dsp->name);
612 if (member->dsp->pipeline.inuse) {
615 "%s dsp %s cannot form a conf, because "
617 member->dsp->name);
621 if (member->dsp->bf_enable) {
623 printk(KERN_DEBUG "%s dsp %s cannot form a "
625 __func__, member->dsp->name);
629 if (member->dsp->features.pcm_id < 0) {
632 "%s dsp %s cannot form a conf, because "
633 "dsp has no PCM bus\n",
634 __func__, member->dsp->name);
638 if (member->dsp->features.pcm_id != same_pcm) {
641 "%s dsp %s cannot form a conf, because "
642 "dsp is on a different PCM bus than the "
643 "first dsp\n",
644 __func__, member->dsp->name);
648 if (same_hfc != member->dsp->features.hfc_id)
651 if (current_conf < 0 && member->dsp->hfc_conf >= 0)
652 current_conf = member->dsp->hfc_conf;
654 if (member->dsp->hfc_conf < 0)
669 "because dsp is alone\n", __func__, conf->id);
674 dsp = member->dsp;
691 if (member->dsp->hfc_conf >= 0) {
696 __func__, member->dsp->name,
697 member->dsp->hfc_conf);
698 dsp_cmx_hw_message(member->dsp,
700 member->dsp->hfc_conf = -1;
702 if (nextm->dsp->hfc_conf >= 0) {
707 __func__, nextm->dsp->name,
708 nextm->dsp->hfc_conf);
709 dsp_cmx_hw_message(nextm->dsp,
711 nextm->dsp->hfc_conf = -1;
714 if (member->dsp->features.pcm_banks > 1 &&
715 nextm->dsp->features.pcm_banks > 1 &&
716 member->dsp->features.hfc_id !=
717 nextm->dsp->features.hfc_id) {
719 if (member->dsp->pcm_slot_tx >= 0 &&
720 member->dsp->pcm_slot_rx >= 0 &&
721 nextm->dsp->pcm_slot_tx >= 0 &&
722 nextm->dsp->pcm_slot_rx >= 0 &&
723 nextm->dsp->pcm_slot_tx ==
724 member->dsp->pcm_slot_rx &&
725 nextm->dsp->pcm_slot_rx ==
726 member->dsp->pcm_slot_tx &&
727 nextm->dsp->pcm_slot_tx ==
728 member->dsp->pcm_slot_tx &&
729 member->dsp->pcm_bank_tx !=
730 member->dsp->pcm_bank_rx &&
731 nextm->dsp->pcm_bank_tx !=
732 nextm->dsp->pcm_bank_rx) {
736 "%s dsp %s & %s stay joined on "
740 member->dsp->name,
741 nextm->dsp->name,
742 member->dsp->pcm_slot_tx,
743 member->dsp->pcm_bank_tx,
744 member->dsp->pcm_bank_rx);
751 list_for_each_entry(dsp, &dsp_ilist, list) {
752 if (dsp != member->dsp &&
753 dsp != nextm->dsp &&
754 member->dsp->features.pcm_id ==
755 dsp->features.pcm_id) {
756 if (dsp->pcm_slot_rx >= 0 &&
757 dsp->pcm_slot_rx <
759 freeslots[dsp->pcm_slot_rx] = 0;
760 if (dsp->pcm_slot_tx >= 0 &&
761 dsp->pcm_slot_tx <
763 freeslots[dsp->pcm_slot_tx] = 0;
767 ii = member->dsp->features.pcm_slots;
778 member->dsp->name,
779 nextm->dsp->name);
784 member->dsp->pcm_slot_tx = i;
785 member->dsp->pcm_slot_rx = i;
786 nextm->dsp->pcm_slot_tx = i;
787 nextm->dsp->pcm_slot_rx = i;
788 member->dsp->pcm_bank_rx = 0;
789 member->dsp->pcm_bank_tx = 1;
790 nextm->dsp->pcm_bank_rx = 1;
791 nextm->dsp->pcm_bank_tx = 0;
798 member->dsp->name,
799 nextm->dsp->name,
800 member->dsp->pcm_slot_tx);
801 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
802 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx,
803 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx);
804 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN,
805 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx,
806 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx);
813 if (member->dsp->pcm_slot_tx >= 0 &&
814 member->dsp->pcm_slot_rx >= 0 &&
815 nextm->dsp->pcm_slot_tx >= 0 &&
816 nextm->dsp->pcm_slot_rx >= 0 &&
817 nextm->dsp->pcm_slot_tx ==
818 member->dsp->pcm_slot_rx &&
819 nextm->dsp->pcm_slot_rx ==
820 member->dsp->pcm_slot_tx &&
821 member->dsp->pcm_slot_tx !=
822 member->dsp->pcm_slot_rx &&
823 member->dsp->pcm_bank_tx == 0 &&
824 member->dsp->pcm_bank_rx == 0 &&
825 nextm->dsp->pcm_bank_tx == 0 &&
826 nextm->dsp->pcm_bank_rx == 0) {
830 "%s dsp %s & %s stay joined on PCM "
833 member->dsp->name,
834 nextm->dsp->name,
835 member->dsp->pcm_slot_tx,
836 member->dsp->pcm_slot_rx);
843 list_for_each_entry(dsp, &dsp_ilist, list) {
844 if (dsp != member->dsp &&
845 dsp != nextm->dsp &&
846 member->dsp->features.pcm_id ==
847 dsp->features.pcm_id) {
848 if (dsp->pcm_slot_rx >= 0 &&
849 dsp->pcm_slot_rx <
851 freeslots[dsp->pcm_slot_rx] = 0;
852 if (dsp->pcm_slot_tx >= 0 &&
853 dsp->pcm_slot_tx <
855 freeslots[dsp->pcm_slot_tx] = 0;
859 ii = member->dsp->features.pcm_slots;
870 member->dsp->name,
871 nextm->dsp->name);
887 member->dsp->name,
888 nextm->dsp->name);
893 member->dsp->pcm_slot_tx = i1;
894 member->dsp->pcm_slot_rx = i2;
895 nextm->dsp->pcm_slot_tx = i2;
896 nextm->dsp->pcm_slot_rx = i1;
897 member->dsp->pcm_bank_rx = 0;
898 member->dsp->pcm_bank_tx = 0;
899 nextm->dsp->pcm_bank_rx = 0;
900 nextm->dsp->pcm_bank_tx = 0;
907 member->dsp->name,
908 nextm->dsp->name,
909 member->dsp->pcm_slot_tx,
910 member->dsp->pcm_slot_rx);
911 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
912 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx,
913 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx);
914 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN,
915 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx,
916 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx);
956 if (!member->dsp->features.hfc_conf)
959 if (member->dsp->hdlc)
962 if (member->dsp->hfc_conf == current_conf)
966 list_for_each_entry(dsp, &dsp_ilist, list) {
972 dsp != member->dsp &&
973 /* dsp must be on the same PCM */
974 member->dsp->features.pcm_id ==
975 dsp->features.pcm_id) {
976 /* dsp must be on a slot */
977 if (dsp->pcm_slot_tx >= 0 &&
978 dsp->pcm_slot_tx <
980 freeslots[dsp->pcm_slot_tx] = 0;
981 if (dsp->pcm_slot_rx >= 0 &&
982 dsp->pcm_slot_rx <
984 freeslots[dsp->pcm_slot_rx] = 0;
988 ii = member->dsp->features.pcm_slots;
1005 "%s changing dsp %s to HW conference "
1007 member->dsp->name, current_conf, i);
1009 member->dsp->pcm_slot_tx = i;
1010 member->dsp->pcm_slot_rx = i;
1011 member->dsp->pcm_bank_tx = 2; /* loop */
1012 member->dsp->pcm_bank_rx = 2;
1013 member->dsp->hfc_conf = current_conf;
1014 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
1016 dsp_cmx_hw_message(member->dsp,
1028 list_for_each_entry(dsp, &dsp_ilist, list) {
1029 /* dsp must be on the same chip */
1030 if (dsp->features.hfc_id == same_hfc &&
1031 /* dsp must have joined a HW conference */
1032 dsp->hfc_conf >= 0 &&
1034 dsp->hfc_conf < 8)
1035 freeunits[dsp->hfc_conf] = 0;
1064 dsp_cmx_conf(struct dsp *dsp, u32 conf_id)
1071 if (dsp->conf_id == conf_id)
1075 if (dsp->conf_id) {
1078 dsp->conf->id);
1080 conf = dsp->conf;
1081 err = dsp_cmx_del_conf_member(dsp);
1084 dsp->conf_id = 0;
1087 dsp_cmx_hardware(NULL, dsp);
1123 if (dsp->hdlc && !member->dsp->hdlc) {
1129 if (!dsp->hdlc && member->dsp->hdlc) {
1137 err = dsp_cmx_add_conf_member(dsp, conf);
1140 dsp->conf_id = conf_id;
1148 dsp_cmx_hardware(NULL, dsp);
1161 showdelay(struct dsp *dsp, int samples, int delay)
1173 printk(KERN_DEBUG "DELAY (%s) %3d >%s\n", dsp->name, delay,
1182 dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb)
1206 if (dsp->rx_init) {
1207 dsp->rx_init = 0;
1208 if (dsp->features.unordered) {
1209 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1210 if (dsp->cmx_delay)
1211 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1214 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1))
1217 dsp->rx_R = 0;
1218 if (dsp->cmx_delay)
1219 dsp->rx_W = dsp->cmx_delay;
1221 dsp->rx_W = dsp_poll >> 1;
1225 if (dsp->features.unordered) {
1226 dsp->rx_W = (hh->id & CMX_BUFF_MASK);
1227 /* printk(KERN_DEBUG "%s %08x\n", dsp->name, hh->id); */
1233 if (((dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK) >= CMX_BUFF_HALF) {
1236 "cmx_receive(dsp=%lx): UNDERRUN (or overrun the "
1238 "(inst %s)\n", (u_long)dsp, dsp->name);
1240 if (dsp->features.unordered) {
1241 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1242 if (dsp->cmx_delay)
1243 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1246 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1))
1249 dsp->rx_R = 0;
1250 if (dsp->cmx_delay)
1251 dsp->rx_W = dsp->cmx_delay;
1253 dsp->rx_W = dsp_poll >> 1;
1255 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
1258 if (dsp->cmx_delay)
1259 if (((dsp->rx_W - dsp->rx_R) & CMX_BUFF_MASK) >=
1260 (dsp->cmx_delay << 1)) {
1263 "cmx_receive(dsp=%lx): OVERRUN (because "
1266 (u_long)dsp, dsp->name);
1268 if (dsp->features.unordered) {
1269 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1270 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1273 dsp->rx_R = 0;
1274 dsp->rx_W = dsp->cmx_delay;
1276 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
1282 "cmx_receive(dsp=%lx): rx_R(dsp)=%05x rx_W(dsp)=%05x len=%d %s\n",
1283 (u_long)dsp, dsp->rx_R, dsp->rx_W, len, dsp->name);
1288 d = dsp->rx_buff;
1289 w = dsp->rx_W;
1298 dsp->rx_W = ((dsp->rx_W + len) & CMX_BUFF_MASK);
1300 showdelay(dsp, len, (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK);
1309 dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
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);
1600 skb_queue_tail(&dsp->sendq, txskb);
1607 if (dsp->tx_volume)
1608 dsp_change_volume(nskb, dsp->tx_volume);
1610 if (dsp->pipeline.inuse)
1611 dsp_pipeline_process_tx(&dsp->pipeline, nskb->data,
1614 if (dsp->bf_enable)
1615 dsp_bf_encrypt(dsp, nskb->data, nskb->len);
1617 skb_queue_tail(&dsp->sendq, nskb);
1618 schedule_work(&dsp->workq);
1632 struct dsp *dsp;
1668 list_for_each_entry(dsp, &dsp_ilist, list) {
1669 if (dsp->hdlc)
1671 conf = dsp->conf;
1686 dsp_cmx_send_member(dsp, length, mixbuffer, members);
1707 if (member->dsp->hdlc)
1712 dsp = member->dsp;
1715 q = dsp->rx_buff;
1716 r = dsp->rx_R;
1728 dsp_cmx_send_member(member->dsp, length,
1735 list_for_each_entry(dsp, &dsp_ilist, list) {
1736 if (dsp->hdlc)
1738 p = dsp->rx_buff;
1739 q = dsp->tx_buff;
1740 r = dsp->rx_R;
1742 if (!dsp->rx_is_off) {
1750 dsp->rx_R = r; /* write incremented read pointer */
1754 delay = (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK;
1758 if (delay < dsp->rx_delay[0])
1759 dsp->rx_delay[0] = delay;
1761 delay = (dsp->tx_W-dsp->tx_R) & CMX_BUFF_MASK;
1765 if (delay < dsp->tx_delay[0])
1766 dsp->tx_delay[0] = delay;
1769 delay = dsp->rx_delay[0];
1772 if (delay > dsp->rx_delay[i])
1773 delay = dsp->rx_delay[i];
1781 if (delay > dsp_poll && !dsp->cmx_delay) {
1785 " dsp %s are now removed.\n",
1787 dsp->name);
1788 r = dsp->rx_R;
1797 dsp->rx_R = r;
1801 delay = dsp->tx_delay[0];
1804 if (delay > dsp->tx_delay[i])
1805 delay = dsp->tx_delay[i];
1812 if (delay > dsp_poll && dsp->tx_dejitter) {
1816 " dsp %s are now removed.\n",
1818 dsp->name);
1819 r = dsp->tx_R;
1828 dsp->tx_R = r;
1834 dsp->rx_delay[i] = dsp->rx_delay[i - 1];
1835 dsp->tx_delay[i] = dsp->tx_delay[i - 1];
1838 dsp->tx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1839 dsp->rx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1857 * audio data is transmitted from upper layer to the dsp
1860 dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb)
1870 w = dsp->tx_W;
1871 ww = dsp->tx_R;
1872 p = dsp->tx_buff;
1886 dsp->tx_W = ww;
1890 "cmx_transmit(dsp=%lx) %d bytes to 0x%x-0x%x. %s\n",
1891 (u_long)dsp, (ww - w) & CMX_BUFF_MASK, w, ww, dsp->name);
1916 dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb)
1923 if (!dsp->b_active)
1931 if (!dsp->conf) {
1933 if (dsp->echo.software) {
1939 skb_queue_tail(&dsp->sendq, nskb);
1940 schedule_work(&dsp->workq);
1946 if (dsp->conf->hardware)
1948 list_for_each_entry(member, &dsp->conf->mlist, list) {
1949 if (dsp->echo.software || member->dsp != dsp) {
1955 skb_queue_tail(&member->dsp->sendq, nskb);
1956 schedule_work(&member->dsp->workq);