Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 #ifndef __SOUND_HDSP_H
0003 #define __SOUND_HDSP_H
0004 
0005 /*
0006  *   Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
0007  *    
0008  *   This program is free software; you can redistribute it and/or modify
0009  *   it under the terms of the GNU General Public License as published by
0010  *   the Free Software Foundation; either version 2 of the License, or
0011  *   (at your option) any later version.
0012  *
0013  *   This program is distributed in the hope that it will be useful,
0014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016  *   GNU General Public License for more details.
0017  *
0018  *   You should have received a copy of the GNU General Public License
0019  *   along with this program; if not, write to the Free Software
0020  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0021  */
0022 
0023 #ifdef __linux__
0024 #include <linux/types.h>
0025 #endif
0026 
0027 #define HDSP_MATRIX_MIXER_SIZE 2048
0028 
0029 enum HDSP_IO_Type {
0030     Digiface,
0031     Multiface,
0032     H9652,
0033     H9632,
0034     RPM,
0035     Undefined,
0036 };
0037 
0038 struct hdsp_peak_rms {
0039     __u32 input_peaks[26];
0040     __u32 playback_peaks[26];
0041     __u32 output_peaks[28];
0042     __u64 input_rms[26];
0043     __u64 playback_rms[26];
0044     /* These are only used for H96xx cards */
0045     __u64 output_rms[26];
0046 };
0047 
0048 #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms)
0049 
0050 struct hdsp_config_info {
0051     unsigned char pref_sync_ref;
0052     unsigned char wordclock_sync_check;
0053     unsigned char spdif_sync_check;
0054     unsigned char adatsync_sync_check;
0055     unsigned char adat_sync_check[3];
0056     unsigned char spdif_in;
0057     unsigned char spdif_out;
0058     unsigned char spdif_professional;
0059     unsigned char spdif_emphasis;
0060     unsigned char spdif_nonaudio;
0061     unsigned int spdif_sample_rate;
0062     unsigned int system_sample_rate;
0063     unsigned int autosync_sample_rate;
0064     unsigned char system_clock_mode;
0065     unsigned char clock_source;
0066     unsigned char autosync_ref;
0067     unsigned char line_out;
0068     unsigned char passthru; 
0069     unsigned char da_gain;
0070     unsigned char ad_gain;
0071     unsigned char phone_gain;
0072     unsigned char xlr_breakout_cable;
0073     unsigned char analog_extension_board;
0074 };
0075 
0076 #define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info)
0077 
0078 struct hdsp_firmware {
0079     void *firmware_data;    /* 24413 x 4 bytes */
0080 };
0081 
0082 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware)
0083 
0084 struct hdsp_version {
0085     enum HDSP_IO_Type io_type;
0086     unsigned short firmware_rev;
0087 };
0088 
0089 #define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version)
0090 
0091 struct hdsp_mixer {
0092     unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
0093 };
0094 
0095 #define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer)
0096 
0097 struct hdsp_9632_aeb {
0098     int aebi;
0099     int aebo;
0100 };
0101 
0102 #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb)
0103 
0104 #endif /* __SOUND_HDSP_H */