aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-11 15:35:22 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-16 17:25:01 +0200
commit7c3008c47b405420bf2b24fb5a21af3df5b5c323 (patch)
treef08dff791e2be3773c07836a4e4a86c44335c6ff /sound/pci/hda/patch_via.c
parentALSA: hda - Remove superfluous callbacks from STAC/IDT codecs (diff)
downloadlinux-dev-7c3008c47b405420bf2b24fb5a21af3df5b5c323.tar.xz
linux-dev-7c3008c47b405420bf2b24fb5a21af3df5b5c323.zip
ALSA: hda - Remove superfluous hooks from VIA driver
Like the previous fix for STAC/IDT codecs, the automute hooks in VIA driver can be also removed by enabling the power control callback for all pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pci/hda/patch_via.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 8d234ab9f06b..6c206b6c8d65 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -118,7 +118,6 @@ static void via_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action);
-static void via_hp_automute(struct hda_codec *codec, struct hda_jack_callback *tbl);
static struct via_spec *via_new_spec(struct hda_codec *codec)
{
@@ -575,20 +574,6 @@ static const struct snd_kcontrol_new vt1708_jack_detect_ctl[] = {
{} /* terminator */
};
-static void via_hp_automute(struct hda_codec *codec,
- struct hda_jack_callback *tbl)
-{
- set_widgets_power_state(codec);
- snd_hda_gen_hp_automute(codec, tbl);
-}
-
-static void via_line_automute(struct hda_codec *codec,
- struct hda_jack_callback *tbl)
-{
- set_widgets_power_state(codec);
- snd_hda_gen_line_automute(codec, tbl);
-}
-
static void via_jack_powerstate_event(struct hda_codec *codec,
struct hda_jack_callback *tbl)
{
@@ -602,22 +587,16 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
hda_nid_t pin;
int i;
- spec->gen.hp_automute_hook = via_hp_automute;
- if (cfg->speaker_pins[0])
- spec->gen.line_automute_hook = via_line_automute;
-
for (i = 0; i < cfg->line_outs; i++) {
pin = cfg->line_out_pins[i];
- if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
- is_jack_detectable(codec, pin))
+ if (pin && is_jack_detectable(codec, pin))
snd_hda_jack_detect_enable_callback(codec, pin,
via_jack_powerstate_event);
}
for (i = 0; i < cfg->num_inputs; i++) {
pin = cfg->line_out_pins[i];
- if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
- is_jack_detectable(codec, pin))
+ if (pin && is_jack_detectable(codec, pin))
snd_hda_jack_detect_enable_callback(codec, pin,
via_jack_powerstate_event);
}