aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r--sound/pci/oxygen/oxygen.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index a3409edcfb50..f53897a708b4 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" */
@@ -34,6 +38,8 @@
34 /* CAPTURE_3_FROM_I2S_3 not implemented */ 38 /* CAPTURE_3_FROM_I2S_3 not implemented */
35#define MIDI_OUTPUT 0x0800 39#define MIDI_OUTPUT 0x0800
36#define MIDI_INPUT 0x1000 40#define MIDI_INPUT 0x1000
41#define AC97_CD_INPUT 0x2000
42#define AC97_FMIC_SWITCH 0x4000
37 43
38enum { 44enum {
39 CONTROL_SPDIF_PCM, 45 CONTROL_SPDIF_PCM,
@@ -64,6 +70,7 @@ struct snd_pcm_hardware;
64struct snd_pcm_hw_params; 70struct snd_pcm_hw_params;
65struct snd_kcontrol_new; 71struct snd_kcontrol_new;
66struct snd_rawmidi; 72struct snd_rawmidi;
73struct snd_info_buffer;
67struct oxygen; 74struct oxygen;
68 75
69struct oxygen_model { 76struct oxygen_model {
@@ -78,8 +85,6 @@ struct oxygen_model {
78 void (*resume)(struct oxygen *chip); 85 void (*resume)(struct oxygen *chip);
79 void (*pcm_hardware_filter)(unsigned int channel, 86 void (*pcm_hardware_filter)(unsigned int channel,
80 struct snd_pcm_hardware *hardware); 87 struct snd_pcm_hardware *hardware);
81 unsigned int (*get_i2s_mclk)(struct oxygen *chip, unsigned int channel,
82 struct snd_pcm_hw_params *hw_params);
83 void (*set_dac_params)(struct oxygen *chip, 88 void (*set_dac_params)(struct oxygen *chip,
84 struct snd_pcm_hw_params *params); 89 struct snd_pcm_hw_params *params);
85 void (*set_adc_params)(struct oxygen *chip, 90 void (*set_adc_params)(struct oxygen *chip,
@@ -87,19 +92,25 @@ struct oxygen_model {
87 void (*update_dac_volume)(struct oxygen *chip); 92 void (*update_dac_volume)(struct oxygen *chip);
88 void (*update_dac_mute)(struct oxygen *chip); 93 void (*update_dac_mute)(struct oxygen *chip);
89 void (*update_center_lfe_mix)(struct oxygen *chip, bool mixed); 94 void (*update_center_lfe_mix)(struct oxygen *chip, bool mixed);
95 unsigned int (*adjust_dac_routing)(struct oxygen *chip,
96 unsigned int play_routing);
90 void (*gpio_changed)(struct oxygen *chip); 97 void (*gpio_changed)(struct oxygen *chip);
91 void (*uart_input)(struct oxygen *chip); 98 void (*uart_input)(struct oxygen *chip);
92 void (*ac97_switch)(struct oxygen *chip, 99 void (*ac97_switch)(struct oxygen *chip,
93 unsigned int reg, unsigned int mute); 100 unsigned int reg, unsigned int mute);
101 void (*dump_registers)(struct oxygen *chip,
102 struct snd_info_buffer *buffer);
94 const unsigned int *dac_tlv; 103 const unsigned int *dac_tlv;
95 unsigned long private_data;
96 size_t model_data_size; 104 size_t model_data_size;
97 unsigned int device_config; 105 unsigned int device_config;
98 u8 dac_channels; 106 u8 dac_channels_pcm;
107 u8 dac_channels_mixer;
99 u8 dac_volume_min; 108 u8 dac_volume_min;
100 u8 dac_volume_max; 109 u8 dac_volume_max;
101 u8 misc_flags; 110 u8 misc_flags;
102 u8 function_flags; 111 u8 function_flags;
112 u8 dac_mclks;
113 u8 adc_mclks;
103 u16 dac_i2s_format; 114 u16 dac_i2s_format;
104 u16 adc_i2s_format; 115 u16 adc_i2s_format;
105}; 116};
@@ -120,7 +131,6 @@ struct oxygen {
120 u8 pcm_running; 131 u8 pcm_running;
121 u8 dac_routing; 132 u8 dac_routing;
122 u8 spdif_playback_enable; 133 u8 spdif_playback_enable;
123 u8 revision;
124 u8 has_ac97_0; 134 u8 has_ac97_0;
125 u8 has_ac97_1; 135 u8 has_ac97_1;
126 u32 spdif_bits; 136 u32 spdif_bits;
@@ -166,8 +176,6 @@ void oxygen_update_spdif_source(struct oxygen *chip);
166/* oxygen_pcm.c */ 176/* oxygen_pcm.c */
167 177
168int oxygen_pcm_init(struct oxygen *chip); 178int oxygen_pcm_init(struct oxygen *chip);
169unsigned int oxygen_default_i2s_mclk(struct oxygen *chip, unsigned int channel,
170 struct snd_pcm_hw_params *hw_params);
171 179
172/* oxygen_io.c */ 180/* oxygen_io.c */
173 181