summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/cthardware.h
diff options
context:
space:
mode:
authorHarry Butterworth <heb1001@gmail.com>2011-06-11 13:41:13 +0400
committerTakashi Iwai <tiwai@suse.de>2011-06-14 09:34:03 +0400
commitb028b81835d7503d68b230446cd5e39d14ff5b9f (patch)
tree62873fdf6c3c8002eed541b1e637554514d1a826 /sound/pci/ctxfi/cthardware.h
parent55309216baeb9d7f951520cf8e8bf2337cd17bad (diff)
downloadlinux-b028b81835d7503d68b230446cd5e39d14ff5b9f.tar.xz
ALSA: ctxfi: Implement a combined capabilities query method to replace multiple have_x query methods.
Signed-off-by: Harry Butterworth <heb1001@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/cthardware.h')
-rw-r--r--sound/pci/ctxfi/cthardware.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h
index de59bbf2702f..908315bec3b4 100644
--- a/sound/pci/ctxfi/cthardware.h
+++ b/sound/pci/ctxfi/cthardware.h
@@ -61,6 +61,13 @@ struct card_conf {
unsigned int msr; /* master sample rate in rsrs */
};
+struct capabilities {
+ unsigned int digit_io_switch:1;
+ unsigned int dedicated_mic:1;
+ unsigned int output_switch:1;
+ unsigned int mic_source_switch:1;
+};
+
struct hw {
int (*card_init)(struct hw *hw, struct card_conf *info);
int (*card_stop)(struct hw *hw);
@@ -71,12 +78,9 @@ struct hw {
#endif
int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source);
int (*select_adc_source)(struct hw *hw, enum ADCSRC source);
- int (*have_digit_io_switch)(struct hw *hw);
- int (*have_dedicated_mic)(struct hw *hw);
- int (*have_output_switch)(struct hw *hw);
+ struct capabilities (*capabilities)(struct hw *hw);
int (*output_switch_get)(struct hw *hw);
int (*output_switch_put)(struct hw *hw, int position);
- int (*have_mic_source_switch)(struct hw *hw);
int (*mic_source_switch_get)(struct hw *hw);
int (*mic_source_switch_put)(struct hw *hw, int position);