From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 29E3EC52D7B for ; Tue, 13 Aug 2024 08:33:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2D9D115FB; Tue, 13 Aug 2024 10:33:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D9D115FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1723538022; bh=o6OmeuKsL9pDus+iBeUhP02BPehZcWu18YM9dAEDlVM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=l+Fv1nBCAm3inNh+45GUicu5VSsfkLeIze1zU7yl5syZgDVM1AGXH9hzsye40tW1e HIPM4vhpJxpl36DrST0dwvvi1efyL4W6maiVNREjAe3KdB6n0yg0caEVMEXZqta2oe /AEFBbO/PZknIbHOd8UOS+8BGOuWFl6AqYXd1CvE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9F4E5F805C8; Tue, 13 Aug 2024 10:33:00 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EA45BF805E6; Tue, 13 Aug 2024 10:32:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CDB7F80423; Tue, 13 Aug 2024 10:28:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 EF410F8016E for ; Tue, 13 Aug 2024 10:23:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF410F8016E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=AqBpj/ls DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723537419; x=1755073419; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=o6OmeuKsL9pDus+iBeUhP02BPehZcWu18YM9dAEDlVM=; b=AqBpj/lsNXD/0BAYoTbrjl3sZvd5L7mGZr2deqp/aMf/wDYpqurI6s3E X+x8RoaHz9WwkZdWSa6vp8ggI6N3XNIUUiG2WZg2TCO1JW8rT6+dgFw2P 0Ra3eDN6pLpoqhpdac52teMQM5DGFMKz6Nbg0biAhaoq11woAD94RqmDa zg69qkw1OFcReY/kX+yuWYrGWqaQG5ckeH+DT80Xhxx3CEMX3rWBpjQB/ LUAvDHc25it+x67kswgoN8QjHVYCDaeeqBrr8gL47Ig0OxSynWokszAgh CAKefRZp0w2Iqda4g16mHStc1avn14SlR6EA+3fcot9f/b+kCH+d+y2Ur Q==; X-CSE-ConnectionGUID: OvILja0ATImYUEao/RKqQA== X-CSE-MsgGUID: Q+sMCDF2TGmJ7xQqgkohpQ== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="21553632" X-IronPort-AV: E=Sophos;i="6.09,285,1716274800"; d="scan'208";a="21553632" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2024 01:23:33 -0700 X-CSE-ConnectionGUID: k4lzmBiNTcWZlLh4mvx9Rw== X-CSE-MsgGUID: qnhV2EIeRqCcopm89Krc4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,285,1716274800"; d="scan'208";a="58520574" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa009.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2024 01:23:30 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1sdmoQ-0000000EeqR-1GSO; Tue, 13 Aug 2024 11:23:26 +0300 Date: Tue, 13 Aug 2024 11:23:26 +0300 From: Andy Shevchenko To: Shenghao Ding Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, pierre-louis.bossart@linux.intel.com, 13564923607@139.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, liam.r.girdwood@intel.com, cameron.berkenpas@gmail.com, tiwai@suse.de, baojun.xu@ti.com, soyer@irl.hu, Baojun.Xu@fpt.com, robinchen@ti.com Subject: Re: [PATCH v2] ALSA: ASoC/tas2781: fix wrong calibrated data order Message-ID: References: <20240813043749.108-1-shenghao-ding@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240813043749.108-1-shenghao-ding@ti.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Message-ID-Hash: AUSDCLY4WFBTO3FIIARUR4AJVN7NJEIJ X-Message-ID-Hash: AUSDCLY4WFBTO3FIIARUR4AJVN7NJEIJ X-MailFrom: andriy.shevchenko@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Aug 13, 2024 at 12:37:48PM +0800, Shenghao Ding wrote: > From: Baojun Xu > > Wrong calibration data order cause sound too low in some device. > Fix wrong calibrated data order, add calibration data converssion > by get_unaligned_be32() after reading from UEFI. ... > rc = tasdevice_dev_bulk_write(tas_priv, i, > TASDEVICE_REG(0, page_array[j], rgno_array[j]), > - &(data[4 * j]), 4); > + (unsigned char *)&data, 4); Casting is not needed if the helper is written in a way how regmap IO accessors done. In any case, 4 is sizeof(data) > + offset += 4; Ditto. -- With Best Regards, Andy Shevchenko