Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp263398rdb; Thu, 30 Nov 2023 04:24:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGr78duX9uk/zRGlMQGazxR0TDYCfynTtm0VA0jVNeDOrK3s8/KrLJDj3cFv4TOsCQ2N9sA X-Received: by 2002:a17:90b:17c5:b0:285:9f17:2613 with SMTP id me5-20020a17090b17c500b002859f172613mr20980573pjb.27.1701347086749; Thu, 30 Nov 2023 04:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701347086; cv=none; d=google.com; s=arc-20160816; b=Ltf+iWGkRFi7izwlDPRg1L6D9nGybq4jMlBlcYN0o8vsvVs+iQ8hv01x19Mu6DCkye V/A/xF4/E3IhRBeJLvRU6s0N1IFBzn6o/YFSTPdRW47oB0OyUNO9YAVrrZKgfVsiqyy6 kAPKdpXpl6EqPCcD45s8P2FgG/KDIxPAqN4OpW5mT3H70yqvPz6JJJvac7QJtMS+lCVr 30yRCHJN5oguL1ir5IdNp5p0YN8xBgkkBcuv6nNML9Cw5hf1C8XyApxbWtsRbiFil0Wi Oz1vxcmZlfMAqN52BA5qTXWJ1KBdzSvBJkKgviEI7PO4OxgdFKm/K5onOJS9yWt2dED5 RGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=DohD+zPdgRQov8rgbOlj4kgq1RsGhFx7NPzpyVYUFqs=; fh=ANTcVq+kxfa2ykyIDBsFGBknl3eT6B3/aSpbhBCUJ9s=; b=cdtdGptTtjkd3aQ3s1x2cgZode0kD9Aly0BEUEOpa8RnMBtH6S1iCiOq/PSOR/t1WA E0216/XWtC3qRflUr4jGT/ZqBh92fgts2nIuyvQCKybR3ijSschkc/ONMUu0ylPtAxui qIdfG+8zAq3lG0u/Bs2hv4Kq9jofprz+aD2pE6yNU4S9bxHcXFJyfZJN0Iq0PyLiMmGu G0cfLaVYa+YEhfEX+kTYC2kNlvVyIPtYTQMPJRWXH5Ln6zFpj2826u+M+BsJucXVIiOI ab3RQgUw9/KImPQzc5JVXTtXOCBTXFfbS6xcX/sneywMnxt34QPQP1NLXY0E6ztyRQX7 QBJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tjtAgp0Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i5-20020a17090a974500b00285807d0f78si3548424pjw.86.2023.11.30.04.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 04:24:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tjtAgp0Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E48D780C6DDB; Thu, 30 Nov 2023 04:24:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345410AbjK3MY2 (ORCPT + 99 others); Thu, 30 Nov 2023 07:24:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345209AbjK3MY1 (ORCPT ); Thu, 30 Nov 2023 07:24:27 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B5D4D46 for ; Thu, 30 Nov 2023 04:24:33 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-54ba86ae133so871782a12.2 for ; Thu, 30 Nov 2023 04:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701347071; x=1701951871; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DohD+zPdgRQov8rgbOlj4kgq1RsGhFx7NPzpyVYUFqs=; b=tjtAgp0ZOzlOPtcv2qER2WWdXUzKTlMo288ZJRxG+L12yNAM9X/Afe8w2c/Y8I9tTA /SygA4KVGfGX48XV7tN0qaeLbbQuyfkERfsiuDIiZKE5syPBQATMuu2+2Zz6bgsDJ9LG F8Rk7obShzGllW4vBwxmLWIyJayjbMhqGwG7S7FyDoDQluQZOxBAZbQLu0tIyxigf1OT Iua1ADBB+A9tHDqn4hNXtVewvhQ8G0QNbq49+1Zfui76u9AmJbvCRRpzwuz/XtzECwTI A2fJJzb6S4W8P8eFW8HRrTzNCo0C599SMHJDGFvQLUFrPpqX7JSeymsADnaETTSPhtnt 666A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701347071; x=1701951871; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DohD+zPdgRQov8rgbOlj4kgq1RsGhFx7NPzpyVYUFqs=; b=j55DYL3/YA2dO3O4V0goT+mmBwN+XkaBJ0iT5PUib0/3NcSRm+29JTwTZ+/s3RPBu2 Ha2WZ7ck2gGfOmDHEVyiNN+Rcf7CkTmhlWXFuZ3z5Qc8ve7jtipZSoeHF31wuGdOeWFM GH+E2MPxwfeyjfhPUJI4YUDrDrXM5Zs1lZ3qCovAtvXCkbK0Cg0G3ozX/StOBaWni8o7 svuue0WMnjHhBIAnepx8VlCwv0+KFcmz+VUU6Eocj1O+TO+M/rqkT7vXTnFdqqyOB+k5 xmUYSQpjLBDBAgsNJgMgL6pLfn/QeHkP4O4lNVVJjQ/LRYopP5NNQ0/TgK9jLharF/s/ FfoA== X-Gm-Message-State: AOJu0YyD72M6SIRkE41UKGE1DZuLn9slplwj/NmCm+Lm984FAY+zmCo8 gJjPNFTd+Jr1BUlJ+jQc598NHQ== X-Received: by 2002:a17:906:b20a:b0:9e6:4410:2993 with SMTP id p10-20020a170906b20a00b009e644102993mr11763050ejz.18.1701347071507; Thu, 30 Nov 2023 04:24:31 -0800 (PST) Received: from [192.168.1.195] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id e20-20020a1709067e1400b00a17ca6996a2sm620669ejr.178.2023.11.30.04.24.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Nov 2023 04:24:31 -0800 (PST) Message-ID: <0cf0b5f0-165d-401a-a2ec-2fada4fdcebf@linaro.org> Date: Thu, 30 Nov 2023 12:24:30 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ASoC: qcom: audioreach: Add 4 channel support Content-Language: en-US To: Krzysztof Kozlowski , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20231020084919.18628-1-krzysztof.kozlowski@linaro.org> <81b23ae7-bb01-4c23-80df-df171fbc2d08@linaro.org> From: Srinivas Kandagatla In-Reply-To: <81b23ae7-bb01-4c23-80df-df171fbc2d08@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 04:24:43 -0800 (PST) On 30/11/2023 12:17, Krzysztof Kozlowski wrote: > On 23/10/2023 10:42, Srinivas Kandagatla wrote: >> Thanks for the patch, >> >> On 20/10/2023 09:49, Krzysztof Kozlowski wrote: >>> Add support four channel streams. Map channel 3 and 4 to left/right >>> surround ("quad(side)" from ffmpeg standard channel list) to match what >>> is in qdsp6/q6dsp-common.c driver. >>> >>> Signed-off-by: Krzysztof Kozlowski >>> >> >>> --- >>> >>> quad(side): >>> https://trac.ffmpeg.org/wiki/AudioChannelManipulation#Listchannelnamesandstandardchannellayouts >>> --- >>> sound/soc/qcom/qdsp6/audioreach.c | 25 ++++++++++++++++++++++--- >>> 1 file changed, 22 insertions(+), 3 deletions(-) >>> >>> diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c >>> index 5974c7929dd3..4dd2a2e261c9 100644 >>> --- a/sound/soc/qcom/qdsp6/audioreach.c >>> +++ b/sound/soc/qcom/qdsp6/audioreach.c >>> @@ -833,6 +833,11 @@ static int audioreach_mfc_set_media_format(struct q6apm_graph *graph, >>> } else if (num_channels == 2) { >>> media_format->channel_mapping[0] = PCM_CHANNEL_L; >>> media_format->channel_mapping[1] = PCM_CHANNEL_R; >>> + } else if (num_channels == 4) { >>> + media_format->channel_mapping[0] = PCM_CHANNEL_FL; >>> + media_format->channel_mapping[1] = PCM_CHANNEL_FR; >>> + media_format->channel_mapping[2] = PCM_CHANNEL_LS; >>> + media_format->channel_mapping[3] = PCM_CHANNEL_RS; >> >> >> These are fine, but duplicated from q6dsp_map_channels(), Please >> consider using q6dsp_map_channels(). >> >> Also when you do that pl get rid of PCM_CHANNEL_L and PCM_CHANNEL_R >> defines in audioreach.h > > The code is not exactly equivalent, e.g. for one channel L (=1) -> FC > (=3). I assume that's okay for you. > Yep, that is okay for me. --srini > Best regards, > Krzysztof >