summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/ctatc.c
diff options
context:
space:
mode:
authorHarry Butterworth <heb1001@gmail.com>2011-06-11 17:41:13 +0800
committerTakashi Iwai <tiwai@suse.de>2011-06-14 07:34:03 +0200
commitb028b81835d7503d68b230446cd5e39d14ff5b9f (patch)
tree62873fdf6c3c8002eed541b1e637554514d1a826 /sound/pci/ctxfi/ctatc.c
parent55309216baeb9d7f951520cf8e8bf2337cd17bad (diff)
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/ctatc.c')
-rw-r--r--sound/pci/ctxfi/ctatc.c31
1 files changed, 3 insertions, 28 deletions
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