Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp422802lqh; Tue, 7 May 2024 03:28:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBoe2HlKYM+ahQ8vI+tIPv0MVUOygUGJ0mIEO/uV4fmIXUPKgTxCujvwOlEl7QbXF6ojQVmxoHewEWl2uh33TYAx2RiYTLYxu6v3txpQ== X-Google-Smtp-Source: AGHT+IGBi5GcYad7YOpuIoAsCGo+CvpUTzYAFfBNulVgaubecNFMVUuM5PpIfwfjUzqkZ2LuPl8A X-Received: by 2002:aca:2116:0:b0:3c9:6c1f:64f8 with SMTP id 22-20020aca2116000000b003c96c1f64f8mr5873660oiz.33.1715077717741; Tue, 07 May 2024 03:28:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715077717; cv=pass; d=google.com; s=arc-20160816; b=Wv5pOo1NhlYcQ/LXfRwXIJJkItmma66AmmvPfcbNEbpzj/aa0Ek7651iAVs3Ytw2jH 2hanKPi/tc0ioKUYtHr1eeRWOaqCrOzdw1gWKnP29g6RTu6519LTMtfTrH62ADfCiqGU 8l9qvszObO+StoX+Ie2zlWZ+Iu0PbMm3qDXiJsXKns21kQQThz6RCKl7kaLTaJHdicyE jL/Oo6tWMgpcuyDULN9YNk49q5zLAOISHYTNb8Kskyv5/3lvb7dFCLyzb/+2H7jURhxN +AEPIAlkqLGnN7senmf/2Ev6zozE+26dAVc275taJuOQH3PiU9vot0pziNyrs05v36Mg GzYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Y3ijywAq87DR82i6I0xJ7qUn776Qu12Oxhv6aBLe9MI=; fh=2XJUhCxF8n0E53wt7SGX647cOqaoLDJ/O48d/+YA8xw=; b=yDrpbhdFmY+QNcSgwULan/aA6rRhg539nPCBq3PjN98JzD6TLF+wL+Q1FDALXDYdfH 4LdwqdcI7AxTzlacA+JDziY/Sn5BAxhdcie/7nnnq19W1dC0ZyWpqQRpDy/6ynpnVaTy 0r5nbc2AlXeWgzAOkAenDI55LXrXD8LsbMGEK5OY9+CBanz1vKV/1KGds3qfBksuF5bK 5K0UXbLfHYz6ot03tW92tY/DzN5OnHB87iuHrRXpTVj6WAXRXyof7dQBRMLAcXl0UB3s FuAlslwjqWs+m+VTVE6idfS8hyK6gm0tKAtv2GVIjzp4B4X0xL+f9Wgq+U4S/XsfXVkx 5ArA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H5NZm8aA; 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-171097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dt6-20020a05620a478600b007929103cb1asi6138716qkb.406.2024.05.07.03.28.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:28:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H5NZm8aA; 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-171097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171097-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 632C11C22F13 for ; Tue, 7 May 2024 10:28:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B5611514D4; Tue, 7 May 2024 10:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H5NZm8aA" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.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 9A89714EC62 for ; Tue, 7 May 2024 10:27:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715077668; cv=none; b=Z31qGb6zR5ZJhCXfiAztVQOKHoyRspczl6lECPc5i94JC7LXBL3qb9cGTT7/kXw/VkKw3P0B9d3pwiDBK1IThTebv7MHbTGSjNBrAVqEse+Lsb5r9jRPEssvNisQfkUfBtc/Z4fmU89UfBv2UhrrcAR1jNPGHjNWOO/fWs0hqI8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715077668; c=relaxed/simple; bh=Yd5y0XTCc1hyaa/GdghPWKfW395tAOrPQ+3gt73tVPA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bAZCJxZBYhM/+lpXU7nGIIZx/6Nmcgm0JxH62B0vc6CyqhnZHuHZkLRCI1zrqBUo/yAQatQm33GHXG5eua9Vix49rf6psIQ7YxU+r5i2CiHe4EBKDxbb3cCMtf7OUdaAEPtr8OG5/ipBfCaeopFoiA/+AiYjYiQ91r8Xz3Zhryk= 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=H5NZm8aA; arc=none smtp.client-ip=209.85.167.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-lf1-f50.google.com with SMTP id 2adb3069b0e04-51f45104ef0so3197855e87.3 for ; Tue, 07 May 2024 03:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715077665; x=1715682465; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Y3ijywAq87DR82i6I0xJ7qUn776Qu12Oxhv6aBLe9MI=; b=H5NZm8aAgQ2/KxVNngi+/11DZBFePm7GJzUFI983/811eQRDZg9tPY59tn4f3HB9Ff VSV95yUUIEmsxVmtregwQSGgg3TElJyKLhV4ixjoJTuM1eaaqv20bQWA9pk3gjbLHxuA Za/EUW9krpQrvach8YIMrhzkKuNfAxqsvfvNq5ecvPNIgmMgp8a9P/DxIjuC6HpuYEs0 oMNckXE0K1Ij5HzT7xJKGXYr7Tuy9mAka1b/ne6FdkkDuOaGDVSWRl5y4JidJlLG+wxx pN8ZyrBvUBSwoloZBaO/tnuSeL/FtvpZrAfUm2YyuDdPkuoBPb2+qYqlyuX0Zmj6JSdo lKtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715077665; x=1715682465; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y3ijywAq87DR82i6I0xJ7qUn776Qu12Oxhv6aBLe9MI=; b=N0mzM0INer3Zc+gUOwVG3MkvR10ULQa1RpsNXzCZPN42T+hiv/mB6E2XwhD2IjBWKC SOyezJhN8D89H2BLZcUHTJCaQPK0PdaFKy1lYvOTtniS6Otw/ZXOyIh7g4nNrFOTo4o8 V7q0azJddWDNB6I3ql3CiNZJml4xHVOjdfEhkszsgrPVbrqJo9b0oq4OPAN5nNNxi3CU 7Rd+/LStrczrzVolIhs6J2OAx160ILy/8is+Xh76BCnoyFERlrmcqqJA0M38GNmy34sD gOaqhnsLWKXmJrMOJVMDPIYV/BjHoa+bytGysy6cjtlZw8NqPcWXK84Yw2NvoSR396wP LbWw== X-Forwarded-Encrypted: i=1; AJvYcCXK5V+cCSLZigSJM3WSd4e5ibrZvuWUjOCchvz6UeS/hvP1ESGUUjnukGhjBw/ukgSSmDqkYFRKm1RwJMVAU6Ws333F+H8fBoY9e8k3 X-Gm-Message-State: AOJu0YxhxiA71YadBWdDswWdcdzB8J4L08WaJZw6b8mSBYB+o7mCwPuU OuYLpXSeXSK/0lujbpji+yW7TH/PdMFT9aWd8fJoKMCp3ZDtb9c/MW8IDPmUous= X-Received: by 2002:ac2:5a07:0:b0:51f:601f:cbae with SMTP id q7-20020ac25a07000000b0051f601fcbaemr6825817lfn.56.1715077664695; Tue, 07 May 2024 03:27:44 -0700 (PDT) Received: from [127.0.1.1] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id bo15-20020a170906d04f00b00a59b87dd0bbsm3370093ejb.161.2024.05.07.03.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:27:44 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 07 May 2024 12:27:30 +0200 Subject: [PATCH 1/4] ASoC: Constify channel mapping array arguments in set_channel_map() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240507-asoc-x1e80100-4-channel-mapping-v1-1-b12c13e0a55d@linaro.org> References: <20240507-asoc-x1e80100-4-channel-mapping-v1-0-b12c13e0a55d@linaro.org> In-Reply-To: <20240507-asoc-x1e80100-4-channel-mapping-v1-0-b12c13e0a55d@linaro.org> To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=10004; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=Yd5y0XTCc1hyaa/GdghPWKfW395tAOrPQ+3gt73tVPA=; b=kA0DAAoBwTdm5oaLg9cByyZiAGY6AhqjPjPYMuBMBQmWEKYRtlETMg2edTTBzYwajHo269E+m YkCMwQAAQoAHRYhBN3SYig9ERsjO264qME3ZuaGi4PXBQJmOgIaAAoJEME3ZuaGi4PXx7YP/ik6 YYkvFP7txSD3qyRPfcYSysD73XwMxoha2BQR2w5rpCwjn0XOzLCmLXUVYYPk38GCJX/WnACOCNV jU9DCCvuUDbX1fAFkzL7ZUY2m5TwP/rl5d0hyQyqGLvqZqjU9H6arlCiqtfJewZlbtCq/q5wkYJ L7d2yYvM9zPsDNircjnKYhQutsNHjCNx+9dHLe80riOCsSW8K7nEM2pCAdBKFsfWlN/1fy5tpCN gT/C5qnY0dx70ATHEkx125PCs92MA/DeJNNO+1A6sgdWZYrgRa7qZL2lsaHKxT2u8JYhgZYmZxK TcL28FDky7lKGZByHWyAZcdZzPCTW3I7M9w7K2Vh/sK4LT8lkOjsPIqES6oG0N3DKzoslWaPWpN PWePIikrRIg17SYRvegSEgTSYRg+KhAlRkD1T5n0tTytuQa5quJ7/YX6h68+F3i5n/DmpnPKqdw G+uYu6qdz7rgsIpU7PNc/+fMISMN5br7AaJBO+LJyv5o+gXhi4AUoc8vYoXMdFhZ/GdKRezfEky +2qyT3Vwn/thTwjaQZz4oo7FWJjxR7zWDHKWGPvPkPfyBsxhnW10JyXMvF18nruH33oFJl9M4fC xTPnEXETfosHV2r7Zh+q27FuaCRw6dSRWeH9aJmuZPRffvTioEYkzjmV5m3oz7G9XaRzdKzghZE qnqJY X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B There is no need for implementations of DAI set_channel_map() to modify contents of passed arrays with actual channel mapping. Additionally, the caller keeps full ownership of the array. Constify these pointer arguments so the code will be safer and easier to read (documenting the caller's ownership). Signed-off-by: Krzysztof Kozlowski --- include/sound/cs35l41.h | 4 ++-- include/sound/soc-dai.h | 8 ++++---- sound/soc/codecs/adau7118.c | 6 ++++-- sound/soc/codecs/cs35l41-lib.c | 4 ++-- sound/soc/codecs/cs35l41.c | 3 ++- sound/soc/codecs/max98504.c | 6 ++++-- sound/soc/codecs/wcd9335.c | 6 ++++-- sound/soc/codecs/wcd934x.c | 6 ++++-- sound/soc/qcom/qdsp6/q6afe-dai.c | 16 ++++++++++------ sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 6 ++++-- sound/soc/soc-dai.c | 4 ++-- 11 files changed, 42 insertions(+), 27 deletions(-) diff --git a/include/sound/cs35l41.h b/include/sound/cs35l41.h index bb70782d15d0..43c6a9ef8d9f 100644 --- a/include/sound/cs35l41.h +++ b/include/sound/cs35l41.h @@ -896,8 +896,8 @@ int cs35l41_test_key_lock(struct device *dev, struct regmap *regmap); int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap); int cs35l41_register_errata_patch(struct device *dev, struct regmap *reg, unsigned int reg_revid); int cs35l41_set_channels(struct device *dev, struct regmap *reg, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot); + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot); int cs35l41_gpio_config(struct regmap *regmap, struct cs35l41_hw_cfg *hw_cfg); void cs35l41_configure_cs_dsp(struct device *dev, struct regmap *reg, struct cs_dsp *dsp); int cs35l41_set_cspl_mbox_cmd(struct device *dev, struct regmap *regmap, diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index adcd8719d343..15ef268c9845 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -188,8 +188,8 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width); int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot); + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot); int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); @@ -305,8 +305,8 @@ struct snd_soc_dai_ops { unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width); int (*set_channel_map)(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot); + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot); int (*get_channel_map)(struct snd_soc_dai *dai, unsigned int *tx_num, unsigned int *tx_slot, unsigned int *rx_num, unsigned int *rx_slot); diff --git a/sound/soc/codecs/adau7118.c b/sound/soc/codecs/adau7118.c index a663d37e5776..abc4764697a5 100644 --- a/sound/soc/codecs/adau7118.c +++ b/sound/soc/codecs/adau7118.c @@ -121,8 +121,10 @@ static const struct snd_soc_dapm_widget adau7118_widgets[] = { }; static int adau7118_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, + const unsigned int *tx_slot, + unsigned int rx_num, + const unsigned int *rx_slot) { struct adau7118_data *st = snd_soc_component_get_drvdata(dai->component); diff --git a/sound/soc/codecs/cs35l41-lib.c b/sound/soc/codecs/cs35l41-lib.c index e9993a39f7d0..1702f26049d3 100644 --- a/sound/soc/codecs/cs35l41-lib.c +++ b/sound/soc/codecs/cs35l41-lib.c @@ -936,8 +936,8 @@ int cs35l41_register_errata_patch(struct device *dev, struct regmap *reg, unsign EXPORT_SYMBOL_GPL(cs35l41_register_errata_patch); int cs35l41_set_channels(struct device *dev, struct regmap *reg, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot) { unsigned int val, mask; int i; diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index cb25c33cc9b9..1688c2c688f0 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -673,7 +673,8 @@ static const struct snd_soc_dapm_route cs35l41_audio_map[] = { }; static int cs35l41_set_channel_map(struct snd_soc_dai *dai, unsigned int tx_n, - unsigned int *tx_slot, unsigned int rx_n, unsigned int *rx_slot) + const unsigned int *tx_slot, + unsigned int rx_n, const unsigned int *rx_slot) { struct cs35l41_private *cs35l41 = snd_soc_component_get_drvdata(dai->component); diff --git a/sound/soc/codecs/max98504.c b/sound/soc/codecs/max98504.c index 93412b966b33..6b6a7ece4cec 100644 --- a/sound/soc/codecs/max98504.c +++ b/sound/soc/codecs/max98504.c @@ -220,8 +220,10 @@ static int max98504_set_tdm_slot(struct snd_soc_dai *dai, return 0; } static int max98504_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, + const unsigned int *tx_slot, + unsigned int rx_num, + const unsigned int *rx_slot) { struct max98504_priv *max98504 = snd_soc_dai_get_drvdata(dai); struct regmap *map = max98504->regmap; diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index deb15b95992d..42a99978fe5a 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1983,8 +1983,10 @@ static int wcd9335_trigger(struct snd_pcm_substream *substream, int cmd, } static int wcd9335_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, + const unsigned int *tx_slot, + unsigned int rx_num, + const unsigned int *rx_slot) { struct wcd9335_codec *wcd; int i; diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index de870c7819ca..fcad2c9fba55 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1923,8 +1923,10 @@ static int wcd934x_trigger(struct snd_pcm_substream *substream, int cmd, } static int wcd934x_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, + const unsigned int *tx_slot, + unsigned int rx_num, + const unsigned int *rx_slot) { struct wcd934x_codec *wcd; int i; diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index a9c4f896a7df..7d9628cda875 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -172,8 +172,8 @@ static int q6tdm_set_tdm_slot(struct snd_soc_dai *dai, } static int q6tdm_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot) { struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); @@ -250,8 +250,10 @@ static int q6tdm_hw_params(struct snd_pcm_substream *substream, } static int q6dma_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_ch_mask, - unsigned int rx_num, unsigned int *rx_ch_mask) + unsigned int tx_num, + const unsigned int *tx_ch_mask, + unsigned int rx_num, + const unsigned int *rx_ch_mask) { struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); @@ -407,8 +409,10 @@ static int q6afe_dai_prepare(struct snd_pcm_substream *substream, } static int q6slim_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, + const unsigned int *tx_slot, + unsigned int rx_num, + const unsigned int *rx_slot) { struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); struct q6afe_port_config *pcfg = &dai_data->port_config[dai->id]; diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index 68a38f63a2db..6bfbb52345e1 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -25,8 +25,10 @@ struct q6apm_lpass_dai_data { }; static int q6dma_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_ch_mask, - unsigned int rx_num, unsigned int *rx_ch_mask) + unsigned int tx_num, + const unsigned int *tx_ch_mask, + unsigned int rx_num, + const unsigned int *rx_ch_mask) { struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index fefe394dce72..03afd5efb24c 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -304,8 +304,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot); * configure the relationship between channel number and TDM slot number. */ int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai, - unsigned int tx_num, unsigned int *tx_slot, - unsigned int rx_num, unsigned int *rx_slot) + unsigned int tx_num, const unsigned int *tx_slot, + unsigned int rx_num, const unsigned int *rx_slot) { int ret = -ENOTSUPP; -- 2.43.0