jpayne@69: /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ jpayne@69: #ifndef __SOUND_HDSP_H jpayne@69: #define __SOUND_HDSP_H jpayne@69: jpayne@69: /* jpayne@69: * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) jpayne@69: * jpayne@69: * This program is free software; you can redistribute it and/or modify jpayne@69: * it under the terms of the GNU General Public License as published by jpayne@69: * the Free Software Foundation; either version 2 of the License, or jpayne@69: * (at your option) any later version. jpayne@69: * jpayne@69: * This program is distributed in the hope that it will be useful, jpayne@69: * but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@69: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@69: * GNU General Public License for more details. jpayne@69: * jpayne@69: * You should have received a copy of the GNU General Public License jpayne@69: * along with this program; if not, write to the Free Software jpayne@69: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. jpayne@69: */ jpayne@69: jpayne@69: #ifdef __linux__ jpayne@69: #include jpayne@69: #endif jpayne@69: jpayne@69: #define HDSP_MATRIX_MIXER_SIZE 2048 jpayne@69: jpayne@69: enum HDSP_IO_Type { jpayne@69: Digiface, jpayne@69: Multiface, jpayne@69: H9652, jpayne@69: H9632, jpayne@69: RPM, jpayne@69: Undefined, jpayne@69: }; jpayne@69: jpayne@69: struct hdsp_peak_rms { jpayne@69: __u32 input_peaks[26]; jpayne@69: __u32 playback_peaks[26]; jpayne@69: __u32 output_peaks[28]; jpayne@69: __u64 input_rms[26]; jpayne@69: __u64 playback_rms[26]; jpayne@69: /* These are only used for H96xx cards */ jpayne@69: __u64 output_rms[26]; jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) jpayne@69: jpayne@69: struct hdsp_config_info { jpayne@69: unsigned char pref_sync_ref; jpayne@69: unsigned char wordclock_sync_check; jpayne@69: unsigned char spdif_sync_check; jpayne@69: unsigned char adatsync_sync_check; jpayne@69: unsigned char adat_sync_check[3]; jpayne@69: unsigned char spdif_in; jpayne@69: unsigned char spdif_out; jpayne@69: unsigned char spdif_professional; jpayne@69: unsigned char spdif_emphasis; jpayne@69: unsigned char spdif_nonaudio; jpayne@69: unsigned int spdif_sample_rate; jpayne@69: unsigned int system_sample_rate; jpayne@69: unsigned int autosync_sample_rate; jpayne@69: unsigned char system_clock_mode; jpayne@69: unsigned char clock_source; jpayne@69: unsigned char autosync_ref; jpayne@69: unsigned char line_out; jpayne@69: unsigned char passthru; jpayne@69: unsigned char da_gain; jpayne@69: unsigned char ad_gain; jpayne@69: unsigned char phone_gain; jpayne@69: unsigned char xlr_breakout_cable; jpayne@69: unsigned char analog_extension_board; jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) jpayne@69: jpayne@69: struct hdsp_firmware { jpayne@69: void *firmware_data; /* 24413 x 4 bytes */ jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) jpayne@69: jpayne@69: struct hdsp_version { jpayne@69: enum HDSP_IO_Type io_type; jpayne@69: unsigned short firmware_rev; jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) jpayne@69: jpayne@69: struct hdsp_mixer { jpayne@69: unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) jpayne@69: jpayne@69: struct hdsp_9632_aeb { jpayne@69: int aebi; jpayne@69: int aebo; jpayne@69: }; jpayne@69: jpayne@69: #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) jpayne@69: jpayne@69: #endif /* __SOUND_HDSP_H */