Blame include/sound/hdsp.h

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