From b028b81835d7503d68b230446cd5e39d14ff5b9f Mon Sep 17 00:00:00 2001 From: Harry Butterworth Date: Sat, 11 Jun 2011 17:41:13 +0800 Subject: ALSA: ctxfi: Implement a combined capabilities query method to replace multiple have_x query methods. Signed-off-by: Harry Butterworth Signed-off-by: Takashi Iwai --- sound/pci/ctxfi/ctatc.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'sound/pci/ctxfi/ctatc.c') diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 952fd94c2666..d8a4423539ce 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -18,7 +18,6 @@ #include "ctatc.h" #include "ctpcm.h" #include "ctmixer.h" -#include "cthardware.h" #include "ctsrc.h" #include "ctamixer.h" #include "ctdaio.h" @@ -972,25 +971,11 @@ static int atc_select_mic_in(struct ct_atc *atc) return 0; } -static int atc_have_digit_io_switch(struct ct_atc *atc) +static struct capabilities atc_capabilities(struct ct_atc *atc) { struct hw *hw = atc->hw; - return hw->have_digit_io_switch(hw); -} - -static int atc_have_dedicated_mic(struct ct_atc *atc) -{ - struct hw *hw = atc->hw; - - return hw->have_dedicated_mic(hw); -} - -static int atc_have_output_switch(struct ct_atc *atc) -{ - struct hw *hw = atc->hw; - - return hw->have_output_switch(hw); + return hw->capabilities(hw); } static int atc_output_switch_get(struct ct_atc *atc) @@ -1007,13 +992,6 @@ static int atc_output_switch_put(struct ct_atc *atc, int position) return hw->output_switch_put(hw, position); } -static int atc_have_mic_source_switch(struct ct_atc *atc) -{ - struct hw *hw = atc->hw; - - return hw->have_mic_source_switch(hw); -} - static int atc_mic_source_switch_get(struct ct_atc *atc) { struct hw *hw = atc->hw; @@ -1664,12 +1642,9 @@ static struct ct_atc atc_preset __devinitdata = { .spdif_out_get_status = atc_spdif_out_get_status, .spdif_out_set_status = atc_spdif_out_set_status, .spdif_out_passthru = atc_spdif_out_passthru, - .have_digit_io_switch = atc_have_digit_io_switch, - .have_dedicated_mic = atc_have_dedicated_mic, - .have_output_switch = atc_have_output_switch, + .capabilities = atc_capabilities, .output_switch_get = atc_output_switch_get, .output_switch_put = atc_output_switch_put, - .have_mic_source_switch = atc_have_mic_source_switch, .mic_source_switch_get = atc_mic_source_switch_get, .mic_source_switch_put = atc_mic_source_switch_put, #ifdef CONFIG_PM -- cgit v1.2.1