Linux Audio

Check our new training course

Embedded Linux training

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