From patchwork Wed Feb 19 06:30:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yu Chao X-Patchwork-Id: 3678761 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 02FD7BF13A for ; Wed, 19 Feb 2014 06:30:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3693A20165 for ; Wed, 19 Feb 2014 06:30:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 00D1D20142 for ; Wed, 19 Feb 2014 06:30:54 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E60C5265313; Wed, 19 Feb 2014 07:30:52 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 798F52652D1; Wed, 19 Feb 2014 07:30:48 +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 910CC2652DC; Wed, 19 Feb 2014 07:30:46 +0100 (CET) Received: from mail-pb0-f73.google.com (mail-pb0-f73.google.com [209.85.160.73]) by alsa0.perex.cz (Postfix) with ESMTP id A01E72652C1 for ; Wed, 19 Feb 2014 07:30:39 +0100 (CET) Received: by mail-pb0-f73.google.com with SMTP id rq2so2253065pbb.0 for ; Tue, 18 Feb 2014 22:30:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pj+6n5942UmFVigOVF7ZE+7EtxdMcAJUepKDW8+3/rc=; b=eVGQC2i2dWtWrZPA1GHhFtc194nOJg5lvfwnmg1wz4NebaxILv83436pBU3GdOyfhw ydqULD8c3nEEyRMF/i+fDJFvz/TzODoS3ZgEXdsJ97GEFAscE26QkN1H+jyrMEEgk1QG ydF4d1RnyBEVak6XT7jBLmnB/f63a4YjNgSQ5+XgzGEzEJzXMX6RZ7E66OlrdpJgM8aZ WcuBuHV/Hioj/D1Z9Ezq1M/4JRciXzNhwT61+Zu0/UCPWYTOlIQ9eUvQ7lPakNXjalCT Nu6icCmx9GpbSyEbxpf5WLmkXfOGD9tfXwbb1OCoW0LykyJVwLuV5Uv+1ET1xn6HIrji Fh1Q== X-Gm-Message-State: ALoCoQmU0RqDS46kK57cAM2w70NuNcGfHX1H36LTh+tYMUSso0Etv73iZIcovItH7iQthxXMOknL0e8lKEgHJAaYtN6RzmhBvjPI745WgynBGq6weuxVpcggCCQL21pP5LRfejaJyK6MrYGT5cQ6l+kY5x4HQuDwSUwxRQ1czzv/K08xHeXkok7VpHjwp90PTwkKkrBgB0rdc1CZFUizD1OE1+T3yZUF+9OOpxqwITSs5ZyCFIDxxZA= X-Received: by 10.68.201.7 with SMTP id jw7mr77787pbc.8.1392791438529; Tue, 18 Feb 2014 22:30:38 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id d9si3119896yhl.2.2014.02.18.22.30.38 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Feb 2014 22:30:38 -0800 (PST) Received: from hychao-z620.tpe.corp.google.com (hychao-z620.tpe.corp.google.com [172.30.210.187]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 3730631C314; Tue, 18 Feb 2014 22:30:38 -0800 (PST) Received: by hychao-z620.tpe.corp.google.com (Postfix, from userid 97808) id 60D7D40441; Wed, 19 Feb 2014 14:30:37 +0800 (CST) From: Hsin-Yu Chao To: linux-arm-kernel@lists.infradead.org Date: Wed, 19 Feb 2014 14:30:35 +0800 Message-Id: <1392791435-17170-1-git-send-email-hychao@chromium.org> X-Mailer: git-send-email 1.9.0.rc1.175.g0b1dcb5 In-Reply-To: References: Cc: alsa-devel@alsa-project.org, Ian Minett , Takashi Iwai , Chih-Chung Chang , linux-kernel@vger.kernel.org, Hsin-Yu Chao , Dylan Reid , Xi Wang Subject: [alsa-devel] [PATCH 2/2] ALSA: hda/ca0132 - Fix recording from mode id 0x8 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 Incorrect ADC is picked in ca0132_capture_pcm_prepare(), where it assumes multiple streams while there is one stream per ADC. Note that ca0132_capture_pcm_cleanup() already does the right thing. The Chromebook Pixel has a microphone under the keyboard that is attached to node id 0x8. Before this fix, recording would always go to the main internal mic (node id 0x7). Signed-off-by: Hsin-Yu Chao Reviewed-by: Dylan Reid --- sound/pci/hda/patch_ca0132.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 0aa72ee..46ecdbb 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -2768,9 +2768,7 @@ static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo, unsigned int format, struct snd_pcm_substream *substream) { - struct ca0132_spec *spec = codec->spec; - - snd_hda_codec_setup_stream(codec, spec->adcs[substream->number], + snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format); return 0;