diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-08 12:10:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-08 12:10:32 -0400 |
commit | 9470195a9cd13e6d90221b8b5d897e9232da8d28 (patch) | |
tree | 12f57a49fe94310396f7108c267560c74189c0e0 /sound/pci/ctxfi/cthardware.h | |
parent | d362af62ed98f58c64a2b3dd58c79d25ad181b0b (diff) |
ALSA: ctxfi - Clean up probe routines
Clean up probe routines and model detection routines so that the driver
won't call and check the PCI subsystem id at each time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/cthardware.h')
-rw-r--r-- | sound/pci/ctxfi/cthardware.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h index 8f11644ddc92..4a8e04f090a4 100644 --- a/sound/pci/ctxfi/cthardware.h +++ b/sound/pci/ctxfi/cthardware.h | |||
@@ -27,6 +27,19 @@ enum CHIPTYP { | |||
27 | ATCNONE | 27 | ATCNONE |
28 | }; | 28 | }; |
29 | 29 | ||
30 | enum CTCARDS { | ||
31 | /* 20k1 models */ | ||
32 | CTSB055X, | ||
33 | CTSB073X, | ||
34 | CTUAA, | ||
35 | CT20K1_UNKNOWN, | ||
36 | /* 20k2 models */ | ||
37 | CTSB0760, | ||
38 | CTHENDRIX, | ||
39 | CTSB0880, | ||
40 | NUM_CTCARDS /* This should always be the last */ | ||
41 | }; | ||
42 | |||
30 | /* Type of input source for ADC */ | 43 | /* Type of input source for ADC */ |
31 | enum ADCSRC{ | 44 | enum ADCSRC{ |
32 | ADC_MICIN, | 45 | ADC_MICIN, |
@@ -48,7 +61,6 @@ struct hw { | |||
48 | int (*card_init)(struct hw *hw, struct card_conf *info); | 61 | int (*card_init)(struct hw *hw, struct card_conf *info); |
49 | int (*card_stop)(struct hw *hw); | 62 | int (*card_stop)(struct hw *hw); |
50 | int (*pll_init)(struct hw *hw, unsigned int rsr); | 63 | int (*pll_init)(struct hw *hw, unsigned int rsr); |
51 | enum CHIPTYP (*get_chip_type)(struct hw *hw); | ||
52 | int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source); | 64 | int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source); |
53 | int (*select_adc_source)(struct hw *hw, enum ADCSRC source); | 65 | int (*select_adc_source)(struct hw *hw, enum ADCSRC source); |
54 | int (*have_digit_io_switch)(struct hw *hw); | 66 | int (*have_digit_io_switch)(struct hw *hw); |
@@ -156,9 +168,13 @@ struct hw { | |||
156 | int irq; | 168 | int irq; |
157 | unsigned long io_base; | 169 | unsigned long io_base; |
158 | unsigned long mem_base; | 170 | unsigned long mem_base; |
171 | |||
172 | enum CHIPTYP chip_type; | ||
173 | enum CTCARDS model; | ||
159 | }; | 174 | }; |
160 | 175 | ||
161 | int create_hw_obj(struct pci_dev *pci, struct hw **rhw); | 176 | int create_hw_obj(struct pci_dev *pci, enum CHIPTYP chip_type, |
177 | enum CTCARDS model, struct hw **rhw); | ||
162 | int destroy_hw_obj(struct hw *hw); | 178 | int destroy_hw_obj(struct hw *hw); |
163 | 179 | ||
164 | unsigned int get_field(unsigned int data, unsigned int field); | 180 | unsigned int get_field(unsigned int data, unsigned int field); |