From patchwork Fri Aug 8 17:34:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Mazzotta X-Patchwork-Id: 4697311 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BBB26C0338 for ; Fri, 8 Aug 2014 17:35:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE43A201B4 for ; Fri, 8 Aug 2014 17:35:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CD5ED20179 for ; Fri, 8 Aug 2014 17:35:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7299D265576; Fri, 8 Aug 2014 19:35:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0E2A026557A; Fri, 8 Aug 2014 19:35:23 +0200 (CEST) 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 C450426557D; Fri, 8 Aug 2014 19:35:21 +0200 (CEST) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by alsa0.perex.cz (Postfix) with ESMTP id C930A265554 for ; Fri, 8 Aug 2014 19:35:14 +0200 (CEST) Received: by mail-wg0-f47.google.com with SMTP id b13so5879197wgh.18 for ; Fri, 08 Aug 2014 10:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=D/P7eElbyciTAXpfmN1kKvk1eYrO3aUnbfhKderz8XE=; b=oS3xNPay4ECtWUE0x/AyNNdvIHSbkpmf4A0U4ToD5HxyTSsF9TsS+hr8dQ6boliGcw GT2trP9Y3CJ25Idbf9/Vcph9FpjBgYqyeGJOi26jJ4evq3d4p+eekEn8rtiWDJTbVKW6 21lw+Rqg3+8mrK8mxf1mvvjPKvf8mYAdvKrb0R7sEfaHbeYSv/AwCxXopGHSfidYpkRY VoIxMqqatYOrNhs3f3WKNeaz54Azbc40bNwyMEFQNvy78dm/fPBKBlVWGTetbu4POVhK tr60dOgpd2YoxQOQAYcR6mzPh6dp5CXilNp5pXbdxOqbE54EbEa1EAUTiZcP6U65fy4l dY3Q== X-Received: by 10.194.120.129 with SMTP id lc1mr33586478wjb.16.1407519314569; Fri, 08 Aug 2014 10:35:14 -0700 (PDT) Received: from xps13.homenet (2-235-140-64.ip228.fastwebnet.it. [2.235.140.64]) by mx.google.com with ESMTPSA id fb12sm18752936wjc.43.2014.08.08.10.35.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Aug 2014 10:35:13 -0700 (PDT) From: Gabriele Mazzotta To: alsa-devel@alsa-project.org Date: Fri, 8 Aug 2014 19:34:40 +0200 Message-Id: X-Mailer: git-send-email 2.1.0.rc1 In-Reply-To: References: In-Reply-To: References: Cc: tiwai@suse.de, superquad.vortex2@gmail.com, Gabriele Mazzotta Subject: [alsa-devel] [PATCH 1/2] ALSA: hda - Set internal mic as default input source on Dell XPS 13 9333 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 If the laptop is powered on with a jack plugged in, independently on what is plugged, the jack is treated as a microphone jack. Initialize the capture source so that by default jacks are treated as headphones jacks. This will also prevent pop noises on boot in case headphones are plugged in since setting/unsetting mic-in as input source causes a pop noise. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611 Signed-off-by: Gabriele Mazzotta --- sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b60824e..85cd80c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4018,8 +4018,19 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec, { if (action == HDA_FIXUP_ACT_PROBE) { struct alc_spec *spec = codec->spec; + struct hda_input_mux *imux = &spec->gen.input_mux; + int i; + spec->shutup = alc_no_shutup; codec->power_filter = alc_power_filter_xps13; + + /* Make the internal mic the default input source. */ + for (i = 0; i < imux->num_items; i++) { + if (spec->gen.imux_pins[i] == 0x12) { + spec->gen.cur_mux[0] = i; + break; + } + } } }