From patchwork Thu Jun 29 11:24:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 698448 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 2E23DEB64D9 for ; Thu, 29 Jun 2023 11:08:55 +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 5FC42845; Thu, 29 Jun 2023 13:08:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5FC42845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688036931; bh=/A8Lb5dnkYmyb2Du9coeD7VO6KZF9NyyKQgEU9BMB1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=O9xl4p1G3eXWfgp734R0otwZhVGNzFsyxL3pRXZbWcOGgkljJiG+SegumP4mTeOWX 4pBxeKlCKuvIbum2ZaLLhisyhylwyDBtKzmCDxk3t/0mbR/swXnOvEYW40KRelGs0o ZICght403Sy+S3JbJSIIk+pFfZ8fpROnb3AdMADA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0BF41F80578; Thu, 29 Jun 2023 13:07:12 +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 7EC25F8056F; Thu, 29 Jun 2023 13:07:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9C81F80551; Thu, 29 Jun 2023 13:07:06 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 C719CF8027B for ; Thu, 29 Jun 2023 13:07:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C719CF8027B 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=M/gnxT/d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688036825; x=1719572825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/A8Lb5dnkYmyb2Du9coeD7VO6KZF9NyyKQgEU9BMB1g=; b=M/gnxT/dd8U8H+P1YncuyGWuTT0VZ0QV3bdK5d0kIAb62+3gOHakwLhD V34DnePbuGpNFEegOTVG/mzBSKYAJm93JwKNQf4lY59KnIKZf3IpG4Lcf v+LfXB77StDPdHSecHx+lltcsFAM1QqkoExdiyc8vDZgSBw4IuJy5bo3z X8CSl5wxV8A8eL6rW20fiM2JgEAfb9ehT5Ar5O+0e9SPFysNlCtfFAibd OQTFu8CbjxeQjnCQf7KGeQtCQ7VwMEP5rK3eVvYbwSEn4IBzrfrHXn/Qt WKbd752BHlTQRk9wS7mjbHrfn2onJReNlWhEmuv7JvhexxJiZcSLZPik2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="365543612" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="365543612" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 04:07:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="1047732705" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="1047732705" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga005.fm.intel.com with ESMTP; 29 Jun 2023 04:06:55 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Cc: tiwai@suse.com, perex@perex.cz, zhuning@everest-semi.com, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH 2/8] ASoC: codecs: es8316: Add support for S24_3LE format Date: Thu, 29 Jun 2023 13:24:43 +0200 Message-Id: <20230629112449.1755928-3-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629112449.1755928-1-cezary.rojewski@intel.com> References: <20230629112449.1755928-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: ZPJ7KZGD2OCYRNA4EVS2WON5WFSSKNHJ X-Message-ID-Hash: ZPJ7KZGD2OCYRNA4EVS2WON5WFSSKNHJ X-MailFrom: cezary.rojewski@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.8 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: Codec supports words that are 16/18/20/24/32 bits long. In case of 24, it should be treated as 24/24 not 24/32 i.e.: 24 valid bit-depth in 24 bit-depth container. For compatibility reasons, S24_LE is left as is. Cc: Zhu Ning Signed-off-by: Cezary Rojewski --- sound/soc/codecs/es8316.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index 5d1fd505d6ba..7e5eb13af428 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -494,6 +494,7 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream, bclk_divider /= 20; break; case SNDRV_PCM_FORMAT_S24_LE: + case SNDRV_PCM_FORMAT_S24_3LE: wordlen = ES8316_SERDATA2_LEN_24; bclk_divider /= 24; break;