From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH RFC 6/7] ALSA: hda - Remove superfluous hooks from VIA driver
Date: Thu, 11 Sep 2014 16:19:16 +0200 [thread overview]
Message-ID: <1410445157-23198-7-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1410445157-23198-1-git-send-email-tiwai@suse.de>
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>
---
sound/pci/hda/patch_via.c | 25 ++-----------------------
1 file 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);
}
--
2.1.0
next prev parent reply other threads:[~2014-09-11 14:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 14:19 [PATCH RFC 0/7] Allow multiple callbacks for hda_jack Takashi Iwai
2014-09-11 14:19 ` [PATCH RFC 1/7] ALSA: hda - Get rid of action field from struct hda_jack_tbl Takashi Iwai
2014-09-11 14:19 ` [PATCH RFC 2/7] ALSA: hda - Make snd_hda_jack_tbl_new() static Takashi Iwai
2014-09-11 14:19 ` [PATCH RFC 3/7] ALSA: hda - Make snd_hda_jack_detect_enable_callbac() returning the jack object Takashi Iwai
2014-09-11 14:44 ` David Henningsson
2014-09-15 8:40 ` Takashi Iwai
2014-09-11 14:19 ` [PATCH RFC 4/7] ALSA: hda - Allow multiple callbacks for jack Takashi Iwai
2014-09-11 15:01 ` David Henningsson
2014-09-15 8:41 ` Takashi Iwai
2014-09-11 14:19 ` [PATCH RFC 5/7] ALSA: hda - Remove superfluous callbacks from STAC/IDT codecs Takashi Iwai
2014-09-11 14:19 ` Takashi Iwai [this message]
2014-09-11 14:19 ` [PATCH RFC 7/7] ALSA: hda - Use standard hda_jack infrastructure for CA0132 driver Takashi Iwai
2014-09-11 15:14 ` [PATCH RFC 0/7] Allow multiple callbacks for hda_jack David Henningsson
2014-09-15 8:42 ` Takashi Iwai
2014-09-15 12:11 ` Takashi Iwai
2014-09-16 8:33 ` David Henningsson
2014-09-16 14:36 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410445157-23198-7-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.henningsson@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).