mISDN: Add interface for PCM only access
Subsystems (2)
PATCH 10/28 mISDN: Add interface for PCM only access
Sometimes the ISDN chip only control the D-channel and B-channel are only accessed via the PCM interface. Add infrastruckture for this mode.
Signed-off-by Karsten Keil <[email protected]>
--- drivers/isdn/mISDN/socket.c | 1 + include/linux/mISDNhw.h | 3 +++ include/linux/mISDNif.h | 13 +++++++++---- 3 files changed, 13 insertions(+), 4 deletions(-)
drivers/isdn/mISDN/socket.c +1 -0
@@ -544,6 +544,7 @@ data_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) err =create_l2entity (_pms (sk)->dev, &_pms (sk)->ch, sk->sk_protocol, maddr);break ; +case ISDN_P_B_PCM :case ISDN_P_B_RAW :case ISDN_P_B_HDLC :case ISDN_P_B_X75SLP :
include/linux/mISDNhw.h +3 -0
@@ -5,6 +5,7 @@* Basic declarations for the mISDN HW channels * * Copyright 2008 by Karsten Keil <[email protected]> +* Copyright 2009-2012 by Karsten Keil <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -148,6 +149,8 @@ struct bchannel {u_int state;void *hw;int slot;/* multiport card channel slot */ +int pcm_tx;/* PCM tx slot nr */ +int pcm_rx;/* PCM rx slot nr */ struct timer_list timer;/* receive data */ struct sk_buff *rx_skb;
include/linux/mISDNif.h +9 -4
@@ -37,7 +37,7 @@*/ #define MISDN_MAJOR_VERSION 1#define MISDN_MINOR_VERSION 1 -#define MISDN_RELEASE 21 +#define MISDN_RELEASE 24/* primitives for information exchange * generell format
@@ -229,7 +229,7 @@#define ISDN_P_B_MASK 0x1f#define ISDN_P_B_START 0x20 - +#define ISDN_P_B_PCM 0x20#define ISDN_P_B_RAW 0x21#define ISDN_P_B_HDLC 0x22#define ISDN_P_B_X75SLP 0x23
@@ -360,8 +360,8 @@ clear_channelmap(u_int nr, u_char *map)#define MISDN_CTRL_LOOP 0x0001#define MISDN_CTRL_CONNECT 0x0002#define MISDN_CTRL_DISCONNECT 0x0004 -#define MISDN_CTRL_PCMCONNECT 0x0010 -#define MISDN_CTRL_PCMDISCONNECT 0x0020 +#define MISDN_CTRL_GET_PCM_SLOTS 0x0010 +#define MISDN_CTRL_SET_PCM_SLOTS 0x0020#define MISDN_CTRL_SETPEER 0x0040#define MISDN_CTRL_UNSETPEER 0x0080#define MISDN_CTRL_RX_OFF 0x0100
@@ -381,6 +381,10 @@ clear_channelmap(u_int nr, u_char *map)#define MISDN_CTRL_HFC_WD_INIT 0x4009#define MISDN_CTRL_HFC_WD_RESET 0x400A +/* special PCM slot numbers */ +#define MISDN_PCM_SLOT_DISABLE -1/* PCM disabled */ +#define MISDN_PCM_SLOT_IGNORE -2/* PCM setting will be not changed */ +/* socket options */ #define MISDN_TIME_STAMP 0x0001
@@ -389,6 +393,7 @@ struct mISDN_ctrl_req {int channel;int p1;int p2; +int p3; };/* muxer options */
Signature · 1 line
1.7.3.4