aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2014-09-05 09:26:11 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-06 01:20:21 -0400
commit126859b992c30915aba8d6768254212010f1b43c (patch)
tree2af82e09f615418f032cfdbfd54e6f297da664f3 /drivers/isdn
parentcea6aeb6979f6409cacd6900d237cb4ed39fd6d2 (diff)
mISDN: remove DSP_NEVER_DEFINED and adjust code identation
The DSP_NEVER_DEFINED #ifdef is confusing, it slips in an extra } which is not required because the previous code is indented incorrectly. Correct the identation and remove the extraneous DSP_NEVER_DEFINED Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/dsp_cmx.c109
1 files changed, 53 insertions, 56 deletions
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
index a4f05c54c32b..87f7dff20ff6 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
@@ -1454,66 +1454,63 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
1454#ifdef CMX_CONF_DEBUG 1454#ifdef CMX_CONF_DEBUG
1455 if (0) { 1455 if (0) {
1456#else 1456#else
1457 if (members == 2) { 1457 if (members == 2) {
1458#endif 1458#endif
1459 /* "other" becomes other party */ 1459 /* "other" becomes other party */
1460 other = (list_entry(conf->mlist.next, 1460 other = (list_entry(conf->mlist.next,
1461 struct dsp_conf_member, list))->dsp; 1461 struct dsp_conf_member, list))->dsp;
1462 if (other == member) 1462 if (other == member)
1463 other = (list_entry(conf->mlist.prev, 1463 other = (list_entry(conf->mlist.prev,
1464 struct dsp_conf_member, list))->dsp; 1464 struct dsp_conf_member, list))->dsp;
1465 o_q = other->rx_buff; /* received data */ 1465 o_q = other->rx_buff; /* received data */
1466 o_rr = (other->rx_R + len) & CMX_BUFF_MASK; 1466 o_rr = (other->rx_R + len) & CMX_BUFF_MASK;
1467 /* end of rx-pointer */ 1467 /* end of rx-pointer */
1468 o_r = (o_rr - rr + r) & CMX_BUFF_MASK; 1468 o_r = (o_rr - rr + r) & CMX_BUFF_MASK;
1469 /* start rx-pointer at current read position*/ 1469 /* start rx-pointer at current read position*/
1470 /* -> if echo is NOT enabled */ 1470 /* -> if echo is NOT enabled */
1471 if (!dsp->echo.software) { 1471 if (!dsp->echo.software) {
1472 /* 1472 /*
1473 * -> copy other member's rx-data, 1473 * -> copy other member's rx-data,
1474 * if tx-data is available, mix 1474 * if tx-data is available, mix
1475 */ 1475 */
1476 while (o_r != o_rr && t != tt) { 1476 while (o_r != o_rr && t != tt) {
1477 *d++ = dsp_audio_mix_law[(p[t] << 8) | o_q[o_r]]; 1477 *d++ = dsp_audio_mix_law[(p[t] << 8) | o_q[o_r]];
1478 t = (t + 1) & CMX_BUFF_MASK; 1478 t = (t + 1) & CMX_BUFF_MASK;
1479 o_r = (o_r + 1) & CMX_BUFF_MASK; 1479 o_r = (o_r + 1) & CMX_BUFF_MASK;
1480 } 1480 }
1481 while (o_r != o_rr) { 1481 while (o_r != o_rr) {
1482 *d++ = o_q[o_r]; 1482 *d++ = o_q[o_r];
1483 o_r = (o_r + 1) & CMX_BUFF_MASK; 1483 o_r = (o_r + 1) & CMX_BUFF_MASK;
1484 } 1484 }
1485 /* -> if echo is enabled */ 1485 /* -> if echo is enabled */
1486 } else { 1486 } else {
1487 /* 1487 /*
1488 * -> mix other member's rx-data with echo, 1488 * -> mix other member's rx-data with echo,
1489 * if tx-data is available, mix 1489 * if tx-data is available, mix
1490 */ 1490 */
1491 while (r != rr && t != tt) { 1491 while (r != rr && t != tt) {
1492 sample = dsp_audio_law_to_s32[p[t]] + 1492 sample = dsp_audio_law_to_s32[p[t]] +
1493 dsp_audio_law_to_s32[q[r]] + 1493 dsp_audio_law_to_s32[q[r]] +
1494 dsp_audio_law_to_s32[o_q[o_r]]; 1494 dsp_audio_law_to_s32[o_q[o_r]];
1495 if (sample < -32768) 1495 if (sample < -32768)
1496 sample = -32768; 1496 sample = -32768;
1497 else if (sample > 32767) 1497 else if (sample > 32767)
1498 sample = 32767; 1498 sample = 32767;
1499 *d++ = dsp_audio_s16_to_law[sample & 0xffff]; 1499 *d++ = dsp_audio_s16_to_law[sample & 0xffff];
1500 /* tx-data + rx_data + echo */ 1500 /* tx-data + rx_data + echo */
1501 t = (t + 1) & CMX_BUFF_MASK; 1501 t = (t + 1) & CMX_BUFF_MASK;
1502 r = (r + 1) & CMX_BUFF_MASK; 1502 r = (r + 1) & CMX_BUFF_MASK;
1503 o_r = (o_r + 1) & CMX_BUFF_MASK; 1503 o_r = (o_r + 1) & CMX_BUFF_MASK;
1504 } 1504 }
1505 while (r != rr) { 1505 while (r != rr) {
1506 *d++ = dsp_audio_mix_law[(q[r] << 8) | o_q[o_r]]; 1506 *d++ = dsp_audio_mix_law[(q[r] << 8) | o_q[o_r]];
1507 r = (r + 1) & CMX_BUFF_MASK; 1507 r = (r + 1) & CMX_BUFF_MASK;
1508 o_r = (o_r + 1) & CMX_BUFF_MASK; 1508 o_r = (o_r + 1) & CMX_BUFF_MASK;
1509 }
1510 } 1509 }
1511 dsp->tx_R = t;
1512 goto send_packet;
1513 } 1510 }
1514#ifdef DSP_NEVER_DEFINED 1511 dsp->tx_R = t;
1512 goto send_packet;
1515 } 1513 }
1516#endif
1517 /* PROCESS DATA (three or more members) */ 1514 /* PROCESS DATA (three or more members) */
1518 /* -> if echo is NOT enabled */ 1515 /* -> if echo is NOT enabled */
1519 if (!dsp->echo.software) { 1516 if (!dsp->echo.software) {