From patchwork Thu Feb 27 15:51:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 3734261 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BED979F2F7 for ; Thu, 27 Feb 2014 15:51:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7DAD2021C for ; Thu, 27 Feb 2014 15:51:25 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DBCA620222 for ; Thu, 27 Feb 2014 15:51:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D3EAB2658AE; Thu, 27 Feb 2014 16:51:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9A4C1261B21; Thu, 27 Feb 2014 16:51:12 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C03C8261B23; Thu, 27 Feb 2014 16:51:11 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B9423261B20 for ; Thu, 27 Feb 2014 16:51:04 +0100 (CET) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 582AE7501A for ; Thu, 27 Feb 2014 15:51:04 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Thu, 27 Feb 2014 16:51:04 +0100 Message-Id: <1393516264-30257-1-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 1.9.0 Subject: [alsa-devel] [PATCH] ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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,