From patchwork Wed Feb 12 16:16:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hermann Lauer X-Patchwork-Id: 11378715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BECFE1395 for ; Wed, 12 Feb 2020 16:17:44 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D52120714 for ; Wed, 12 Feb 2020 16:17:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="sBR4i726" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D52120714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iwr.uni-heidelberg.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 705621664; Wed, 12 Feb 2020 17:16:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 705621664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581524262; bh=7jhwAaVDyjThd/YQowilNpwF+0IQXA46wuMsZGPq7uo=; h=Date:From:To:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=sBR4i7266c303MBbEqSADLx8IH2mrikEkBlVnu7l7ABgVLX6y+QdxUjHje4k5XNpS nitVYF3cIvrPrkbBNETkmy37tjBgshcVaIPoiAvUU5ocMkjq/5L5di2+BO9ez7ABbm mflDFmD6ewNIj8P+YLoQwUDikElvLkxKe9ybFRvQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2805F8014F; Wed, 12 Feb 2020 17:16:58 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 833DCF800E7; Wed, 12 Feb 2020 17:16:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.0 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.119.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CF97AF800E7 for ; Wed, 12 Feb 2020 17:16:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF97AF800E7 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2A6DwBMJERe/1BozoFlHQI4BQUOCYFLgidZgRoqhBSPGptkgXABAQEBAQEBAQEILAECBAEBhwskOBMCAwEBCwEBBgEBAQEBBQRthUOGEDBiIQIRBSg0gyeCe6t6gTKJGYEbExCBOAGFHwyGeA+BTD+EYoQWARIBboJDMoIsBJdSmCQHgUl0fIJxgjuQHQwcjniMHao9gWkiZ3EzGiSDO1AYDZxkQzACgQQBAY4ngjIBAQ Received: from lemon.iwr.uni-heidelberg.de ([129.206.104.80]) by relay2.uni-heidelberg.de with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 12 Feb 2020 17:16:46 +0100 Received: from hlauer by lemon.iwr.uni-heidelberg.de with local (Exim 4.92) (envelope-from ) id 1j1ugu-00071a-KT for alsa-devel@alsa-project.org; Wed, 12 Feb 2020 17:16:44 +0100 Date: Wed, 12 Feb 2020 17:16:44 +0100 From: Hermann Lauer To: alsa-devel@alsa-project.org Message-ID: <20200212161644.GF25353@lemon.iwr.uni-heidelberg.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Subject: [alsa-devel] [patch] tas571x: use symbolic register offsets X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" Hello, the appended patch converts the numeric register offsets in tas5711_reg_defaults to the defined constants TAS571X_* Tested with a tas5713 chip for which the driver works, too. Thanks, greetings Hermann # HG changeset patch # Parent 73b0fe67928fff171bb722fc90e3df2f758b14fc diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -424,13 +424,13 @@ }; static const struct reg_default tas5711_reg_defaults[] = { - { 0x04, 0x05 }, - { 0x05, 0x40 }, - { 0x06, 0x00 }, - { 0x07, 0xff }, - { 0x08, 0x30 }, - { 0x09, 0x30 }, - { 0x1b, 0x82 }, + { TAS571X_SDI_REG, 0x05 }, + { TAS571X_SYS_CTRL_2_REG, 0x40 }, + { TAS571X_SOFT_MUTE_REG, 0x00 }, + { TAS571X_MVOL_REG, 0xff }, + { TAS571X_CH1_VOL_REG, 0x30 }, + { TAS571X_CH2_VOL_REG, 0x30 }, + { TAS571X_OSC_TRIM_REG, 0x82 }, }; static const struct regmap_config tas5711_regmap_config = {