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