Lines Matching refs:dsp

132 #include "dsp.h"
148 dsp_cmx_debug(struct dsp *dsp)
152 struct dsp *odsp;
161 if (dsp == odsp)
173 member->dsp->name, member->dsp->pcm_slot_tx,
174 member->dsp->pcm_bank_tx, member->dsp->pcm_slot_rx,
175 member->dsp->pcm_bank_rx, member->dsp->hfc_conf,
176 member->dsp->tx_data, member->dsp->rx_is_off,
177 (member->dsp == dsp) ? " *this*" : "");
209 dsp_cmx_add_conf_member(struct dsp *dsp, struct dsp_conf *conf)
213 if (!conf || !dsp) {
214 printk(KERN_WARNING "%s: conf or dsp is 0.\n", __func__);
217 if (dsp->member) {
218 printk(KERN_WARNING "%s: dsp is already member in a conf.\n",
223 if (dsp->conf) {
224 printk(KERN_WARNING "%s: dsp is already in a conf.\n",
234 member->dsp = dsp;
236 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
237 dsp->rx_init = 1; /* rx_W and rx_R will be adjusted on first frame */
238 dsp->rx_W = 0;
239 dsp->rx_R = 0;
243 dsp->conf = conf;
244 dsp->member = member;
254 dsp_cmx_del_conf_member(struct dsp *dsp)
258 if (!dsp) {
259 printk(KERN_WARNING "%s: dsp is 0.\n",
264 if (!dsp->conf) {
265 printk(KERN_WARNING "%s: dsp is not in a conf.\n",
270 if (list_empty(&dsp->conf->mlist)) {
271 printk(KERN_WARNING "%s: dsp has linked an empty conf.\n",
277 list_for_each_entry(member, &dsp->conf->mlist, list) {
278 if (member->dsp == dsp) {
280 dsp->conf = NULL;
281 dsp->member = NULL;
287 "%s: dsp is not present in its own conf_member list.\n",
350 dsp_cmx_hw_message(struct dsp *dsp, u32 message, u32 param1, u32 param2,
359 if (dsp->ch.peer)
360 dsp->ch.peer->ctrl(dsp->ch.peer, CONTROL_CHANNEL, &cq);
367 * either a conference or a dsp instance can be given
368 * if only dsp instance is given, the instance is not associated with a conf
369 * and therefore removed. if a conference is given, the dsp is expected to
373 dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp)
376 struct dsp *finddsp;
383 /* dsp gets updated (no conf) */
385 if (!dsp)
388 printk(KERN_DEBUG "%s checking dsp %s\n",
389 __func__, dsp->name);
392 if (dsp->hfc_conf >= 0) {
396 "because dsp is split\n", __func__,
397 dsp->name, dsp->hfc_conf);
398 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_CONF_SPLIT,
400 dsp->hfc_conf = -1;
403 if (dsp->features.pcm_banks < 1)
405 if (!dsp->echo.software && !dsp->echo.hardware) {
407 if (dsp->pcm_slot_tx >= 0 || dsp->pcm_slot_rx >= 0) {
411 " dsp is split (no echo)\n",
412 __func__, dsp->name,
413 dsp->pcm_slot_tx, dsp->pcm_slot_rx);
414 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_DISC,
416 dsp->pcm_slot_tx = -1;
417 dsp->pcm_bank_tx = -1;
418 dsp->pcm_slot_rx = -1;
419 dsp->pcm_bank_rx = -1;
424 dsp->echo.software = dsp->tx_data;
425 dsp->echo.hardware = 0;
427 if (dsp->pcm_slot_tx >= 0 && dsp->pcm_slot_rx < 0 &&
428 dsp->pcm_bank_tx == 2 && dsp->pcm_bank_rx == 2) {
429 dsp->echo.hardware = 1;
433 if (dsp->pcm_slot_tx >= 0) {
434 dsp->pcm_slot_rx = dsp->pcm_slot_tx;
435 dsp->pcm_bank_tx = 2; /* 2 means loop */
436 dsp->pcm_bank_rx = 2;
440 __func__, dsp->name,
441 dsp->pcm_slot_tx);
442 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN,
443 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2);
444 dsp->echo.hardware = 1;
448 dsp->pcm_slot_tx = -1;
449 dsp->pcm_slot_rx = -1;
452 if (finddsp->features.pcm_id == dsp->features.pcm_id) {
462 ii = dsp->features.pcm_slots;
474 dsp->echo.software = 1;
478 dsp->pcm_slot_tx = i;
479 dsp->pcm_slot_rx = i;
480 dsp->pcm_bank_tx = 2; /* loop */
481 dsp->pcm_bank_rx = 2;
485 __func__, dsp->name, dsp->pcm_slot_tx);
486 dsp_cmx_hw_message(dsp, MISDN_CTRL_HFC_PCM_CONN,
487 dsp->pcm_slot_tx, 2, dsp->pcm_slot_rx, 2);
488 dsp->echo.hardware = 1;
503 same_hfc = member->dsp->features.hfc_id;
504 same_pcm = member->dsp->features.pcm_id;
508 if (member->dsp->tx_mix) {
511 "%s dsp %s cannot form a conf, because "
513 member->dsp->name);
516 dsp = member->dsp;
518 if (dsp->hfc_conf >= 0) {
525 dsp->name,
526 dsp->hfc_conf);
527 dsp_cmx_hw_message(dsp,
530 dsp->hfc_conf = -1;
533 if (dsp->pcm_slot_tx >= 0 ||
534 dsp->pcm_slot_rx >= 0) {
541 dsp->name,
542 dsp->pcm_slot_tx,
543 dsp->pcm_slot_rx);
544 dsp_cmx_hw_message(dsp,
547 dsp->pcm_slot_tx = -1;
548 dsp->pcm_bank_tx = -1;
549 dsp->pcm_slot_rx = -1;
550 dsp->pcm_bank_rx = -1;
558 if (member->dsp->echo.hardware || member->dsp->echo.software) {
561 "%s dsp %s cannot form a conf, because "
563 member->dsp->name);
567 if (member->dsp->tx_mix) {
570 "%s dsp %s cannot form a conf, because "
572 __func__, member->dsp->name);
576 if (member->dsp->tx_volume) {
579 "%s dsp %s cannot form a conf, because "
581 __func__, member->dsp->name);
584 if (member->dsp->rx_volume) {
587 "%s dsp %s cannot form a conf, because "
589 __func__, member->dsp->name);
593 if (member->dsp->tx_data) {
596 "%s dsp %s tx_data is turned on\n",
597 __func__, member->dsp->name);
601 if (member->dsp->pipeline.inuse) {
604 "%s dsp %s cannot form a conf, because "
606 member->dsp->name);
610 if (member->dsp->bf_enable) {
612 printk(KERN_DEBUG "%s dsp %s cannot form a "
614 __func__, member->dsp->name);
618 if (member->dsp->features.pcm_id < 0) {
621 "%s dsp %s cannot form a conf, because "
622 "dsp has no PCM bus\n",
623 __func__, member->dsp->name);
627 if (member->dsp->features.pcm_id != same_pcm) {
630 "%s dsp %s cannot form a conf, because "
631 "dsp is on a different PCM bus than the "
632 "first dsp\n",
633 __func__, member->dsp->name);
637 if (same_hfc != member->dsp->features.hfc_id)
640 if (current_conf < 0 && member->dsp->hfc_conf >= 0)
641 current_conf = member->dsp->hfc_conf;
643 if (member->dsp->hfc_conf < 0)
658 "because dsp is alone\n", __func__, conf->id);
663 dsp = member->dsp;
680 if (member->dsp->hfc_conf >= 0) {
685 __func__, member->dsp->name,
686 member->dsp->hfc_conf);
687 dsp_cmx_hw_message(member->dsp,
689 member->dsp->hfc_conf = -1;
691 if (nextm->dsp->hfc_conf >= 0) {
696 __func__, nextm->dsp->name,
697 nextm->dsp->hfc_conf);
698 dsp_cmx_hw_message(nextm->dsp,
700 nextm->dsp->hfc_conf = -1;
703 if (member->dsp->features.pcm_banks > 1 &&
704 nextm->dsp->features.pcm_banks > 1 &&
705 member->dsp->features.hfc_id !=
706 nextm->dsp->features.hfc_id) {
708 if (member->dsp->pcm_slot_tx >= 0 &&
709 member->dsp->pcm_slot_rx >= 0 &&
710 nextm->dsp->pcm_slot_tx >= 0 &&
711 nextm->dsp->pcm_slot_rx >= 0 &&
712 nextm->dsp->pcm_slot_tx ==
713 member->dsp->pcm_slot_rx &&
714 nextm->dsp->pcm_slot_rx ==
715 member->dsp->pcm_slot_tx &&
716 nextm->dsp->pcm_slot_tx ==
717 member->dsp->pcm_slot_tx &&
718 member->dsp->pcm_bank_tx !=
719 member->dsp->pcm_bank_rx &&
720 nextm->dsp->pcm_bank_tx !=
721 nextm->dsp->pcm_bank_rx) {
725 "%s dsp %s & %s stay joined on "
729 member->dsp->name,
730 nextm->dsp->name,
731 member->dsp->pcm_slot_tx,
732 member->dsp->pcm_bank_tx,
733 member->dsp->pcm_bank_rx);
740 list_for_each_entry(dsp, &dsp_ilist, list) {
741 if (dsp != member->dsp &&
742 dsp != nextm->dsp &&
743 member->dsp->features.pcm_id ==
744 dsp->features.pcm_id) {
745 if (dsp->pcm_slot_rx >= 0 &&
746 dsp->pcm_slot_rx <
748 freeslots[dsp->pcm_slot_rx] = 0;
749 if (dsp->pcm_slot_tx >= 0 &&
750 dsp->pcm_slot_tx <
752 freeslots[dsp->pcm_slot_tx] = 0;
756 ii = member->dsp->features.pcm_slots;
767 member->dsp->name,
768 nextm->dsp->name);
773 member->dsp->pcm_slot_tx = i;
774 member->dsp->pcm_slot_rx = i;
775 nextm->dsp->pcm_slot_tx = i;
776 nextm->dsp->pcm_slot_rx = i;
777 member->dsp->pcm_bank_rx = 0;
778 member->dsp->pcm_bank_tx = 1;
779 nextm->dsp->pcm_bank_rx = 1;
780 nextm->dsp->pcm_bank_tx = 0;
787 member->dsp->name,
788 nextm->dsp->name,
789 member->dsp->pcm_slot_tx);
790 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
791 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx,
792 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx);
793 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN,
794 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx,
795 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx);
802 if (member->dsp->pcm_slot_tx >= 0 &&
803 member->dsp->pcm_slot_rx >= 0 &&
804 nextm->dsp->pcm_slot_tx >= 0 &&
805 nextm->dsp->pcm_slot_rx >= 0 &&
806 nextm->dsp->pcm_slot_tx ==
807 member->dsp->pcm_slot_rx &&
808 nextm->dsp->pcm_slot_rx ==
809 member->dsp->pcm_slot_tx &&
810 member->dsp->pcm_slot_tx !=
811 member->dsp->pcm_slot_rx &&
812 member->dsp->pcm_bank_tx == 0 &&
813 member->dsp->pcm_bank_rx == 0 &&
814 nextm->dsp->pcm_bank_tx == 0 &&
815 nextm->dsp->pcm_bank_rx == 0) {
819 "%s dsp %s & %s stay joined on PCM "
822 member->dsp->name,
823 nextm->dsp->name,
824 member->dsp->pcm_slot_tx,
825 member->dsp->pcm_slot_rx);
832 list_for_each_entry(dsp, &dsp_ilist, list) {
833 if (dsp != member->dsp &&
834 dsp != nextm->dsp &&
835 member->dsp->features.pcm_id ==
836 dsp->features.pcm_id) {
837 if (dsp->pcm_slot_rx >= 0 &&
838 dsp->pcm_slot_rx <
840 freeslots[dsp->pcm_slot_rx] = 0;
841 if (dsp->pcm_slot_tx >= 0 &&
842 dsp->pcm_slot_tx <
844 freeslots[dsp->pcm_slot_tx] = 0;
848 ii = member->dsp->features.pcm_slots;
859 member->dsp->name,
860 nextm->dsp->name);
876 member->dsp->name,
877 nextm->dsp->name);
882 member->dsp->pcm_slot_tx = i1;
883 member->dsp->pcm_slot_rx = i2;
884 nextm->dsp->pcm_slot_tx = i2;
885 nextm->dsp->pcm_slot_rx = i1;
886 member->dsp->pcm_bank_rx = 0;
887 member->dsp->pcm_bank_tx = 0;
888 nextm->dsp->pcm_bank_rx = 0;
889 nextm->dsp->pcm_bank_tx = 0;
896 member->dsp->name,
897 nextm->dsp->name,
898 member->dsp->pcm_slot_tx,
899 member->dsp->pcm_slot_rx);
900 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
901 member->dsp->pcm_slot_tx, member->dsp->pcm_bank_tx,
902 member->dsp->pcm_slot_rx, member->dsp->pcm_bank_rx);
903 dsp_cmx_hw_message(nextm->dsp, MISDN_CTRL_HFC_PCM_CONN,
904 nextm->dsp->pcm_slot_tx, nextm->dsp->pcm_bank_tx,
905 nextm->dsp->pcm_slot_rx, nextm->dsp->pcm_bank_rx);
945 if (!member->dsp->features.hfc_conf)
948 if (member->dsp->hdlc)
951 if (member->dsp->hfc_conf == current_conf)
955 list_for_each_entry(dsp, &dsp_ilist, list) {
961 dsp != member->dsp &&
962 /* dsp must be on the same PCM */
963 member->dsp->features.pcm_id ==
964 dsp->features.pcm_id) {
965 /* dsp must be on a slot */
966 if (dsp->pcm_slot_tx >= 0 &&
967 dsp->pcm_slot_tx <
969 freeslots[dsp->pcm_slot_tx] = 0;
970 if (dsp->pcm_slot_rx >= 0 &&
971 dsp->pcm_slot_rx <
973 freeslots[dsp->pcm_slot_rx] = 0;
977 ii = member->dsp->features.pcm_slots;
994 "%s changing dsp %s to HW conference "
996 member->dsp->name, current_conf, i);
998 member->dsp->pcm_slot_tx = i;
999 member->dsp->pcm_slot_rx = i;
1000 member->dsp->pcm_bank_tx = 2; /* loop */
1001 member->dsp->pcm_bank_rx = 2;
1002 member->dsp->hfc_conf = current_conf;
1003 dsp_cmx_hw_message(member->dsp, MISDN_CTRL_HFC_PCM_CONN,
1005 dsp_cmx_hw_message(member->dsp,
1017 list_for_each_entry(dsp, &dsp_ilist, list) {
1018 /* dsp must be on the same chip */
1019 if (dsp->features.hfc_id == same_hfc &&
1020 /* dsp must have joined a HW conference */
1021 dsp->hfc_conf >= 0 &&
1023 dsp->hfc_conf < 8)
1024 freeunits[dsp->hfc_conf] = 0;
1053 dsp_cmx_conf(struct dsp *dsp, u32 conf_id)
1060 if (dsp->conf_id == conf_id)
1064 if (dsp->conf_id) {
1067 dsp->conf->id);
1069 conf = dsp->conf;
1070 err = dsp_cmx_del_conf_member(dsp);
1073 dsp->conf_id = 0;
1076 dsp_cmx_hardware(NULL, dsp);
1112 if (dsp->hdlc && !member->dsp->hdlc) {
1118 if (!dsp->hdlc && member->dsp->hdlc) {
1126 err = dsp_cmx_add_conf_member(dsp, conf);
1129 dsp->conf_id = conf_id;
1137 dsp_cmx_hardware(NULL, dsp);
1150 showdelay(struct dsp *dsp, int samples, int delay)
1162 printk(KERN_DEBUG "DELAY (%s) %3d >%s\n", dsp->name, delay,
1171 dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb)
1195 if (dsp->rx_init) {
1196 dsp->rx_init = 0;
1197 if (dsp->features.unordered) {
1198 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1199 if (dsp->cmx_delay)
1200 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1203 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1))
1206 dsp->rx_R = 0;
1207 if (dsp->cmx_delay)
1208 dsp->rx_W = dsp->cmx_delay;
1210 dsp->rx_W = dsp_poll >> 1;
1214 if (dsp->features.unordered) {
1215 dsp->rx_W = (hh->id & CMX_BUFF_MASK);
1216 /* printk(KERN_DEBUG "%s %08x\n", dsp->name, hh->id); */
1222 if (((dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK) >= CMX_BUFF_HALF) {
1225 "cmx_receive(dsp=%lx): UNDERRUN (or overrun the "
1227 "(inst %s)\n", (u_long)dsp, dsp->name);
1229 if (dsp->features.unordered) {
1230 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1231 if (dsp->cmx_delay)
1232 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1235 dsp->rx_W = (dsp->rx_R + (dsp_poll >> 1))
1238 dsp->rx_R = 0;
1239 if (dsp->cmx_delay)
1240 dsp->rx_W = dsp->cmx_delay;
1242 dsp->rx_W = dsp_poll >> 1;
1244 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
1247 if (dsp->cmx_delay)
1248 if (((dsp->rx_W - dsp->rx_R) & CMX_BUFF_MASK) >=
1249 (dsp->cmx_delay << 1)) {
1252 "cmx_receive(dsp=%lx): OVERRUN (because "
1255 (u_long)dsp, dsp->name);
1257 if (dsp->features.unordered) {
1258 dsp->rx_R = (hh->id & CMX_BUFF_MASK);
1259 dsp->rx_W = (dsp->rx_R + dsp->cmx_delay)
1262 dsp->rx_R = 0;
1263 dsp->rx_W = dsp->cmx_delay;
1265 memset(dsp->rx_buff, dsp_silence, sizeof(dsp->rx_buff));
1271 "cmx_receive(dsp=%lx): rx_R(dsp)=%05x rx_W(dsp)=%05x len=%d %s\n",
1272 (u_long)dsp, dsp->rx_R, dsp->rx_W, len, dsp->name);
1277 d = dsp->rx_buff;
1278 w = dsp->rx_W;
1287 dsp->rx_W = ((dsp->rx_W + len) & CMX_BUFF_MASK);
1289 showdelay(dsp, len, (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK);
1298 dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
1300 struct dsp_conf *conf = dsp->conf;
1301 struct dsp *member, *other;
1311 if (!dsp->b_active) { /* if not active */
1312 dsp->last_tx = 0;
1315 if (((dsp->conf && dsp->conf->hardware) || /* hardware conf */
1316 dsp->echo.hardware) && /* OR hardware echo */
1317 dsp->tx_R == dsp->tx_W && /* AND no tx-data */
1318 !(dsp->tone.tone && dsp->tone.software)) { /* AND not soft tones */
1319 if (!dsp->tx_data) { /* no tx_data for user space required */
1320 dsp->last_tx = 0;
1323 if (dsp->conf && dsp->conf->software && dsp->conf->hardware)
1325 if (dsp->echo.software && dsp->echo.hardware)
1331 "SEND members=%d dsp=%s, conf=%p, rx_R=%05x rx_W=%05x\n",
1332 members, dsp->name, conf, dsp->rx_R, dsp->rx_W);
1336 if (dsp->cmx_delay && !dsp->last_tx) {
1353 dsp->last_tx = 1;
1356 member = dsp;
1357 p = dsp->tx_buff; /* transmit data */
1358 q = dsp->rx_buff; /* received data */
1360 t = dsp->tx_R; /* tx-pointers */
1361 tt = dsp->tx_W;
1362 r = dsp->rx_R; /* rx-pointers */
1372 if (dsp->tone.tone && dsp->tone.software) {
1374 dsp_tone_copy(dsp, d, len);
1375 dsp->tx_R = 0; /* clear tx buffer */
1376 dsp->tx_W = 0;
1380 if (!dsp->tx_mix && t != tt) {
1396 dsp->tx_R = t;
1410 if (!dsp->echo.software) {
1439 dsp->tx_R = t;
1450 struct dsp_conf_member, list))->dsp;
1453 struct dsp_conf_member, list))->dsp;
1460 if (!dsp->echo.software) {
1500 dsp->tx_R = t;
1505 if (!dsp->echo.software) {
1560 dsp->tx_R = t;
1568 if (dsp->tx_data) {
1573 skb_queue_tail(&dsp->sendq, nskb);
1574 schedule_work(&dsp->workq);
1589 skb_queue_tail(&dsp->sendq, txskb);
1596 if (dsp->tx_volume)
1597 dsp_change_volume(nskb, dsp->tx_volume);
1599 if (dsp->pipeline.inuse)
1600 dsp_pipeline_process_tx(&dsp->pipeline, nskb->data,
1603 if (dsp->bf_enable)
1604 dsp_bf_encrypt(dsp, nskb->data, nskb->len);
1606 skb_queue_tail(&dsp->sendq, nskb);
1607 schedule_work(&dsp->workq);
1621 struct dsp *dsp;
1657 list_for_each_entry(dsp, &dsp_ilist, list) {
1658 if (dsp->hdlc)
1660 conf = dsp->conf;
1675 dsp_cmx_send_member(dsp, length, mixbuffer, members);
1696 if (member->dsp->hdlc)
1701 dsp = member->dsp;
1704 q = dsp->rx_buff;
1705 r = dsp->rx_R;
1717 dsp_cmx_send_member(member->dsp, length,
1724 list_for_each_entry(dsp, &dsp_ilist, list) {
1725 if (dsp->hdlc)
1727 p = dsp->rx_buff;
1728 q = dsp->tx_buff;
1729 r = dsp->rx_R;
1731 if (!dsp->rx_is_off) {
1739 dsp->rx_R = r; /* write incremented read pointer */
1743 delay = (dsp->rx_W-dsp->rx_R) & CMX_BUFF_MASK;
1747 if (delay < dsp->rx_delay[0])
1748 dsp->rx_delay[0] = delay;
1750 delay = (dsp->tx_W-dsp->tx_R) & CMX_BUFF_MASK;
1754 if (delay < dsp->tx_delay[0])
1755 dsp->tx_delay[0] = delay;
1758 delay = dsp->rx_delay[0];
1761 if (delay > dsp->rx_delay[i])
1762 delay = dsp->rx_delay[i];
1770 if (delay > dsp_poll && !dsp->cmx_delay) {
1774 " dsp %s are now removed.\n",
1776 dsp->name);
1777 r = dsp->rx_R;
1786 dsp->rx_R = r;
1790 delay = dsp->tx_delay[0];
1793 if (delay > dsp->tx_delay[i])
1794 delay = dsp->tx_delay[i];
1801 if (delay > dsp_poll && dsp->tx_dejitter) {
1805 " dsp %s are now removed.\n",
1807 dsp->name);
1808 r = dsp->tx_R;
1817 dsp->tx_R = r;
1823 dsp->rx_delay[i] = dsp->rx_delay[i - 1];
1824 dsp->tx_delay[i] = dsp->tx_delay[i - 1];
1827 dsp->tx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1828 dsp->rx_delay[0] = CMX_BUFF_HALF; /* (infinite) delay */
1846 * audio data is transmitted from upper layer to the dsp
1849 dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb)
1859 w = dsp->tx_W;
1860 ww = dsp->tx_R;
1861 p = dsp->tx_buff;
1875 dsp->tx_W = ww;
1879 "cmx_transmit(dsp=%lx) %d bytes to 0x%x-0x%x. %s\n",
1880 (u_long)dsp, (ww - w) & CMX_BUFF_MASK, w, ww, dsp->name);
1905 dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb)
1912 if (!dsp->b_active)
1920 if (!dsp->conf) {
1922 if (dsp->echo.software) {
1928 skb_queue_tail(&dsp->sendq, nskb);
1929 schedule_work(&dsp->workq);
1935 if (dsp->conf->hardware)
1937 list_for_each_entry(member, &dsp->conf->mlist, list) {
1938 if (dsp->echo.software || member->dsp != dsp) {
1944 skb_queue_tail(&member->dsp->sendq, nskb);
1945 schedule_work(&member->dsp->workq);