]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas2555sw-android/tas2555-android-device-driver-stereo.git/blob - tiload.h
disable the old ALSA function
[tas2555sw-android/tas2555-android-device-driver-stereo.git] / tiload.h
1 /*
2 ** =============================================================================
3 ** Copyright (c) 2016  Texas Instruments Inc.
4 **
5 ** This program is free software; you can redistribute it and/or modify it under
6 ** the terms of the GNU General Public License as published by the Free Software 
7 ** Foundation; version 2.
8 **
9 ** This program is distributed in the hope that it will be useful, but WITHOUT
10 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 **
13 ** You should have received a copy of the GNU General Public License along with
14 ** this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 ** Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 **
17 ** File:
18 **     tiload.h
19 **
20 ** Description:
21 **     header file for tiload.c
22 **
23 ** =============================================================================
24 */
26 #ifndef _TILOAD_H
27 #define _TILOAD_H
29 #include "tas2555.h"
31 #define MAX_LENGTH 128
33 #define BPR_REG(book, page, reg)                (((book * 256 * 128) + \
34                                                  (page * 128)) + reg)
36 /* typedefs required for the included header files */
37 typedef char *string;
39 typedef struct {
40         unsigned char nBook;
41         unsigned char nPage;
42         unsigned char nRegister;
43 } BPR;
45 struct tiload_data {
46         unsigned char mnBook;
47         unsigned char mnPage;
48         unsigned char mnMagicNum;
49         int mnTiload_Opened;
50         char mpRd_data[MAX_LENGTH + 1];
51         char mpWr_data[MAX_LENGTH + 1];
52 } ;
54 /* defines */
55 #define CHL_DEVICE_NAME     "tiload_chl_node"
56 #define CHR_DEVICE_NAME     "tiload_chr_node"
58 #define TILOAD_IOC_MAGIC   0xE0
59 #define TILOAD_IOMAGICNUM_GET                   _IOR(TILOAD_IOC_MAGIC, 1, int)
60 #define TILOAD_IOMAGICNUM_SET                   _IOW(TILOAD_IOC_MAGIC, 2, int)
61 #define TILOAD_BPR_READ                                 _IOR(TILOAD_IOC_MAGIC, 3, BPR)
62 #define TILOAD_BPR_WRITE                                _IOW(TILOAD_IOC_MAGIC, 4, BPR)
63 #define TILOAD_IOCHLNUM_SET                     _IOW(TILOAD_IOC_MAGIC, 5, int)
64 #define TILOAD_IOCTL_SET_CONFIG                 _IOW(TILOAD_IOC_MAGIC, 6, int)
65 #define TILOAD_IOCTL_SET_CALIBRATION    _IOW(TILOAD_IOC_MAGIC, 7, int)
67 int tiload_driver_init(struct tas2555_priv *pTAS2555, unsigned char channel);
69 #endif