alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH] ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops
Date: Thu, 27 Feb 2014 16:51:04 +0100	[thread overview]
Message-ID: <1393516264-30257-1-git-send-email-tiwai@suse.de> (raw)

Many HP laptops with STAC codecs have a docking station port and BIOS
sets the pins for the input on the dock as a line in.  Because the
generic parser doesn't handle a line in pin as auto-switchable, this
resulted in the manual capture source selection on these laptops.

However, from the usability POV, the automatic switching is easier.
This patch adds the line_in_auto_switch hint in the fixup function for
these laptops.  Even if no dock port is present, this should be
harmless as the generic parser allows the auto-switching only in a
limited situation (all three pins are located in different
positions).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_sigmatel.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f3784808758e..75515b494034 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2089,6 +2089,9 @@ static void stac92hd83xxx_fixup_hp(struct hda_codec *codec,
 		codec_dbg(codec, "mute LED gpio %d polarity %d\n",
 				spec->gpio_led,
 				spec->gpio_led_polarity);
+
+	/* allow auto-switching of dock line-in */
+	spec->gen.line_in_auto_switch = true;
 }
 
 static void stac92hd83xxx_fixup_hp_zephyr(struct hda_codec *codec,
-- 
1.9.0

                 reply	other threads:[~2014-02-27 15:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1393516264-30257-1-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /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).