aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-04-01 10:02:18 +0200
committerTakashi Iwai <tiwai@suse.de>2008-04-24 12:00:30 +0200
commite97f79994ac715e4c8724b201bd3328463ec9314 (patch)
treea8cc01dc674185458964ee4636fabce8e71d3726 /sound/pci/oxygen/oxygen.c
parent[ALSA] hda-codec - Support mic automute for Clevo M720R/SR (diff)
downloadlinux-dev-e97f79994ac715e4c8724b201bd3328463ec9314.tar.xz
linux-dev-e97f79994ac715e4c8724b201bd3328463ec9314.zip
[ALSA] oxygen: fix line-in recording selection (now for real)
On C-Media cards, the GPIO pin 0 of the CM9780 must be handled exactly like on Xonar cards, so move the Xonar code to the common mixer code. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r--sound/pci/oxygen/oxygen.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 511ef34a43ca..b3b7771b54c0 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -39,7 +39,6 @@
#include <sound/tlv.h>
#include "oxygen.h"
#include "ak4396.h"
-#include "cm9780.h"
#include "wm8785.h"
MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
@@ -79,8 +78,6 @@ MODULE_DEVICE_TABLE(pci, oxygen_ids);
#define GPIO_AK5385_DFS_DOUBLE 0x0001
#define GPIO_AK5385_DFS_QUAD 0x0002
-#define GPIO_LINE_MUTE CM9780_GPO0
-
struct generic_data {
u8 ak4396_ctl2;
};
@@ -145,23 +142,16 @@ static void wm8785_init(struct oxygen *chip)
snd_component_add(chip->card, "WM8785");
}
-static void cmi9780_init(struct oxygen *chip)
-{
- oxygen_ac97_clear_bits(chip, 0, CM9780_GPIO_STATUS, GPIO_LINE_MUTE);
-}
-
static void generic_init(struct oxygen *chip)
{
ak4396_init(chip);
wm8785_init(chip);
- cmi9780_init(chip);
}
static void meridian_init(struct oxygen *chip)
{
ak4396_init(chip);
ak5385_init(chip);
- cmi9780_init(chip);
}
static void generic_cleanup(struct oxygen *chip)
@@ -257,27 +247,6 @@ static void set_ak5385_params(struct oxygen *chip,
value, GPIO_AK5385_DFS_MASK);
}
-static void cmi9780_switch_hook(struct oxygen *chip, unsigned int codec,
- unsigned int reg, int mute)
-{
- if (codec != 0)
- return;
- switch (reg) {
- case AC97_LINE:
- oxygen_write_ac97_masked(chip, 0, CM9780_GPIO_STATUS,
- mute ? GPIO_LINE_MUTE : 0,
- GPIO_LINE_MUTE);
- break;
- case AC97_MIC:
- case AC97_CD:
- case AC97_AUX:
- if (!mute)
- oxygen_ac97_set_bits(chip, 0, CM9780_GPIO_STATUS,
- GPIO_LINE_MUTE);
- break;
- }
-}
-
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
static int ak4396_control_filter(struct snd_kcontrol_new *template)
@@ -301,7 +270,6 @@ static const struct oxygen_model model_generic = {
.set_adc_params = set_wm8785_params,
.update_dac_volume = update_ak4396_volume,
.update_dac_mute = update_ak4396_mute,
- .ac97_switch_hook = cmi9780_switch_hook,
.model_data_size = sizeof(struct generic_data),
.pcm_dev_cfg = PLAYBACK_0_TO_I2S |
PLAYBACK_1_TO_SPDIF |
@@ -327,7 +295,6 @@ static const struct oxygen_model model_meridian = {
.set_adc_params = set_ak5385_params,
.update_dac_volume = update_ak4396_volume,
.update_dac_mute = update_ak4396_mute,
- .ac97_switch_hook = cmi9780_switch_hook,
.model_data_size = sizeof(struct generic_data),
.pcm_dev_cfg = PLAYBACK_0_TO_I2S |
PLAYBACK_1_TO_SPDIF |