From 1a4301943e89d88fa808f8d2207b7eff2649755c Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Mon, 8 Oct 2012 15:44:13 +0200 Subject: [PATCH] --- yaml --- r: 333711 b: refs/heads/master c: 67aeda1f343fdae8056e3bed37546756e0893bc0 h: refs/heads/master i: 333709: 146934b8f0abbcd7cedc9d4187f4a5846e00bb86 333707: a0d7f3d1834f93be8076f2fc18ce6e3f945f7ed9 333703: 7320a5e56bf7b4c99c7a121b6916e68c99079503 333695: 29fe0661a338fe58436b4edd5fe31a9abe311d02 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_via.c | 47 --------------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/[refs] b/[refs] index dcce90836e60..2004bac1c428 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 613769fcab26a91de52a5d4bd4d116b087e8ac17 +refs/heads/master: 67aeda1f343fdae8056e3bed37546756e0893bc0 diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 5a45a912aedc..430cb33c0e4c 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -299,7 +299,6 @@ static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) #define VIA_JACK_EVENT 0x20 #define VIA_HP_EVENT 0x01 -#define VIA_GPIO_EVENT 0x02 #define VIA_LINE_EVENT 0x03 enum { @@ -1685,50 +1684,6 @@ static void via_hp_automute(struct hda_codec *codec) via_line_automute(codec, present); } -static void via_gpio_control(struct hda_codec *codec) -{ - unsigned int gpio_data; - unsigned int vol_counter; - unsigned int vol; - unsigned int master_vol; - - struct via_spec *spec = codec->spec; - - gpio_data = snd_hda_codec_read(codec, codec->afg, 0, - AC_VERB_GET_GPIO_DATA, 0) & 0x03; - - vol_counter = (snd_hda_codec_read(codec, codec->afg, 0, - 0xF84, 0) & 0x3F0000) >> 16; - - vol = vol_counter & 0x1F; - master_vol = snd_hda_codec_read(codec, 0x1A, 0, - AC_VERB_GET_AMP_GAIN_MUTE, - AC_AMP_GET_INPUT); - - if (gpio_data == 0x02) { - /* unmute line out */ - snd_hda_set_pin_ctl(codec, spec->autocfg.line_out_pins[0], - PIN_OUT); - if (vol_counter & 0x20) { - /* decrease volume */ - if (vol > master_vol) - vol = master_vol; - snd_hda_codec_amp_stereo(codec, 0x1A, HDA_INPUT, - 0, HDA_AMP_VOLMASK, - master_vol-vol); - } else { - /* increase volume */ - snd_hda_codec_amp_stereo(codec, 0x1A, HDA_INPUT, 0, - HDA_AMP_VOLMASK, - ((master_vol+vol) > 0x2A) ? 0x2A : - (master_vol+vol)); - } - } else if (!(gpio_data & 0x02)) { - /* mute line out */ - snd_hda_set_pin_ctl(codec, spec->autocfg.line_out_pins[0], 0); - } -} - /* unsolicited event for jack sensing */ static void via_unsol_event(struct hda_codec *codec, unsigned int res) @@ -1743,8 +1698,6 @@ static void via_unsol_event(struct hda_codec *codec, if (res == VIA_HP_EVENT || res == VIA_LINE_EVENT) via_hp_automute(codec); - else if (res == VIA_GPIO_EVENT) - via_gpio_control(codec); snd_hda_jack_report_sync(codec); }