Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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