]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas2557sw-android/tas2557-android-driver.git/blob - tas2557-misc.h
add support for multiple pll source for same sample rate
[tas2557sw-android/tas2557-android-driver.git] / tas2557-misc.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 ** File:
14 **     tas2557-misc.h
15 **
16 ** Description:
17 **     header file for tas2557-misc.c
18 **
19 ** =============================================================================
20 */
22 #ifndef _TAS2557_MISC_H
23 #define _TAS2557_MISC_H
25 #define FW_NAME_SIZE                    64
26 #define FW_DESCRIPTION_SIZE             256
27 #define PROGRAM_BUF_SIZE                (5 + FW_NAME_SIZE + FW_DESCRIPTION_SIZE)
28 #define CONFIGURATION_BUF_SIZE  (8 + FW_NAME_SIZE + FW_DESCRIPTION_SIZE)
30 #define TIAUDIO_CMD_REG_WITE                    1
31 #define TIAUDIO_CMD_REG_READ                    2
32 #define TIAUDIO_CMD_DEBUG_ON                    3
33 #define TIAUDIO_CMD_PROGRAM                             4
34 #define TIAUDIO_CMD_CONFIGURATION               5
35 #define TIAUDIO_CMD_FW_TIMESTAMP                6
36 #define TIAUDIO_CMD_CALIBRATION                 7
37 #define TIAUDIO_CMD_SAMPLERATE                  8
38 #define TIAUDIO_CMD_BITRATE                             9
39 #define TIAUDIO_CMD_DACVOLUME                   10
40 #define TIAUDIO_CMD_SPEAKER                             11
41 #define TIAUDIO_CMD_FW_RELOAD                   12
43 #define TAS2557_MAGIC_NUMBER    0x32353537      /* '2557' */
45 #define SMARTPA_SPK_DAC_VOLUME                          _IOWR(TAS2557_MAGIC_NUMBER, 1, unsigned long)
46 #define SMARTPA_SPK_POWER_ON                            _IOWR(TAS2557_MAGIC_NUMBER, 2, unsigned long)
47 #define SMARTPA_SPK_POWER_OFF                           _IOWR(TAS2557_MAGIC_NUMBER, 3, unsigned long)
48 #define SMARTPA_SPK_SWITCH_PROGRAM                      _IOWR(TAS2557_MAGIC_NUMBER, 4, unsigned long)
49 #define SMARTPA_SPK_SWITCH_CONFIGURATION        _IOWR(TAS2557_MAGIC_NUMBER, 5, unsigned long)
50 #define SMARTPA_SPK_SWITCH_CALIBRATION          _IOWR(TAS2557_MAGIC_NUMBER, 6, unsigned long)
51 #define SMARTPA_SPK_SET_SAMPLERATE                      _IOWR(TAS2557_MAGIC_NUMBER, 7, unsigned long)
52 #define SMARTPA_SPK_SET_BITRATE                         _IOWR(TAS2557_MAGIC_NUMBER, 8, unsigned long)
54 int tas2557_register_misc(struct tas2557_priv *pTAS2557);
55 int tas2557_deregister_misc(struct tas2557_priv *pTAS2557);
57 #endif /* _TAS2557_MISC_H */