| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __SOUND_HDSP_H | 
|  | 2 | #define __SOUND_HDSP_H | 
|  | 3 |  | 
|  | 4 | /* | 
|  | 5 | *   Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) | 
|  | 6 | * | 
|  | 7 | *   This program is free software; you can redistribute it and/or modify | 
|  | 8 | *   it under the terms of the GNU General Public License as published by | 
|  | 9 | *   the Free Software Foundation; either version 2 of the License, or | 
|  | 10 | *   (at your option) any later version. | 
|  | 11 | * | 
|  | 12 | *   This program is distributed in the hope that it will be useful, | 
|  | 13 | *   but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 14 | *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 15 | *   GNU General Public License for more details. | 
|  | 16 | * | 
|  | 17 | *   You should have received a copy of the GNU General Public License | 
|  | 18 | *   along with this program; if not, write to the Free Software | 
|  | 19 | *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 
|  | 20 | */ | 
|  | 21 |  | 
| Jaswinder Singh Rajput | bb9f113 | 2009-01-30 22:33:29 +0530 | [diff] [blame] | 22 | #include <linux/types.h> | 
|  | 23 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #define HDSP_MATRIX_MIXER_SIZE 2048 | 
|  | 25 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 26 | enum HDSP_IO_Type { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | Digiface, | 
|  | 28 | Multiface, | 
|  | 29 | H9652, | 
|  | 30 | H9632, | 
|  | 31 | Undefined, | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 32 | }; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 34 | struct hdsp_peak_rms { | 
| David Woodhouse | 888855d | 2006-05-04 00:42:42 +0100 | [diff] [blame] | 35 | __u32 input_peaks[26]; | 
|  | 36 | __u32 playback_peaks[26]; | 
|  | 37 | __u32 output_peaks[28]; | 
|  | 38 | __u64 input_rms[26]; | 
|  | 39 | __u64 playback_rms[26]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | /* These are only used for H96xx cards */ | 
| David Woodhouse | 888855d | 2006-05-04 00:42:42 +0100 | [diff] [blame] | 41 | __u64 output_rms[26]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | }; | 
|  | 43 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 44 | #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 46 | struct hdsp_config_info { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | unsigned char pref_sync_ref; | 
|  | 48 | unsigned char wordclock_sync_check; | 
|  | 49 | unsigned char spdif_sync_check; | 
|  | 50 | unsigned char adatsync_sync_check; | 
|  | 51 | unsigned char adat_sync_check[3]; | 
|  | 52 | unsigned char spdif_in; | 
|  | 53 | unsigned char spdif_out; | 
|  | 54 | unsigned char spdif_professional; | 
|  | 55 | unsigned char spdif_emphasis; | 
|  | 56 | unsigned char spdif_nonaudio; | 
|  | 57 | unsigned int spdif_sample_rate; | 
|  | 58 | unsigned int system_sample_rate; | 
|  | 59 | unsigned int autosync_sample_rate; | 
|  | 60 | unsigned char system_clock_mode; | 
|  | 61 | unsigned char clock_source; | 
|  | 62 | unsigned char autosync_ref; | 
|  | 63 | unsigned char line_out; | 
|  | 64 | unsigned char passthru; | 
|  | 65 | unsigned char da_gain; | 
|  | 66 | unsigned char ad_gain; | 
|  | 67 | unsigned char phone_gain; | 
|  | 68 | unsigned char xlr_breakout_cable; | 
|  | 69 | unsigned char analog_extension_board; | 
|  | 70 | }; | 
|  | 71 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 72 | #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 74 | struct hdsp_firmware { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | void __user *firmware_data;	/* 24413 x 4 bytes */ | 
|  | 76 | }; | 
|  | 77 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 78 | #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 80 | struct hdsp_version { | 
|  | 81 | enum HDSP_IO_Type io_type; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | unsigned short firmware_rev; | 
|  | 83 | }; | 
|  | 84 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 85 | #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 87 | struct hdsp_mixer { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 88 | unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; | 
|  | 89 | }; | 
|  | 90 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 91 | #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 93 | struct hdsp_9632_aeb { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | int aebi; | 
|  | 95 | int aebo; | 
|  | 96 | }; | 
|  | 97 |  | 
| Takashi Iwai | 55e957d | 2005-11-17 14:52:13 +0100 | [diff] [blame] | 98 | #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) | 
|  | 99 |  | 
|  | 100 | /* typedefs for compatibility to user-space */ | 
|  | 101 | typedef enum HDSP_IO_Type HDSP_IO_Type; | 
|  | 102 | typedef struct hdsp_peak_rms hdsp_peak_rms_t; | 
|  | 103 | typedef struct hdsp_config_info hdsp_config_info_t; | 
|  | 104 | typedef struct hdsp_firmware hdsp_firmware_t; | 
|  | 105 | typedef struct hdsp_version hdsp_version_t; | 
|  | 106 | typedef struct hdsp_mixer hdsp_mixer_t; | 
|  | 107 | typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 |  | 
|  | 109 | #endif /* __SOUND_HDSP_H */ |