Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2468583lqo; Mon, 20 May 2024 06:59:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhh088iYGlpMhwPgCu1Z2oDrpplH8WvzDyNv/HhHCa1/PJXy83+HnKOiMx0gSI24Ge3qs3ZrA9NrjeUwgjbPTiBaERM1TIv9UMnw/VRw== X-Google-Smtp-Source: AGHT+IFyF/8zPXwc2u1pVW5h2zOSgyUL4jSVgk6Z0iym6Yp46zFA4rCj9ERZ3lg7AcJlyOJvRk8a X-Received: by 2002:a17:902:fc4f:b0:1f2:ff7d:ecf5 with SMTP id d9443c01a7336-1f2ff7df07fmr57806185ad.13.1716213553369; Mon, 20 May 2024 06:59:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716213553; cv=pass; d=google.com; s=arc-20160816; b=OIwfl/ALbH+FmVYH9zjOQZLAqtT88g8DMQ2bTrjr+Z+02ES9AfqRafi/IjhMHO80hc m0Wt4mRE/nC28tklyBZv/lL2kRnBcknqMNrVb+Hd7suhXdcvZlOO+I6hLmj0T7HgAMwi f5AY5+rSltRLS338z3KDblIQW6EusIin0Y6F5zCbJtW5ZPJHLRmLZQSBfC3mYt6xAH/6 mVanmY7SR8Nnc4Q2CzmBCiLrWr91wLCuqAiTKFRc+KzPpytrzOIrrF5OdEGDG6qWvFbA OXbo61tn+tXOwCLVgeAzCdmilFy1WJTa0atcCvXXHZi8X8EXyLeH204W9KhI3t2utB01 DILA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=QRamhVuVMRjdbf0PqzgKHE62r/5JU7p/yeFWq/4P6B8=; fh=MeUap+XhnekNoJiOBi7HX+jm+SNoLgu/gZ3nySX8VeQ=; b=g5M0NSXtjddMhufWzxPbNIkP6u+K2CQ20FYQqrfQXIYviCuowJIe5wAPXxey+Nzhgi +O9ABE7L1SRoLMLdyWWCP4q8TVE4QD3CGCIwL+icIz7oeR7elIAa7nGPkyEzCNydffHj kVbEq+am+ruoU8OryK2EoXEcSlBNYiKJtoDb080yq8K3CXaieUcMCONhOSyMQZpNSJ6i Zgq6sPjZf3Mc6le+NzZFIUPz4JpIrlxp47Ei/VwH91KQJqu9gvuMTHh7WQ6TFqs6IVNQ mGVGgj8U0Ggp7UZoUBh3lwFzTFana1fB+5qheUZ0QGVzy+XHm1tJrRjHDiube8UrAzF0 zDwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I6QBEyaz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-183810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c03727dsi33094715ad.338.2024.05.20.06.59.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 06:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I6QBEyaz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-183810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183810-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BC8C3B2214F for ; Mon, 20 May 2024 13:57:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 675A6136674; Mon, 20 May 2024 13:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="I6QBEyaz" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 112CC135A6B for ; Mon, 20 May 2024 13:57:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716213462; cv=none; b=amPt3PEYMgVPGHpTVyPiuNwPt/J9wYzCgpT8SuDtuVi2oT+zBEuEhqs/KC8iMehRyVV50ltwd6I6I0+8xqgjCFFmEpWVmlG2hoTNcNJQc1pfjUv0MnCOcb7kiGFENuREafysikZlIjPujupF/HQvos2a89DEsRodoPg9A2qRo6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716213462; c=relaxed/simple; bh=hz1NbHsnS8VM83jZDGbfce0Y04Ax0FINz964pXTrpYI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UPf+UnjqS1ya3i/MVDaGTTeyuriwbojxYjvTNMTnhF1nwvFB57tihlDPFNBWXtqoi3jLbPv5J2ZO5vZTsdolRaMYaK0zoGIXOom5ZIfB0gEOUAD/wKuNorI1UGqzTz/h7Wf7FpR3epdygP4aICaA1Q9nke2N0OEEZ8OUVY7hEyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=I6QBEyaz; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a5a2d0d8644so634055766b.1 for ; Mon, 20 May 2024 06:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716213458; x=1716818258; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=QRamhVuVMRjdbf0PqzgKHE62r/5JU7p/yeFWq/4P6B8=; b=I6QBEyaznV5STDV3cEsmZy978mJeVIIREHEybfI+K6Q9MNMQsrNcn6izfUsDtr6RrP kblzMuXYvrpXWLuFrw4qVPXZ/yNg1EInLdKyP8M10gO+HUQorf29wWWNwvCPcvTtTv2Y psgZw9XE1/HQXdL509yw2dULwY6bgF5hiyXmSmdjTY9w6tHjXIcnnH+J3B9Sf/Qe20ET 7xnTEPFzR6Ad/LJehT4AFMhJY7BJzwD0EO/8aZyoVJJegcdrv08UWWiUZM6LXwaox6bu uPi2L/JEGukIA10kmcDJSSFUM20daqXBO5OjYofzjx8Nv+hUWJXtVVP60Xu9TFq3oZsy ybaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716213458; x=1716818258; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QRamhVuVMRjdbf0PqzgKHE62r/5JU7p/yeFWq/4P6B8=; b=n84No2QGtikmicwU41Xm1lt/s+OZwiteeIVt+bMhKku8MUL+We9Hx7vk/yht7/yelU GYFrvJKspRtjCJ3cIGmkVMvN9/YniA75+2nqYEMvypKfUvbpPDdp7jzxkt120V3O5fzw +nmqvtkBaoZkDKsOG+PGd3LjmqkQm934Lelc2Z81MWpSTZSw6R7IUPtSM8JYumQqO0vk oRgqc9e1xoKf45lghc4uyGs/D380z9ClzDPKS4p7KLG+UPbWIWoCqlK+nNAMwIqVpsgc xYQlex7JX3K5TDOdiLKDBBZzu/Y+6WRfFtG5/isMMtO8hxQbhTIMFhuZIhH5iuetBBZx DdNQ== X-Forwarded-Encrypted: i=1; AJvYcCX4InkgaaDvt6zGE9HQEHLevFH/EKX9Eu06gyHgEsziU/XQzqfaU7q5FxyhjdyjGzPhsIhZsJ5aUQvX0wqoBUAggFAUYP6C6jcHEw4N X-Gm-Message-State: AOJu0YxOikX6O6lWcPBGOwjvNi+OGxkcwKeTc3jwCiuupsaLUcxflHCx iu+8ipmLnrlzmkzxfT9hJznI92rlfIzBTcoEdf0+ivEt14wfUWFMgdSTkifhNUg= X-Received: by 2002:a17:906:1d05:b0:a59:c9b1:cb68 with SMTP id a640c23a62f3a-a5a2d55a759mr2047316166b.7.1716213458224; Mon, 20 May 2024 06:57:38 -0700 (PDT) Received: from [192.168.1.20] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7da8sm1469644366b.99.2024.05.20.06.57.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 May 2024 06:57:37 -0700 (PDT) Message-ID: <7b9d66a9-22b4-4fdc-a6a5-dda737a4f932@linaro.org> Date: Mon, 20 May 2024 15:57:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/4] ASoC: qcom: qdsp6: Set channel mapping instead of fixed defaults To: Srinivas Kandagatla , James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Lars-Peter Clausen , =?UTF-8?Q?Nuno_S=C3=A1?= , Banajit Goswami Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240509-asoc-x1e80100-4-channel-mapping-v3-0-6f874552d7b2@linaro.org> <20240509-asoc-x1e80100-4-channel-mapping-v3-3-6f874552d7b2@linaro.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6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mEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/05/2024 17:39, Srinivas Kandagatla wrote: > > > On 09/05/2024 12:43, Krzysztof Kozlowski wrote: >> On 09/05/2024 11:17, Srinivas Kandagatla wrote: >>>> diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h >>>> index eb9306280988..208b74e50445 100644 >>>> --- a/sound/soc/qcom/qdsp6/audioreach.h >>>> +++ b/sound/soc/qcom/qdsp6/audioreach.h >>>> @@ -766,6 +766,7 @@ struct audioreach_module_config { >>>> /* Packet Allocation routines */ >>>> void *audioreach_alloc_apm_cmd_pkt(int pkt_size, uint32_t opcode, uint32_t >>>> token); >>>> +void audioreach_set_channel_mapping(u8 *ch_map, int num_channels); >>>> void *audioreach_alloc_cmd_pkt(int payload_size, uint32_t opcode, >>>> uint32_t token, uint32_t src_port, >>>> uint32_t dest_port); >>>> diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c >>>> index 00bbd291be5c..8ab55869e8a2 100644 >>>> --- a/sound/soc/qcom/qdsp6/q6apm-dai.c >>>> +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c >>>> @@ -243,6 +243,7 @@ static int q6apm_dai_prepare(struct snd_soc_component *component, >>>> cfg.num_channels = runtime->channels; >>>> cfg.bit_width = prtd->bits_per_sample; >>>> cfg.fmt = SND_AUDIOCODEC_PCM; >>>> + audioreach_set_channel_mapping(cfg.channel_map, runtime->channels); >>>> >>> >>> Prepare can be called multiple times.. so we have channels overwritten here. >> >> Which is expected - just like we overwrite number of channels. > This will work in q6apm-dai.c case as there is no set_channel_map callback. > > lgtm. > > Can you rename audioreach_set_channel_mapping to > audioreach_set_default_channel_mapping which makes it more obvious that > we are setting a default channel mappings. Ack. Best regards, Krzysztof