From patchwork Tue Sep 29 10:38:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rick Mann X-Patchwork-Id: 7284861 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 42A91BEEA4 for ; Tue, 29 Sep 2015 10:38:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29E6120619 for ; Tue, 29 Sep 2015 10:38:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BAE5220612 for ; Tue, 29 Sep 2015 10:38:24 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B8A51260633; Tue, 29 Sep 2015 12:38:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, NO_DNS_FOR_FROM,RCVD_IN_DNSWL_LOW,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B3C42260449; Tue, 29 Sep 2015 12:38:14 +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 A67122604E5; Tue, 29 Sep 2015 12:38:10 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by alsa0.perex.cz (Postfix) with ESMTP id AB812260449 for ; Tue, 29 Sep 2015 12:38:04 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E4306205A8 for ; Tue, 29 Sep 2015 06:38:03 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 29 Sep 2015 06:38:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=2YZgMGc//1TqEHFXPmjfLTK3rlE=; b=IH5vB ueq0eQukpWzmhOYQTFOUBQKf/4KBgzz3kAAFiGUuYc+hS4FnYxtxmX0EoZwaprFR i/dHsL9SpqwwQha1uPj7lacxJpgT+sk271fJeDrxLqPQKgNpcYsjSYWEpVLX2Td7 UqiPQeTpWh5JwyKP5nTmM9KShx5LU2p8jHNuwA= X-Sasl-enc: KKyMCE60aqYhHWnGcNaCrU7XV8+IQkugsVuPdb1MF2be 1443523083 Received: from [192.168.15.51] (c-50-168-55-93.hsd1.ca.comcast.net [50.168.55.93]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A893C00022 for ; Tue, 29 Sep 2015 06:38:03 -0400 (EDT) From: Rick Mann Message-Id: Date: Tue, 29 Sep 2015 03:38:02 -0700 To: alsa-devel@alsa-project.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) Subject: [alsa-devel] Found bugs in tlv320aic3x.c driver, how do I report them? 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Hi. I came across some bugs in sound/soc/codecs/tlv320aic3x.c, wherein it writes non-zero values to reserved registers on the tlv320aic3104 (I found it in 4.1.4, but it's still in 4.3-rc3). I have an untested proposed patch. But I don't know anything about how to report it or offer it. What should I do? Thanks. For reference: $ git diff -- sound/soc/codecs/tlv320aic3x.c diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 51c4713..79c0ca0 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1509,14 +1509,24 @@ static int aic3x_init(struct snd_soc_codec *codec) snd_soc_write(codec, PGAL_2_LLOPM_VOL, DEFAULT_VOL); snd_soc_write(codec, PGAR_2_RLOPM_VOL, DEFAULT_VOL); - /* Line2 to HP Bypass default volume, disconnect from Output Mixer */ - snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL); - snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL); - snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL); - snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL); - /* Line2 Line Out default volume, disconnect from Output Mixer */ - snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL); - snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL); + if (aic3x->model == AIC3X_MODEL_3104) { + /* On tlv320aic3014, these registers are reserved and must be written 0 */ + snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, 0); + snd_soc_write(codec, LINE2R_2_HPROUT_VOL, 0); + snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, 0); + snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, 0); + snd_soc_write(codec, LINE2L_2_LLOPM_VOL, 0); + snd_soc_write(codec, LINE2R_2_RLOPM_VOL, 0); + } else { + /* Line2 to HP Bypass default volume, disconnect from Output Mixer */ + snd_soc_write(codec, LINE2L_2_HPLOUT_VOL, DEFAULT_VOL); + snd_soc_write(codec, LINE2R_2_HPROUT_VOL, DEFAULT_VOL); + snd_soc_write(codec, LINE2L_2_HPLCOM_VOL, DEFAULT_VOL); + snd_soc_write(codec, LINE2R_2_HPRCOM_VOL, DEFAULT_VOL); + /* Line2 Line Out default volume, disconnect from Output Mixer */ + snd_soc_write(codec, LINE2L_2_LLOPM_VOL, DEFAULT_VOL); + snd_soc_write(codec, LINE2R_2_RLOPM_VOL, DEFAULT_VOL); + } switch (aic3x->model) { case AIC3X_MODEL_3X: