Blame view
include/sound/hdspm.h
3.95 KB
ef5fa1a49
|
1 |
#ifndef __SOUND_HDSPM_H |
763f356cd
|
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#define __SOUND_HDSPM_H /* * Copyright (C) 2003 Winfried Ritsch (IEM) * based on hdsp.h from Thomas Charbonnel (thomas@undata.org) * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ #define HDSPM_MAX_CHANNELS 64 /* -------------------- IOCTL Peak/RMS Meters -------------------- */ |
763f356cd
|
27 28 29 30 31 32 33 34 |
/* peam rms level structure like we get from hardware maybe in future we can memory map it so I just copy it to user on ioctl call now an dont change anything rms are made out of low and high values where (long) ????_rms = (????_rms_l >> 8) + ((????_rms_h & 0xFFFFFF00)<<24) (i asume so from the code) */ |
98274f070
|
35 |
struct hdspm_peak_rms { |
763f356cd
|
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
unsigned int level_offset[1024]; unsigned int input_peak[64]; unsigned int playback_peak[64]; unsigned int output_peak[64]; unsigned int xxx_peak[64]; /* not used */ unsigned int reserved[256]; /* not used */ unsigned int input_rms_l[64]; unsigned int playback_rms_l[64]; unsigned int output_rms_l[64]; unsigned int xxx_rms_l[64]; /* not used */ unsigned int input_rms_h[64]; unsigned int playback_rms_h[64]; unsigned int output_rms_h[64]; unsigned int xxx_rms_h[64]; /* not used */ }; |
98274f070
|
56 57 |
struct hdspm_peak_rms_ioctl { struct hdspm_peak_rms *peak; |
763f356cd
|
58 59 60 |
}; /* use indirect access due to the limit of ioctl bit size */ |
ef5fa1a49
|
61 62 |
#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ _IOR('H', 0x40, struct hdspm_peak_rms_ioctl) |
763f356cd
|
63 64 |
/* ------------ CONFIG block IOCTL ---------------------- */ |
98274f070
|
65 |
struct hdspm_config_info { |
763f356cd
|
66 67 68 69 70 71 72 73 74 75 76 77 |
unsigned char pref_sync_ref; unsigned char wordclock_sync_check; unsigned char madi_sync_check; unsigned int system_sample_rate; unsigned int autosync_sample_rate; unsigned char system_clock_mode; unsigned char clock_source; unsigned char autosync_ref; unsigned char line_out; unsigned int passthru; unsigned int analog_out; }; |
ef5fa1a49
|
78 79 |
#define SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO \ _IOR('H', 0x41, struct hdspm_config_info) |
763f356cd
|
80 81 82 |
/* get Soundcard Version */ |
98274f070
|
83 |
struct hdspm_version { |
763f356cd
|
84 85 |
unsigned short firmware_rev; }; |
98274f070
|
86 |
#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdspm_version) |
763f356cd
|
87 88 89 |
/* ------------- get Matrix Mixer IOCTL --------------- */ |
ef5fa1a49
|
90 91 92 |
/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte = * 32768 Bytes */ |
763f356cd
|
93 94 |
/* organisation is 64 channelfader in a continous memory block */ |
ef5fa1a49
|
95 96 97 |
/* equivalent to hardware definition, maybe for future feature of mmap of * them */ |
763f356cd
|
98 99 100 101 |
/* each of 64 outputs has 64 infader and 64 outfader: Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ #define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS |
98274f070
|
102 |
struct hdspm_channelfader { |
763f356cd
|
103 104 105 |
unsigned int in[HDSPM_MIXER_CHANNELS]; unsigned int pb[HDSPM_MIXER_CHANNELS]; }; |
98274f070
|
106 107 |
struct hdspm_mixer { struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS]; |
763f356cd
|
108 |
}; |
98274f070
|
109 110 |
struct hdspm_mixer_ioctl { struct hdspm_mixer *mixer; |
763f356cd
|
111 112 113 |
}; /* use indirect access due to the limit of ioctl bit size */ |
98274f070
|
114 115 116 117 118 119 120 121 |
#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) /* typedefs for compatibility to user-space */ typedef struct hdspm_peak_rms hdspm_peak_rms_t; typedef struct hdspm_config_info hdspm_config_info_t; typedef struct hdspm_version hdspm_version_t; typedef struct hdspm_channelfader snd_hdspm_channelfader_t; typedef struct hdspm_mixer hdspm_mixer_t; |
763f356cd
|
122 123 |
#endif /* __SOUND_HDSPM_H */ |