~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/hsi/cs-protocol.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/hsi/cs-protocol.h (Architecture sparc) and /include/uapi/linux/hsi/cs-protocol.h (Architecture mips)


  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux      1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  * cmt-speech interface definitions                 3  * cmt-speech interface definitions
  4  *                                                  4  *
  5  * Copyright (C) 2008,2009,2010 Nokia Corporat      5  * Copyright (C) 2008,2009,2010 Nokia Corporation. All rights reserved.
  6  *                                                  6  *
  7  * Contact: Kai Vehmanen <kai.vehmanen@nokia.c      7  * Contact: Kai Vehmanen <kai.vehmanen@nokia.com>
  8  * Original author: Peter Ujfalusi <peter.ujfa      8  * Original author: Peter Ujfalusi <peter.ujfalusi@nokia.com>
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef _CS_PROTOCOL_H                             11 #ifndef _CS_PROTOCOL_H
 12 #define _CS_PROTOCOL_H                             12 #define _CS_PROTOCOL_H
 13                                                    13 
 14 #include <linux/types.h>                           14 #include <linux/types.h>
 15 #include <linux/ioctl.h>                           15 #include <linux/ioctl.h>
 16                                                    16 
 17 /* chardev parameters */                           17 /* chardev parameters */
 18 #define CS_DEV_FILE_NAME                "/dev/     18 #define CS_DEV_FILE_NAME                "/dev/cmt_speech"
 19                                                    19 
 20 /* user-space API versioning */                    20 /* user-space API versioning */
 21 #define CS_IF_VERSION                   2          21 #define CS_IF_VERSION                   2
 22                                                    22 
 23 /* APE kernel <-> user space messages */           23 /* APE kernel <-> user space messages */
 24 #define CS_CMD_SHIFT                    28         24 #define CS_CMD_SHIFT                    28
 25 #define CS_DOMAIN_SHIFT                 24         25 #define CS_DOMAIN_SHIFT                 24
 26                                                    26 
 27 #define CS_CMD_MASK                     0xff00     27 #define CS_CMD_MASK                     0xff000000
 28 #define CS_PARAM_MASK                   0xffff     28 #define CS_PARAM_MASK                   0xffffff
 29                                                    29 
 30 #define CS_CMD(id, dom) \                          30 #define CS_CMD(id, dom) \
 31         (((id) << CS_CMD_SHIFT) | ((dom) << CS     31         (((id) << CS_CMD_SHIFT) | ((dom) << CS_DOMAIN_SHIFT))
 32                                                    32 
 33 #define CS_ERROR                        CS_CMD     33 #define CS_ERROR                        CS_CMD(1, 0)
 34 #define CS_RX_DATA_RECEIVED             CS_CMD     34 #define CS_RX_DATA_RECEIVED             CS_CMD(2, 0)
 35 #define CS_TX_DATA_READY                CS_CMD     35 #define CS_TX_DATA_READY                CS_CMD(3, 0)
 36 #define CS_TX_DATA_SENT                 CS_CMD     36 #define CS_TX_DATA_SENT                 CS_CMD(4, 0)
 37                                                    37 
 38 /* params to CS_ERROR indication */                38 /* params to CS_ERROR indication */
 39 #define CS_ERR_PEER_RESET               0          39 #define CS_ERR_PEER_RESET               0
 40                                                    40 
 41 /* ioctl interface */                              41 /* ioctl interface */
 42                                                    42 
 43 /* parameters to CS_CONFIG_BUFS ioctl */           43 /* parameters to CS_CONFIG_BUFS ioctl */
 44 #define CS_FEAT_TSTAMP_RX_CTRL          (1 <<      44 #define CS_FEAT_TSTAMP_RX_CTRL          (1 << 0)
 45 #define CS_FEAT_ROLLING_RX_COUNTER      (2 <<      45 #define CS_FEAT_ROLLING_RX_COUNTER      (2 << 0)
 46                                                    46 
 47 /* parameters to CS_GET_STATE ioctl */             47 /* parameters to CS_GET_STATE ioctl */
 48 #define CS_STATE_CLOSED                 0          48 #define CS_STATE_CLOSED                 0
 49 #define CS_STATE_OPENED                 1 /* r     49 #define CS_STATE_OPENED                 1 /* resource allocated */
 50 #define CS_STATE_CONFIGURED             2 /* d     50 #define CS_STATE_CONFIGURED             2 /* data path active */
 51                                                    51 
 52 /* maximum number of TX/RX buffers */              52 /* maximum number of TX/RX buffers */
 53 #define CS_MAX_BUFFERS_SHIFT            4          53 #define CS_MAX_BUFFERS_SHIFT            4
 54 #define CS_MAX_BUFFERS                  (1 <<      54 #define CS_MAX_BUFFERS                  (1 << CS_MAX_BUFFERS_SHIFT)
 55                                                    55 
 56 /* Parameters for setting up the data buffers      56 /* Parameters for setting up the data buffers */
 57 struct cs_buffer_config {                          57 struct cs_buffer_config {
 58         __u32 rx_bufs;  /* number of RX buffer     58         __u32 rx_bufs;  /* number of RX buffer slots */
 59         __u32 tx_bufs;  /* number of TX buffer     59         __u32 tx_bufs;  /* number of TX buffer slots */
 60         __u32 buf_size; /* bytes */                60         __u32 buf_size; /* bytes */
 61         __u32 flags;    /* see CS_FEAT_* */        61         __u32 flags;    /* see CS_FEAT_* */
 62         __u32 reserved[4];                         62         __u32 reserved[4];
 63 };                                                 63 };
 64                                                    64 
 65 /*                                                 65 /*
 66  * struct for monotonic timestamp taken when t     66  * struct for monotonic timestamp taken when the
 67  * last control command was received               67  * last control command was received
 68  */                                                68  */
 69 struct cs_timestamp {                              69 struct cs_timestamp {
 70         __u32 tv_sec;  /* seconds */               70         __u32 tv_sec;  /* seconds */
 71         __u32 tv_nsec; /* nanoseconds */           71         __u32 tv_nsec; /* nanoseconds */
 72 };                                                 72 };
 73                                                    73 
 74 /*                                                 74 /*
 75  * Struct describing the layout and contents o     75  * Struct describing the layout and contents of the driver mmap area.
 76  * This information is meant as read-only info     76  * This information is meant as read-only information for the application.
 77  */                                                77  */
 78 struct cs_mmap_config_block {                      78 struct cs_mmap_config_block {
 79         __u32 reserved1;                           79         __u32 reserved1;
 80         __u32 buf_size;         /* 0=disabled,     80         __u32 buf_size;         /* 0=disabled, otherwise the transfer size */
 81         __u32 rx_bufs;          /* # of RX buf     81         __u32 rx_bufs;          /* # of RX buffers */
 82         __u32 tx_bufs;          /* # of TX buf     82         __u32 tx_bufs;          /* # of TX buffers */
 83         __u32 reserved2;                           83         __u32 reserved2;
 84         /* array of offsets within the mmap ar     84         /* array of offsets within the mmap area for each RX and TX buffer */
 85         __u32 rx_offsets[CS_MAX_BUFFERS];          85         __u32 rx_offsets[CS_MAX_BUFFERS];
 86         __u32 tx_offsets[CS_MAX_BUFFERS];          86         __u32 tx_offsets[CS_MAX_BUFFERS];
 87         __u32 rx_ptr;                              87         __u32 rx_ptr;
 88         __u32 rx_ptr_boundary;                     88         __u32 rx_ptr_boundary;
 89         __u32 reserved3[2];                        89         __u32 reserved3[2];
 90         /* enabled with CS_FEAT_TSTAMP_RX_CTRL     90         /* enabled with CS_FEAT_TSTAMP_RX_CTRL */
 91         struct cs_timestamp tstamp_rx_ctrl;        91         struct cs_timestamp tstamp_rx_ctrl;
 92 };                                                 92 };
 93                                                    93 
 94 #define CS_IO_MAGIC             'C'                94 #define CS_IO_MAGIC             'C'
 95                                                    95 
 96 #define CS_IOW(num, dtype)      _IOW(CS_IO_MAG     96 #define CS_IOW(num, dtype)      _IOW(CS_IO_MAGIC, num, dtype)
 97 #define CS_IOR(num, dtype)      _IOR(CS_IO_MAG     97 #define CS_IOR(num, dtype)      _IOR(CS_IO_MAGIC, num, dtype)
 98 #define CS_IOWR(num, dtype)     _IOWR(CS_IO_MA     98 #define CS_IOWR(num, dtype)     _IOWR(CS_IO_MAGIC, num, dtype)
 99 #define CS_IO(num)              _IO(CS_IO_MAGI     99 #define CS_IO(num)              _IO(CS_IO_MAGIC, num)
100                                                   100 
101 #define CS_GET_STATE            CS_IOR(21, uns    101 #define CS_GET_STATE            CS_IOR(21, unsigned int)
102 #define CS_SET_WAKELINE         CS_IOW(23, uns    102 #define CS_SET_WAKELINE         CS_IOW(23, unsigned int)
103 #define CS_GET_IF_VERSION       CS_IOR(30, uns    103 #define CS_GET_IF_VERSION       CS_IOR(30, unsigned int)
104 #define CS_CONFIG_BUFS          CS_IOW(31, str    104 #define CS_CONFIG_BUFS          CS_IOW(31, struct cs_buffer_config)
105                                                   105 
106 #endif /* _CS_PROTOCOL_H */                       106 #endif /* _CS_PROTOCOL_H */
107                                                   107 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php