diff options
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r-- | sound/pci/oxygen/oxygen.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index 7d5222caa0a9..c2ae63d17cd2 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
@@ -16,6 +16,10 @@ | |||
16 | #define PCM_AC97 5 | 16 | #define PCM_AC97 5 |
17 | #define PCM_COUNT 6 | 17 | #define PCM_COUNT 6 |
18 | 18 | ||
19 | #define OXYGEN_MCLKS(f_single, f_double, f_quad) ((MCLK_##f_single << 0) | \ | ||
20 | (MCLK_##f_double << 2) | \ | ||
21 | (MCLK_##f_quad << 4)) | ||
22 | |||
19 | #define OXYGEN_IO_SIZE 0x100 | 23 | #define OXYGEN_IO_SIZE 0x100 |
20 | 24 | ||
21 | #define OXYGEN_EEPROM_ID 0x434d /* "CM" */ | 25 | #define OXYGEN_EEPROM_ID 0x434d /* "CM" */ |
@@ -35,6 +39,7 @@ | |||
35 | #define MIDI_OUTPUT 0x0800 | 39 | #define MIDI_OUTPUT 0x0800 |
36 | #define MIDI_INPUT 0x1000 | 40 | #define MIDI_INPUT 0x1000 |
37 | #define AC97_CD_INPUT 0x2000 | 41 | #define AC97_CD_INPUT 0x2000 |
42 | #define AC97_FMIC_SWITCH 0x4000 | ||
38 | 43 | ||
39 | enum { | 44 | enum { |
40 | CONTROL_SPDIF_PCM, | 45 | CONTROL_SPDIF_PCM, |
@@ -65,6 +70,7 @@ struct snd_pcm_hardware; | |||
65 | struct snd_pcm_hw_params; | 70 | struct snd_pcm_hw_params; |
66 | struct snd_kcontrol_new; | 71 | struct snd_kcontrol_new; |
67 | struct snd_rawmidi; | 72 | struct snd_rawmidi; |
73 | struct snd_info_buffer; | ||
68 | struct oxygen; | 74 | struct oxygen; |
69 | 75 | ||
70 | struct oxygen_model { | 76 | struct oxygen_model { |
@@ -79,8 +85,6 @@ struct oxygen_model { | |||
79 | void (*resume)(struct oxygen *chip); | 85 | void (*resume)(struct oxygen *chip); |
80 | void (*pcm_hardware_filter)(unsigned int channel, | 86 | void (*pcm_hardware_filter)(unsigned int channel, |
81 | struct snd_pcm_hardware *hardware); | 87 | struct snd_pcm_hardware *hardware); |
82 | unsigned int (*get_i2s_mclk)(struct oxygen *chip, unsigned int channel, | ||
83 | struct snd_pcm_hw_params *hw_params); | ||
84 | void (*set_dac_params)(struct oxygen *chip, | 88 | void (*set_dac_params)(struct oxygen *chip, |
85 | struct snd_pcm_hw_params *params); | 89 | struct snd_pcm_hw_params *params); |
86 | void (*set_adc_params)(struct oxygen *chip, | 90 | void (*set_adc_params)(struct oxygen *chip, |
@@ -92,15 +96,19 @@ struct oxygen_model { | |||
92 | void (*uart_input)(struct oxygen *chip); | 96 | void (*uart_input)(struct oxygen *chip); |
93 | void (*ac97_switch)(struct oxygen *chip, | 97 | void (*ac97_switch)(struct oxygen *chip, |
94 | unsigned int reg, unsigned int mute); | 98 | unsigned int reg, unsigned int mute); |
99 | void (*dump_registers)(struct oxygen *chip, | ||
100 | struct snd_info_buffer *buffer); | ||
95 | const unsigned int *dac_tlv; | 101 | const unsigned int *dac_tlv; |
96 | unsigned long private_data; | ||
97 | size_t model_data_size; | 102 | size_t model_data_size; |
98 | unsigned int device_config; | 103 | unsigned int device_config; |
99 | u8 dac_channels; | 104 | u8 dac_channels_pcm; |
105 | u8 dac_channels_mixer; | ||
100 | u8 dac_volume_min; | 106 | u8 dac_volume_min; |
101 | u8 dac_volume_max; | 107 | u8 dac_volume_max; |
102 | u8 misc_flags; | 108 | u8 misc_flags; |
103 | u8 function_flags; | 109 | u8 function_flags; |
110 | u8 dac_mclks; | ||
111 | u8 adc_mclks; | ||
104 | u16 dac_i2s_format; | 112 | u16 dac_i2s_format; |
105 | u16 adc_i2s_format; | 113 | u16 adc_i2s_format; |
106 | }; | 114 | }; |
@@ -121,7 +129,6 @@ struct oxygen { | |||
121 | u8 pcm_running; | 129 | u8 pcm_running; |
122 | u8 dac_routing; | 130 | u8 dac_routing; |
123 | u8 spdif_playback_enable; | 131 | u8 spdif_playback_enable; |
124 | u8 revision; | ||
125 | u8 has_ac97_0; | 132 | u8 has_ac97_0; |
126 | u8 has_ac97_1; | 133 | u8 has_ac97_1; |
127 | u32 spdif_bits; | 134 | u32 spdif_bits; |
@@ -167,8 +174,6 @@ void oxygen_update_spdif_source(struct oxygen *chip); | |||
167 | /* oxygen_pcm.c */ | 174 | /* oxygen_pcm.c */ |
168 | 175 | ||
169 | int oxygen_pcm_init(struct oxygen *chip); | 176 | int oxygen_pcm_init(struct oxygen *chip); |
170 | unsigned int oxygen_default_i2s_mclk(struct oxygen *chip, unsigned int channel, | ||
171 | struct snd_pcm_hw_params *hw_params); | ||
172 | 177 | ||
173 | /* oxygen_io.c */ | 178 | /* oxygen_io.c */ |
174 | 179 | ||