1 #include <linux/kernel.h>
2 #include <linux/slab.h>
4 #include <linux/tapi/tapi.h>
11 int vmmc_port_ring(struct tapi_device
*tdev
, struct tapi_port
*port
, bool ring
)
13 struct vmmc
*vmmc
= tdev_to_vmmc(tdev
);
15 return vmmc_alm_set_state(&vmmc
->ports
[port
->id
].alm
,
16 ring
? VMMC_ALM_STATE_RING
: VMMC_ALM_STATE_ONHOOK
);
19 int vmmc_port_send_dtmf_event(struct tapi_device
*tdev
,
20 struct tapi_port
*port
, struct tapi_dtmf_event
*event
)
25 struct vmmc_port
*vmmc_port_init(struct vmmc
*vmmc
, struct vmmc_port
*port
,
26 struct tapi_port
*tport
, unsigned int id
)
28 vmmc_alm_init(&port
->alm
, vmmc
, id
);
29 vmmc_sig_init(&port
->sig
, vmmc
, id
);
31 port
->sig_pin
= vmmc_module_get_pin(&port
->sig
.module
);
32 vmmc_module_set_pin_input(&port
->sig
.module
, port
->sig_pin
,
35 vmmc_module_sync(&port
->sig
.module
);
37 vmmc_alm_set_state(&port
->alm
, VMMC_ALM_STATE_ONHOOK
);
40 tapi_endpoint_set_data(&tport
->ep
, &port
->alm
.module
);
45 void vmmc_port_put(struct vmmc
*vmmc
, struct vmmc_port
*port
)
47 vmmc_module_put_pin(&port
->sig
.module
, port
->sig_pin
);
This page took 0.044504 seconds and 5 git commands to generate.