From patchwork Tue Apr 30 14:02:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GQ6ADU6o; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMPz0PK9z23jG for ; Wed, 1 May 2024 00:04:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GQ6ADU6o; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMPy6X6Qz3cSq for ; Wed, 1 May 2024 00:04:22 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GQ6ADU6o; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::533; helo=mail-ed1-x533.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMN52Jdcz2y3b for ; Wed, 1 May 2024 00:02:44 +1000 (AEST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-571be483ccaso6996345a12.2 for ; Tue, 30 Apr 2024 07:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485759; x=1715090559; darn=lists.ozlabs.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=Sbe9yQYz/BTDyMh+ij8kmCNBJHEOOFsTDuijF7mUMdo=; b=GQ6ADU6o5gI265gUEQ4g2n9Tc9mxCZ7N1l+MI6AJZFRBYTLuMaLOse5wamLA3o8ydR WdWW+EoSEWeELBUn3li8oXvfhN/zGiaDSr59ncyS06fHmHkNY/AUdGmWeXA799ezq1Tc a4PUT42D4fwEic/gSDlYmHTRraSj8GnsJWU2Q1hHiyDnHzbZuiNVECSe8cNTueJccAGJ yEt1B2MwUU1qHGXgd0JgwihxV3/qyTrkELuaomcDV34cDnWlWc0oPk/DbajpdjTPqaOL gb/Q+JuT4JKjmUdCRz45hOt1upW0NPUH4wXXd3hDZtPuUpghTkYtV63BBeWJCdiVwAYo HXgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485759; x=1715090559; 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=Sbe9yQYz/BTDyMh+ij8kmCNBJHEOOFsTDuijF7mUMdo=; b=ab6/5yznu0I2SCFopxEJk6UKLCWHGca6KxyPExyrIJxLXQXZDuC4V5jHtDTsKUUS19 OJUzcN3Yu1lbed3UHukR3vDDP2GyG18s+n+3xfWRP3ZA0Rj/35cKz4M4KzM099Sg4Zog gHEdYciukQPtaASa7YJ/WSnWB7o9zAw5kECaPcXrgia2PFCp0+QmZnljDXFU4NiORIx6 4KoRMWYWdxNb8fSuHhdMSDeGJcXGwtJeOnCuueTxpRIeyWefR3kNgjOi8K/x3AiROqGq c0pltzX8L/dBlAXmioNwdkfHXBCh9wtVtdNdC+MCHCyHY4z3yPLP0yej3p/6LAoXLzT6 miMA== X-Forwarded-Encrypted: i=1; AJvYcCUR6Wz1HkurZcya35VGTSwIpafFkhMTgN+Kcw85MToHHqZ/NCzO8XgZot6VQgovU9ao9eHJUGad6dufolJLJeai2u/S1OGMqxiP6ie7IQ== X-Gm-Message-State: AOJu0Yxu+J/i+JdzLT4a4bUw+zbmIxuPuR2f6wfLQa7Z+veDVP3MEz5m hM3pQtKX0jOyaC6O/AZqlvdIVCVcunXIpIgZ2pNqcJo6cF2xmBr6mM0zJg8HnU0= X-Google-Smtp-Source: AGHT+IHdsI/DUhcbw7hzBVg3qBc+0V12TRFrR9cHpVMwu16bSy1BMgvI9FUIj8Pm8ojhCeGhB8Fiiw== X-Received: by 2002:a17:907:318a:b0:a58:c6b2:7885 with SMTP id xe10-20020a170907318a00b00a58c6b27885mr9202903ejb.5.1714485758809; Tue, 30 Apr 2024 07:02:38 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:38 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:10 +0200 Subject: [PATCH 01/13] ASoC: qcom: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-1-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=16677; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=EYOXzIuCEupt1Jy5CsKHEjSmv9410RCbwX9prH3L2HA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPntVJM7CBtiQZFjdHajiCBztuYxeWNOxPU37 X+UX9z90+WJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD57QAKCRDBN2bmhouD 13TmD/4qXIFaAFDXeCnNH0oAhrw32XJLa2r3bqvZKguGT0+ATfy44c3d51Qq7HrO6cDzUxb5jc2 z2B6V8dKyW4x0faVkGAgaBZLre/d1WUEqqBzctl7BwEZk23qmkKT03pbNXUwmlHeH7YPx+i9sXL 0plZxZ3GX571+WtXFP3jm4GpC9y74ofLinuLh6dt0pozVAyZw2/Z8k/SbHHbQscrUaIoxviLt6y 0dEgjah8Te5XYkztgH6jAqHiIvnT7Lgxt8f2cW6YwfamB4QBXRCM+AAbi1MWSVeVzAEzq9jNpE5 XQEDgjqzWFHzCh7tKy1rIhkLD103PzDQErh7U8a9S54rbhBp9xJehRvwRLLL0IPdXC3LEZKIN/J AjZti7/kUkKyMqV704d95S51YRPIzcuoxttt7UZtJqRLz/uDO2zMh5sK62hnnlIvv/WnJjwgH3K bPgiTNn4xEpBoExU9BHkIHW2INjXwvdV9KKS/+nwijUZ9N2r0EBFvxkIejt/k1f4wDF8zTLehIS Y/2dD7l8r9Npn4xP+5JlitTv3jz00tQkKvBzlwLDYM7f7dG5cvKuUiVmeeYOq4Wn0Ayl0gR/kkj yg0bb+7TOKaiD88drOq1soPfu7t+2MSBBfqOTZeX0H5WzYZ5CfUFXb+VNXvdxjeHMFWiIze3alk lEtGF3oLa91efbA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/qcom/apq8016_sbc.c | 4 ++-- sound/soc/qcom/qdsp6/q6apm-dai.c | 2 +- sound/soc/qcom/sc7180.c | 10 +++++----- sound/soc/qcom/sc7280.c | 12 ++++++------ sound/soc/qcom/sc8280xp.c | 8 ++++---- sound/soc/qcom/sdw.c | 8 ++++---- sound/soc/qcom/sm8250.c | 10 +++++----- sound/soc/qcom/x1e80100.c | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 4834a56eaa88..3023cf180a75 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -192,7 +192,7 @@ static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd) static int msm8916_qdsp6_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct apq8016_sbc_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -213,7 +213,7 @@ static int msm8916_qdsp6_startup(struct snd_pcm_substream *substream) static void msm8916_qdsp6_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct apq8016_sbc_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index df19fc3376b7..db2f82e00a49 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -329,7 +329,7 @@ static int q6apm_dai_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *soc_prtd = substream->private_data; + struct snd_soc_pcm_runtime *soc_prtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(soc_prtd, 0); struct device *dev = component->dev; struct q6apm_dai_data *pdata; diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index 029780d6fe6d..bc030ce29680 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -200,7 +200,7 @@ static int sc7180_startup_realtek_codec(struct snd_soc_pcm_runtime *rtd) static int sc7180_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -234,7 +234,7 @@ static int sc7180_snd_startup(struct snd_pcm_substream *substream) static int sc7180_qdsp_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -307,7 +307,7 @@ static int dmic_set(struct snd_kcontrol *kcontrol, static void sc7180_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -334,7 +334,7 @@ static void sc7180_snd_shutdown(struct snd_pcm_substream *substream) static void sc7180_qdsp_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct sc7180_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -389,7 +389,7 @@ static int sc7180_adau7002_init(struct snd_soc_pcm_runtime *rtd) static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); struct snd_pcm_runtime *runtime = substream->runtime; diff --git a/sound/soc/qcom/sc7280.c b/sound/soc/qcom/sc7280.c index d36f029b7888..207ac5da4dd4 100644 --- a/sound/soc/qcom/sc7280.c +++ b/sound/soc/qcom/sc7280.c @@ -205,7 +205,7 @@ static int sc7280_snd_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sc7280_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); @@ -237,7 +237,7 @@ static int sc7280_snd_hw_params(struct snd_pcm_substream *substream, static int sc7280_snd_swr_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sc7280_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -268,7 +268,7 @@ static int sc7280_snd_swr_prepare(struct snd_pcm_substream *substream) static int sc7280_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); switch (cpu_dai->id) { @@ -287,7 +287,7 @@ static int sc7280_snd_prepare(struct snd_pcm_substream *substream) static int sc7280_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sc7280_snd_data *data = snd_soc_card_get_drvdata(rtd->card); const struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -312,7 +312,7 @@ static int sc7280_snd_hw_free(struct snd_pcm_substream *substream) static void sc7280_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -339,7 +339,7 @@ static int sc7280_snd_startup(struct snd_pcm_substream *substream) { unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS; unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); int ret = 0; diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c index 878bd50ad4a7..06fd47c4178f 100644 --- a/sound/soc/qcom/sc8280xp.c +++ b/sound/soc/qcom/sc8280xp.c @@ -50,7 +50,7 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd) static void sc8280xp_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = pdata->sruntime[cpu_dai->id]; @@ -89,7 +89,7 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); @@ -98,7 +98,7 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream, static int sc8280xp_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -109,7 +109,7 @@ static int sc8280xp_snd_prepare(struct snd_pcm_substream *substream) static int sc8280xp_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c index 7f5089bbe022..eaa8bb016e50 100644 --- a/sound/soc/qcom/sdw.c +++ b/sound/soc/qcom/sdw.c @@ -21,7 +21,7 @@ */ int qcom_snd_sdw_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime; struct snd_soc_dai *codec_dai; @@ -54,7 +54,7 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream, struct sdw_stream_runtime *sruntime, bool *stream_prepared) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); int ret; @@ -105,7 +105,7 @@ int qcom_snd_sdw_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct sdw_stream_runtime **psruntime) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime; @@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(qcom_snd_sdw_hw_params); int qcom_snd_sdw_hw_free(struct snd_pcm_substream *substream, struct sdw_stream_runtime *sruntime, bool *stream_prepared) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); switch (cpu_dai->id) { diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index d70df72c0160..a15dafb99b33 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -50,7 +50,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream) { unsigned int fmt = SND_SOC_DAIFMT_BP_FP; unsigned int codec_dai_fmt = SND_SOC_DAIFMT_BC_FC; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); @@ -72,7 +72,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream) static void sm2450_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -84,7 +84,7 @@ static void sm2450_snd_shutdown(struct snd_pcm_substream *substream) static int sm8250_snd_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); @@ -93,7 +93,7 @@ static int sm8250_snd_hw_params(struct snd_pcm_substream *substream, static int sm8250_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -104,7 +104,7 @@ static int sm8250_snd_prepare(struct snd_pcm_substream *substream) static int sm8250_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c index c3c8bf7ffb5b..0e0773a85809 100644 --- a/sound/soc/qcom/x1e80100.c +++ b/sound/soc/qcom/x1e80100.c @@ -31,7 +31,7 @@ static int x1e80100_snd_init(struct snd_soc_pcm_runtime *rtd) static void x1e80100_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -67,7 +67,7 @@ static int x1e80100_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, static int x1e80100_snd_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); @@ -76,7 +76,7 @@ static int x1e80100_snd_hw_params(struct snd_pcm_substream *substream, static int x1e80100_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; @@ -87,7 +87,7 @@ static int x1e80100_snd_prepare(struct snd_pcm_substream *substream) static int x1e80100_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; From patchwork Tue Apr 30 14:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zilnYj46; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMNQ4Ng6z23jG for ; Wed, 1 May 2024 00:03:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zilnYj46; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMNP5p8Tz3cVg for ; Wed, 1 May 2024 00:03:01 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zilnYj46; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::533; helo=mail-ed1-x533.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMN52r6nz3bwL for ; Wed, 1 May 2024 00:02:44 +1000 (AEST) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-56e477db7fbso9854255a12.3 for ; Tue, 30 Apr 2024 07:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485762; x=1715090562; darn=lists.ozlabs.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=5IV4t0pNrZLc8K3zjbiMUiExRG0rwvdrAQLRnesERno=; b=zilnYj46PT+67C5nq3QK97XJ1uCzOVJx+cVp5R7KrEUMGVtj94w1zoMePk1qmiBjDb x2KNXCVDolW3dqC2I6kyKXMza4l5sZ02lkvQAqqa600cIoaKXTact8Zv7fLXPnS1T8t+ c/sQxAy1p/+Yx74FYH2mfGSXMhTWZYh61JuwSjpiWY9tw6soz10WS9Ds52DjiYeoGypB L2XzeTgFzj3SUSuQ+HonrVeLOholk4n1DnAWFgzGhjql4sfopzpyOe/exHN+/m+TYTHx 7pBkLY/6HEv3bAsyxU9rMCncQrQ9T0o3WZxoXQaFtUeHgdF9AGiEip8oAKRQADiuSP4O J6eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485762; x=1715090562; 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=5IV4t0pNrZLc8K3zjbiMUiExRG0rwvdrAQLRnesERno=; b=so/1wgHKlDXK90PaiaDEGxg4IxLrCvD47n0QSDnBU+Y9P57pmP4sWBKIpgszsIvQqa y7OcpCbfWugCk625JLGgKRz+BAjM7O1OILdKQ3HG6hq36y4+33RFY4RmULuev36m42PW 1RaDsUzCzW8mocx9yUjynu57wy/bBtiZNPa5yQdzEs9Upn/Dz+RJzp6B2E5lc2EikWQx /kc8zcW68UAq0GZHEOblB5F+GBgc+KyiynKlAUAI6wLbY7miPFWWcssvZzr3uyYkst5N icN5bZXhk5P3wVPO2l1KMmjKyPfv7ni4ycR7L+McomfVnyv++ZQfYjr6h9qS2T7gtRHJ ZeBQ== X-Forwarded-Encrypted: i=1; AJvYcCVG6gnIX78Ij8l15j3JWn0hfv2sh5OKlzPKS08ESiCbDg20J+1LZGZX4KvkD98FBxxQWVdDKcFtfaO6VcCtiYhxeHYiASwCLwA4t4REBw== X-Gm-Message-State: AOJu0YwxEgU0BWoRF6MxJHuQZJM4oCYBpQb32g9vvlQgOyAJ2FDBuRrf 1fd9sK11yym+FMP5FO80FvAFkHo9DwcOQpMDdXCIHYdQ8Kll3fCHzdBo56HMxLY= X-Google-Smtp-Source: AGHT+IHiryIlMBuC9NM2KOjVX/FiEZN10FwJJA8ZsqNvWyktK2eDEXsG0W+ylaSuA6HZE7/EUxYrVw== X-Received: by 2002:a17:906:5851:b0:a52:54d8:6d21 with SMTP id h17-20020a170906585100b00a5254d86d21mr10321769ejs.7.1714485761837; Tue, 30 Apr 2024 07:02:41 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:41 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:11 +0200 Subject: [PATCH 02/13] ASoC: tegra: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2412; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=NWayqZgMTQyhrridkNgCIJtQs25nYri5VnM17XYp3Mo=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnuu9RjFk0ZahGK7moh34+XMb8y5IAinmHhw 3VHDPhugCqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD57gAKCRDBN2bmhouD 1zWOD/4+tyzs1xgp6ykzyyJogYehC2MKqc9o7BAwaYhBihjzf+kvS/a49wjR8gzDJ7Vh3y3/hwL aLdHFckj8wwv4l0ss9+e4sAMLoHDo7uUPKc+rfA+yOS8XjuXoRm8FI6LehOSZcU8NK5w+LQWJ3U ceuoYZ1qz1qlNuzBLWh3xpsoRbk5sjR2sakihrnAleKyfoasgq6+XdUIQ0VJqWO3MEUcYPC/eXU h0snq64j4az27aiyUMbwLNSs6H3gn3+qoBo7CHTzJnJ0JDyk11jeRzxeQyznlPWuSUIqCMkCeft uT+ECq9fYZbdwFZIupds9jdP/39elefh2kxAnzlm5ROlK2Z/TDTgDQeaEvraSuji6ucd/CTWMOv VkU3vwo2GtZi3mVhPPnkMo6Nz5ObAvyQbuIY180agGlUo1VC1+m9LeJ98LBIPAdLIkbp6biPcfM 6AHQapXJgPIkZGgszpxcOMdIHIf7X4eaVUkr12gdIijUr7p/VilIGXBzL7mADqRC3+Pzk5Q590A 8MyHOr4aKOGAWSWyPRn1clfTUJnmOg92ZBgTm7yfpzUeQRED96dVL+70aCGXXlCP1V+EwhgZecx m2VLP4rPyvCJT3suEVLW0aKsOrnHxRm5mvO2RcJ5U/k/EfE5uCaHFZFgyQE+iEqtAyQa0sQ1Vex ffzIPP9MiKJu/1A== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/tegra/tegra_asoc_machine.c | 2 +- sound/soc/tegra/tegra_pcm.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 192e9692bdf2..775ce433fdbf 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -290,7 +290,7 @@ static unsigned int tegra_machine_mclk_rate_6mhz(unsigned int srate) static int tegra_machine_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); struct snd_soc_card *card = rtd->card; struct tegra_machine *machine = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 42acb56543db..4bdbcd2635ef 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -76,7 +76,7 @@ EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister); int tegra_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dmap; struct dma_chan *chan; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); @@ -127,7 +127,7 @@ EXPORT_SYMBOL_GPL(tegra_pcm_open); int tegra_pcm_close(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); if (rtd->dai_link->no_pcm) return 0; @@ -142,7 +142,7 @@ int tegra_pcm_hw_params(struct snd_soc_component *component, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dmap; struct dma_slave_config slave_config; struct dma_chan *chan; From patchwork Tue Apr 30 14:02:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FUJj31z/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMQv0WKmz1ydT for ; Wed, 1 May 2024 00:05:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FUJj31z/; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMQt6R22z3cPN for ; Wed, 1 May 2024 00:05:10 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FUJj31z/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::62d; helo=mail-ej1-x62d.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMN86zbMz2y3b for ; Wed, 1 May 2024 00:02:48 +1000 (AEST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a58f1f36427so377262566b.3 for ; Tue, 30 Apr 2024 07:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485764; x=1715090564; darn=lists.ozlabs.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=5Lk1lue097q/WOSyrBvWDsG60XQkpuZqlzoh3fFX8H4=; b=FUJj31z/KOSpGLpUEo37nRMQZNev8q+M62ZXyaDU7rAe7mpYNa4BY4/vFVqYv24x54 qlOgrCghyz7blUEC3jrXeK0YRqXyn7+Gfke7E1Uw/5eE7lF/MTln+TfrUZ/4DqvihBYs U3kbP4DWRurTrhA6HkJGvEveKaPcjLwoPyPa8ldwsudaaAFp8g6WHhyWuJiwZYZ2vN04 uL4iDn6R7mrmmuSFfcE5EhCZ8nMnA6VmeZFeQD/k8bwmsef6LIrNaM7+hL6FAfCvAgua TIzR8BAw6WGAZdI+PlCcKK3lykD9rfIfJ6laoKg1mE9fWKJF+Z9nzmxxOCKavZfTAAH2 xRkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485764; x=1715090564; 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=5Lk1lue097q/WOSyrBvWDsG60XQkpuZqlzoh3fFX8H4=; b=kX8HATfQCnQLUrl1bLtT6SYi/YIOn8LE/cwSeTtO70BHvfHegcjMtGQrVZI23uSqWl 6ft+HVR2+AVH8mPCVN7sbpackZY/x1ziwVN7i3LvgbzuDt59hYZKb6Lx1gIll9AnyNPK z+bmHgLqGsJKKm6OLfaVCx8M3N8yB7epKuuRL9Z0vAfN5N8d833puQRwafFUgL1eZPli bq1yNTzOi/twN4Xnq/BtKfezzAJxoxOr60w9qfkTs+/I2ptZqPbbiFVe4jl8Q5x/S669 5GZqffrQOlPnozMUujKIQ704TMFRpFnc3YM6IOyyUW6syJDFJMXw5c7PoA+kVLJQ6V3M Setg== X-Forwarded-Encrypted: i=1; AJvYcCVS21Knd60BzzQV0/tFHWZgZ/fj1YYxCGHR9YhTcbink3vLLmes3fJVU2QPVp84hIcHrfbcDqy5VJMjOWCQe3E4Nv60XEzHU10A81ic0A== X-Gm-Message-State: AOJu0Yw5mSR+BWUHFbLqjOEhdOEI24EwA0Ho+GzQatlUk9iE2fE+pAI6 pr6bfaHmUcdGgfpKdkPo391eZEWzKLYu18+qpWLImNeduUzi2VaQneLIfPIC2og= X-Google-Smtp-Source: AGHT+IEe6L8iR4uGhiIxTqGIW4asn+4q9EAd3lfdb1piiCjrm73a/9Wg4NOc67T8NvbSyWss22Ri9g== X-Received: by 2002:a17:906:ff42:b0:a55:b345:63ec with SMTP id zo2-20020a170906ff4200b00a55b34563ecmr2134852ejb.15.1714485764472; Tue, 30 Apr 2024 07:02:44 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:43 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:12 +0200 Subject: [PATCH 03/13] ASoC: ti: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-3-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=704; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=WaTWh6A8XvKFs+19MMAHdgA+abbpsyoPq1iDSypgs+0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnvj78Se5sQ1IGtmZPj3Apt3l8lrraNbdATP 5UZknZzzu2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD57wAKCRDBN2bmhouD 1/rKEACNiDDDmi+VKdGySua5uR69g1WVV9N9njkaGa6BQYvqocDTXh2A5T950fbqbmHniXfNShS JZsCqqwu5KxhFaDGF7+cJT9d8h+f+7+N7XdkXJiLCDqED/vhEdXSK+RJxvjyb2UGCtkF2vXvq3I qq11t/wIu9DJwANQ/5NqaRpQUsdJGIYQrngiCXGTVr86HT4kWz6cB50Fq2Rc1Nwer1MNbFgNXPD EjdcTuqvqRJxRoo0qJQ1uv5PK8ANQ1WI38IhHUgC9cSPyb8BjmRNwBk/6M8bqGZXxd2GI3h0DzD 8V7Ep+O/4i5WkC/o/RdS0k/Jvzkfl794WdVSrh5ko0yoTWBfgLKB0pDzT5Td5wsGDLH4nLzQX/V 5FUZJy3lvXFB5nrv9g3mS+E8KOagd4bqA8hkkVqkp5amB7IyjqR87us8YZTtD99ZhtHJ8VBMkd+ fbJwxHjx4G4Tlbdh0zvD3QybwWSvS6+wPWtlX37WjHLAiWt8YIsZU7wDGSPZJGubhB71ork6bJk ATYI7HLcuqJT/iIWO4n1K+oIgsMbXTSo/c+WM1q9Tc22MWyviROO784jazEoZ1HWS2txtvOqMzf OBzZt/XtPghj+yRRLI6/+9SDQsMxuhH//frbs22BShcGa8gdvXz3dj2VkoB0xwDtpQ8OPZ7XHdl o8rt6UoEwW2rmsw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/ti/omap-hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index 4513b527ab97..639bc83f4263 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -40,7 +40,7 @@ struct hdmi_audio_data { static struct hdmi_audio_data *card_drvdata_substream(struct snd_pcm_substream *ss) { - struct snd_soc_pcm_runtime *rtd = ss->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss); return snd_soc_card_get_drvdata(rtd->card); } From patchwork Tue Apr 30 14:02:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=G+AoN2rr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMRq4jJWz1ydT for ; Wed, 1 May 2024 00:05:59 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=G+AoN2rr; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMRq1RtHz3d9L for ; Wed, 1 May 2024 00:05:59 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=G+AoN2rr; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::62a; helo=mail-ej1-x62a.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNB5lcmz3cSM for ; Wed, 1 May 2024 00:02:50 +1000 (AEST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a58e2740cd7so563076766b.1 for ; Tue, 30 Apr 2024 07:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485767; x=1715090567; darn=lists.ozlabs.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=sVmB3IwNsO++LEmxsGA1Of52OGeiLTZOoIEqlaO4Y6U=; b=G+AoN2rrNCTUcEQbGkJH9+d5ikCHNObOEqOqzwJhUrXOvrdxVqtHDO+Utjgn4hGtYe zLOrli86YFQ7HROvlYWkVkoq65baCcTmhVIV5toPtjvqlGjAePRLGJ1fEKr6sbFtUef+ b+scHNeltyLRNfGEDdsL1LkoGSGF7Qyzy63ZFqC/SR9flMn/jqu/Qc6ZJPH6qRQThL+j pjApCvAilSKD9I5QbzO0AZG1OiNfFoH0hFoTMQTfj13MkKl4JyhP2wWQc/ky5vfdzMYu 90zXcod+p0kEat1M6/pXLj2gPpKNlcgAKx0F/8nY+cwvvZehiLG0s0yj4HdHu9x7TmKs 7e1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485767; x=1715090567; 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=sVmB3IwNsO++LEmxsGA1Of52OGeiLTZOoIEqlaO4Y6U=; b=glhw/3mpAiCZ+rmVJB5h9hOHbZZMAhXu/QXBFUlY0CtZWYRzPwd8r+kxcotZbrQcC3 7YuO1vG1PKXRK0vsQkYNh4yB13vFiYJLQoCjDdxyYrUk9Y99vNLE1tHoFyJFHmIsRV46 KaqTlqvgjs+5BF9TUlSLYj49J7NRN9CtyRzinXhJRSG9LKyqq2zjXdzxEpSzfyUW06TU QowYvWdTUGRyFEF1+Yoyi/bRjK0G9svQRSX3dfO7UjXcfvbaqh247AqPsV+DwebeBDoP 7RwWC+ICP6JM8w4kh+Kvqi39P7MbmRBWd3yOoZsJlYfqjrCPzxEbZHlG3ptI2t9kGsOA V4oA== X-Forwarded-Encrypted: i=1; AJvYcCXJ1CwVankVZjOXsfZ35se/d9IgJLBGiSYGkPUSvl1GizGiLpIJ2kArvERv4GJ2L95DEA3DWxZfJz5TOXbub2JrnD2xFgWVpAY8AifNag== X-Gm-Message-State: AOJu0YysZHGROaNr3uO0C1njTXx9+rYsvhS3/LoKFOgC7G+rhKddS4co yBTtztIcFO4D5RQQdvPzhHmQifeevwbeZDBADRd91MM2eCsgjmqkF7PZZbrtzMg= X-Google-Smtp-Source: AGHT+IFp03X1JFPDrIujOHhWiOUjRy/996U+B0l6yK76tZHW13kgA6dvKPQweqrNY0l31/l3LaTzjw== X-Received: by 2002:a17:906:3ac3:b0:a58:ebdd:8aa4 with SMTP id z3-20020a1709063ac300b00a58ebdd8aa4mr2360562ejd.20.1714485766998; Tue, 30 Apr 2024 07:02:46 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:46 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:13 +0200 Subject: [PATCH 04/13] ASoC: arm: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-4-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1205; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=eDseprbctVXAhiZOvRsQsRjQ1srjlolDCUwu7Poiuqc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnwqTKqjOWhyghuqcWCQALMCLVh7T8zMCEGN dvM+Z0GdNKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD58AAKCRDBN2bmhouD 18RiD/4qLIFwqpuprQ1tMuUxq4zKnCWe3121KK341e3C6K9aJyN/BTLnFTKGCeHCS8O34sFL66W T7sO0tVkpzvEVFOfhdAxTxVSNxk8b8r6nlylo9rzqkM9QzU1SQsGJxog0QKojxAO0I6sntjpOI1 C4eLl6KKsV1j1hvxU76kJP6e32eMeIdiZaAxMmQsQSK0v013+TK6DZ0Pzoka7GW21s3JFCovROF vXxmHvtZZeMHmbCCg5y/XZBWunSMfsNrjjgO+mIu7XV7gkK7P9MQYjLZJqqQZ+vhoD2Qg9UAnk7 OQE9DLavtk9A5wwayHHudVq/E4K3OsGqYV+1R5o5G1+IXBsr5pk5VcYEwd60z1VKxXXSO/b83Yc ENbgYWPE1yLUGcTgo4uG5za0uVWxDFi/b7wDRbmmROHuH09+9ryGv2cvKPGHQDn8f6u5L/cH8NS Ks+CcsLhi9wVjDnpMDTWNA/8OLpqgOgk1oqEI3Ef0cIjYKbQDoqPj8qg/30LXXJWsi3ixd/UGXX LNNqCHmIDRExk6Qjid/ky+fQP2yP3ITflnWYCAlkkGB6jsfhk/qkiIbv4uytjIVSSs+x9OJUdPk 73ZmPvgfk/AnUFwJpDnK2XdUlBKSk6Z3H5g0na7JWMYATpXKrxMAJjcyW1bMqbdfGqkv8gNWzrz mSfEosfDuUmcoLg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/arm/pxa2xx-pcm-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 51d2ff80df16..571e9d909cdf 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c @@ -33,7 +33,7 @@ int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dma_params; struct dma_slave_config config; int ret; @@ -79,7 +79,7 @@ EXPORT_SYMBOL(pxa2xx_pcm_prepare); int pxa2xx_pcm_open(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_dmaengine_dai_dma_data *dma_params; int ret; From patchwork Tue Apr 30 14:02:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929580 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ESoaPv5I; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMSc2KRQz1ydT for ; Wed, 1 May 2024 00:06:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ESoaPv5I; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMSc17Sqz3vdl for ; Wed, 1 May 2024 00:06:40 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ESoaPv5I; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::62e; helo=mail-ej1-x62e.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNJ5Gz2z3cVd for ; Wed, 1 May 2024 00:02:56 +1000 (AEST) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a5557e3ebcaso939127966b.1 for ; Tue, 30 Apr 2024 07:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485773; x=1715090573; darn=lists.ozlabs.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=9KNDmF6F3m74+nDreAw5/fBepQ+vGW6wvqeA9DbjkOo=; b=ESoaPv5I/MR14AEwC1x21vD6tmUkUL4thFXElcNtw5j3/xYo6GbhQSwi9bu5uet8sK 04asDLJlBtSfiiFYS7gQnSuDLs9NkhOfgbnn5nLLMbVbWp64TicgR9hUx5iR42tND0j/ SliN9y0p/5XMuqqWZ1xwTtVpNXc+6KO/z1vUGKXPMlkomBmuYqxa6Imrt7viuc3FDGlu 4cPMQJ/wnlFcFaEpyMnuEo5UDnEq5bvSaVgp1qwLZwW2bwLF12sPgQuN82Hs5qHpHnaX /pUIpBxnrhUi8tsLqR4QnMSr8vOcuwtG1aBEgfyVS5d/kdnAYOmMOBQPim7cueUP2FMZ GZGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485773; x=1715090573; 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=9KNDmF6F3m74+nDreAw5/fBepQ+vGW6wvqeA9DbjkOo=; b=GYvxCbZ3nRZEuRohXK2ccHzv2yG66w4jNSFgTbSUO9RCHdJW4O6uU4Spwgt46emFDl qDT4UmFqnf/XgI/Cs+ljTbofm8bO1Jt53UCQHcm66i17gILrXdWQSWPz2HG1Xh0mxMDJ GlSGogfJzEAYRL+Mp9i+o1vyMlxIzUuR8bPe9xBfm1rEClNXg2FGaEcioZv1WCXRlAXC q56Oyca3tSPT88XJRzGU+07kTIlATSQFkTzCVZjRipCt7w7MVAKIUgt88SElSu4Y9dOY hCNmpTbzzxGFzs2hZGRAf4B3zFnFWmQkPSh2XPLtbncCRvx9DIuw89EGTDTE9WhUxqrn CdTA== X-Forwarded-Encrypted: i=1; AJvYcCXWdcNlxr2J8u1DbIzQb+pv06NGT9ahnmheRhUIyiWHH33/HNUrmX3KHlOzxe7YtSU3vm85FX6daBk2xU0CyNN1ucWX+a3Zp6xNrLEw1w== X-Gm-Message-State: AOJu0YxvACYnCredKAPS84Bgw8XMC2GadgRSUa7crJtVMDsYE6UfDCPT xsmV7XHSUdLhIWC6vHGO8zaFA4J2/hvuIHHn6UeMXB8qMj38WMB45FQhCU61MZs= X-Google-Smtp-Source: AGHT+IG/ZiponzJElmGagl83BnX3KT4uxCge8Ge47biNA19yQUZRpq529TvSC+CjU+ZaC4bHHg0f4A== X-Received: by 2002:a17:907:7892:b0:a51:abd8:8621 with SMTP id ku18-20020a170907789200b00a51abd88621mr2756333ejc.19.1714485772679; Tue, 30 Apr 2024 07:02:52 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:52 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:14 +0200 Subject: [PATCH 05/13] ASoC: amd: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-5-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2245; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=/1R0OmMKMV4s3Y8w3vGDBextL0ongiiaeIRyC36ykHM=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnxeEAVYc1UmVefhlabtyjgdGe38YIR/9kHe 88Pd0erXViJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD58QAKCRDBN2bmhouD 13M+D/4v2IeMte5vzz35J+GSwt7AUvJI6iiLCBM0Feu/9wQWRBj36O7yPQreb40lyCMtfUWWmb8 PShQ3rPb8K6XWqMorWGoy5zD+sdIlhb3aWdBInfWwoMeTWxADZZqB+m8/PW3NnAEd9TqRNPKDzQ jWO60UiF8okwGVwjHAgprvGmhVSjbNI5b5g/PnV4ttO98aUjFne8AK3/v4C1DcS3awukX5VnTy1 o1tZft+T6oiNutSPknPNyp2e5UMWDq8hNQzw3jdk4AaoJE9hpFvcrsQPZ+VnqOYZgBEvVVxzBvP F2I2uZ0c0mauf6GMEdHrqzLHGBc1gp99UZ8uAQssnSLSezJhM1SeIt5OCFiN9uy9UuvLStU2nks AQ2HWvKuN0XC7sRtuOgRTf8M30UUcO1Dm1iNeyQ3t4JdCEiXZ/ZQnG0+G8T2RN2gTcHBw76uZtA wt6P3w7TbxrYOWmPYbdW3DPPI4BMRNgYcPkq2qUpO3Ni0yaF5U/tH7Zprko1lynY03aPlkdyyeH p0Fg98AeEb7XYDd0cAJPC/j2leODUWvm/g8HvufxNzL7j78grTfc59M1lb9ogOQp9e2K1UDEAvB Efq5+HYBjP++8fA9Gwf5msphLx/h/eRifC+99A5yPh9l9gtluGNv38A8cEcrlAMPbo/N0GbTHXH R12gBWVNQAkbTwQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/amd/acp/acp-mach-common.c | 2 +- sound/soc/amd/acp3x-rt5682-max9836.c | 2 +- sound/soc/amd/ps/ps-sdw-dma.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index 665a6ea0a2a8..a36300a4ed8a 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -217,7 +217,7 @@ static void acp_card_shutdown(struct snd_pcm_substream *substream) static int acp_card_rt5682_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct acp_card_drvdata *drvdata = card->drvdata; struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index d6cdb6d9fdd6..357dfd016baf 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -143,7 +143,7 @@ static int rt5682_clk_enable(struct snd_pcm_substream *substream) static int acp3x_1015_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; int srate, i, ret; diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index 66b800962f8c..2f630753278d 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -218,7 +218,7 @@ static int acp63_sdw_dma_open(struct snd_soc_component *component, struct acp_sdw_dma_stream *stream; struct snd_soc_dai *cpu_dai; struct amd_sdw_manager *amd_manager; - struct snd_soc_pcm_runtime *prtd = substream->private_data; + struct snd_soc_pcm_runtime *prtd = snd_soc_substream_to_rtd(substream); int ret; runtime = substream->runtime; From patchwork Tue Apr 30 14:02:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=x8RlHSi6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMTP26Mtz1ydT for ; Wed, 1 May 2024 00:07:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=x8RlHSi6; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMTP0t9wz3d9v for ; Wed, 1 May 2024 00:07:21 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=x8RlHSi6; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::236; helo=mail-lj1-x236.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNP6FrVz3cTM for ; Wed, 1 May 2024 00:03:01 +1000 (AEST) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2def8e58471so90654761fa.0 for ; Tue, 30 Apr 2024 07:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485778; x=1715090578; darn=lists.ozlabs.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=YNgLEZpy94T5of5dDiteuT7S3SOS839FWPGD9Oz3+lU=; b=x8RlHSi6qaYprunejxEJWTP2xrol+lNMuhvMkTifiqdi7HCMeS07KIzQfRYE3WVsTZ SD/I++OgKFtThOYQGysb20/U9da/2KGTe+1+wnhQiR5e1kvfk024RFL0C9fl4mvcb1Yj G6UWuPEWMIsRedeFElvS+qaD3aV1H10x16J/EHKu5KXhGvM+clt//3rdn1w2jzTOQIiU h4oAN8YygFGfYPTlsaCRSO6JR7Z7GXAVFE3IdWMClm2dcoIb82T9BgfWSm43sVRPxjn5 TJF4lOY2KA2wyoJMcuKp50EZUmxETchGJv8sNyX6R+RrBKIVbVRNRiqMC/7aSrmE7W68 fOig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485778; x=1715090578; 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=YNgLEZpy94T5of5dDiteuT7S3SOS839FWPGD9Oz3+lU=; b=ZQ6UfqFcpi8naU1FtaqV4NcZyoa+36PG8F6q9bYHIlEjd/lGkDt+iwYWaE8jRned7H gDV6e3DiO9KC834WkNij3rsVwgaupkdgyZ3ByTJpaPDpaEmKmDeedGmnrnl7Std3/Pfe 9h+yPAXR8HAIJjALWZKGzbrwiEMSaeefIeuDJKEIWeike3LC+aIXRovtETq+LGSZbfOa SNdqEFcAg0gstPStqnhaVzfkqyCHTqW2DDFRCsrgB+Je9/bdZ53PMfFUMBbnDSTChUyI QYX9w8DxARG59f1QZlZpd0zM6qN7AgSaCUXd9Aq8CaRBSSG+TivAKKoCzbuCKaEdS1mX brtw== X-Forwarded-Encrypted: i=1; AJvYcCUKVAq3T+MMjSvGecjWP6D0bn0OmMiAoVq2m4fn8E9d7ogvOcbVY2STpapyTkDMJbQC5623GB3VuLKYO+3IReK19+u5shHovf8+ZXIq5A== X-Gm-Message-State: AOJu0YzOY50Fwinf3U/i3sGpNXHmq8Gj2rafd7wpibMD0lh+EnxsDL8O geplyc7l13gj3YThyOh7Uu+HNrP/JSC7L68oz7F678w9GxKIIPtBZVlvUNMWHfA= X-Google-Smtp-Source: AGHT+IFjpnpTp49C7eNXISEFR7RNPga2jXB5JGxKI22M+Sgkavx0dXEQC64nAv94ubWY9cbPtavVlQ== X-Received: by 2002:a2e:9d88:0:b0:2dd:da86:ee38 with SMTP id c8-20020a2e9d88000000b002ddda86ee38mr10711122ljj.8.1714485777680; Tue, 30 Apr 2024 07:02:57 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:02:57 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:15 +0200 Subject: [PATCH 06/13] ASoC: fsl: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-6-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5066; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=ucjMMVrCkGueEU7NLLh2sAE4bDhfGS2t9ibvgfiZuqk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnyVTX4VSForeLiGua7AKa1bycRXXidVTl9D CaOooFdBBqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD58gAKCRDBN2bmhouD 1x+nD/9L3QfdqNvflH7gpARtP03tnjdskVjY9BZshvK55BYu/8uL8qeQ8m7grVZgtdnFSp17jzg psAIaY2iZ3XjkhL1Wm9i2Bco6fY+REaa9ipQVksNn10h2zoFp4l3tKiNz9T6HIW+tr9LB4YJ0ez 95oxVwwR3mmgoGnOTgoBhBquIQotbSGxNdua1owIxI4ynwBEDk9aSuLzFvyZaK+a5pQqlk8sFHE 1Zk4N9BanSfRWtR7ZmuLxcDMQFw+f9cLlfnQjEF7qbDegbSaNYOR4VuwuAPVTQgmhL2FDZ9ZZBZ VS8nH1w1VupmUXyDCQM9+Ord+ux+JRHtepLks0LWYAmaEYSn0maBsInTR79T6/Z5BTnHY5o05cb 17XjcuRdjm0E9YceHUg/H7Cu+qPpavOo45i3peulA/Kw8Bmz/UrCoPzgKCZECARmZhBwtFfXKFi BFBqwmlfaJ5mO+BUYtGOK0mi8QL8IJGpqneIw6WuwxG8gcximwl6XUtbhpG9dUMulPUId44Q4Lx 6MRqlOL82xSEpJjTLh5Q1IVtCafvXHdADF0e5NcyPGZeB3xciZX49dPUqRv/agS7rPISpGBqP+3 2uMcyxscGa3WWW9aQmkwpKw3L4QuI/OgOw5ddiu+DS7516wv6HU8Om/sxKJq6Fm9j1OTCD6HkT0 JghFY64qvYvldfw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/fsl/fsl-asoc-card.c | 2 +- sound/soc/fsl/imx-card.c | 6 +++--- sound/soc/fsl/imx-hdmi.c | 2 +- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index f6d2564864c6..5ddc0c2fe53f 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -242,7 +242,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct codec_priv *codec_priv = &priv->codec_priv; struct device *dev = rtd->card->dev; diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index cb8723965f2f..0e18ccabe28c 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -252,7 +252,7 @@ static unsigned long akcodec_get_mclk_rate(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, int slots, int slot_width) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct imx_card_data *data = snd_soc_card_get_drvdata(rtd->card); const struct imx_card_plat_data *plat_data = data->plat_data; struct dai_link_data *link_data = &data->link_data[rtd->num]; @@ -289,7 +289,7 @@ static unsigned long akcodec_get_mclk_rate(struct snd_pcm_substream *substream, static int imx_aif_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_card *card = rtd->card; struct imx_card_data *data = snd_soc_card_get_drvdata(card); @@ -405,7 +405,7 @@ static int ak5558_hw_rule_rate(struct snd_pcm_hw_params *p, struct snd_pcm_hw_ru static int imx_aif_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct imx_card_data *data = snd_soc_card_get_drvdata(card); struct dai_link_data *link_data = &data->link_data[rtd->num]; diff --git a/sound/soc/fsl/imx-hdmi.c b/sound/soc/fsl/imx-hdmi.c index e454085c6e5c..fe47b439a818 100644 --- a/sound/soc/fsl/imx-hdmi.c +++ b/sound/soc/fsl/imx-hdmi.c @@ -32,7 +32,7 @@ struct imx_hdmi_data { static int imx_hdmi_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct imx_hdmi_data *data = snd_soc_card_get_drvdata(rtd->card); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index b84d1dfddba2..ba491cbb9930 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c @@ -316,7 +316,7 @@ static int imx_rpmsg_pcm_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); @@ -461,7 +461,7 @@ static int imx_rpmsg_pcm_trigger(struct snd_soc_component *component, struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); int ret = 0; @@ -515,7 +515,7 @@ static int imx_rpmsg_pcm_ack(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg = dev_get_drvdata(cpu_dai->dev); struct rpmsg_info *info = dev_get_drvdata(component->dev); From patchwork Tue Apr 30 14:02:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BfbJONrc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMVK1Rf8z1ydT for ; Wed, 1 May 2024 00:08:09 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BfbJONrc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMVJ60nZz3ccF for ; Wed, 1 May 2024 00:08:08 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BfbJONrc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::629; helo=mail-ej1-x629.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNS5tX0z3bwL for ; Wed, 1 May 2024 00:03:04 +1000 (AEST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a58ebdd8b64so336054766b.0 for ; Tue, 30 Apr 2024 07:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485781; x=1715090581; darn=lists.ozlabs.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=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; b=BfbJONrcsMngrK3nh+zgfQp/Oe9UDVtK9Zn8xOqt+4B20LjDMPicb1BQv9damQS+tW iI/2/i8+//t1C5LNuELW44IDzi4cHnp0Svm1AWF/JWVCkpLpmN1YSFgqtef8eGxIsERR jW8GPCpKsQZen2xmZZ7eQsYtyOvCGv/dw6y3iSArXTCix6A272INb8Cx6NxuRj1Af55N eM+D0cHmdl+xiq+P9O3YiKj3C1HolR2vNSfBpVQUNHiK7VmUH+QsSnL5gT7LWdl3nZcG hamVwo6JQcH3ISgtSDRm7sGdVyPJJNUUh2sOV2aZyHGeWmoIjfkt924bRBtkR4O9VM1r yitg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485781; x=1715090581; 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=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; b=U6nJ2LtCjkOb0IUwio7Y8lFQStb+v8Gx/D7jWOQGyce14LgykG7AAHOwnsU68GbjHP CUyQcjK861yTKKtTnNp0sr/nQG2tUI4wZ5qbMlV6C3rfUQBANYgciPOw4WUhwKfhVF4l gubsbDsLNzpm9YCra+OtC8OsUcpAo0jAWrvvYNGVbQ2MrHWxPR0nzF6rpE9iZhNSE7sv JusO3R4boUYeFrdoHhH7Acra+G5pJiz99lILK4I38tbAcrlC+6gwB2/dE3cpYMQHmVUx AxJlG3E5cDnaXaCMZy5bZANC9cvkPwjmsB3rdl3rtEEC7Ne8kc+O3D0h1AI75FdA9DdR rjYQ== X-Forwarded-Encrypted: i=1; AJvYcCXtFTSGn51POwJUQxO8jd6ues12yIwrR11B3iGGvXTgs//bIeWBJKxhd3C6/JDJKp0bzzaC+PvAbG3Fcq/OF9w/5C0do1BMJoL3695enA== X-Gm-Message-State: AOJu0Yxc3fWsNUpvfRqW2PktJMGCDUhQuA+Iu93Ccbi8ELmq4cO8oNnZ RwuIujxCI4W0Jy3CZ8R2y+Y/I2B5igJIU4h6hR/MT9dT1dsI65+nFPlxlLki9pA= X-Google-Smtp-Source: AGHT+IHfqH0vbD3bQInQbBF2YUx3yEJaJuYtVm+BQiqXb8Xkd6Z+iJPnJ+JbD3G3lpGOTc/Xz5AyMg== X-Received: by 2002:a17:907:76a4:b0:a58:94c1:88c9 with SMTP id jw4-20020a17090776a400b00a5894c188c9mr10358426ejc.54.1714485780892; Tue, 30 Apr 2024 07:03:00 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:00 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:16 +0200 Subject: [PATCH 07/13] ASoC: img: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-7-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1453; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=ZJVoQsuYVbU6eX1WKifNhQyvCwwvs/Q4umjN6N4+yu4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPnz7LqN72vQN5f6xW+8v1IAmdOUCMPS6bcOV 4KOBcs83WmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD58wAKCRDBN2bmhouD 12uLD/wJ78QXDNb2piUOxSHgAlHla7As9001viT+koWXU/H7+DT8NtdMhT51dhbsQHiwJTtlPtD v3rC/wbLFAMaGDIiWvpnu6k+B052j/BXEI/AehuKgv4cRWhNtPKvFOKq1xqdWsRw0716H2t9hFG 2jji38Y55VThEkJU2s/2A+dyolipm/A2PYgxMVJTO2l5DA469GyAQo6sBIY2U/cunIB3Nd5iXjE Q3am7Lu9EXrAVEs3BW97SbLIHkYf0T5TAzmd8NGKPpDxyuCZXX18ORVI6i9N7ObF7t002ooK2kS ojdOtbdfw+8odlw1cUk0WmcG2BmcKgq60G25WepWhGsaV86YzAG4j0PmBLoDpKaIajgntlgaXru C59rV1W8tr/ZE1ju9NExCpppLGnkJdg1uS/O8ht/KxBbXbi7EIaeuB9CgaJ61HQpTjOo7fl4Wbf Rpr2d48ma59TnUEfG2V3VYPvbYQlMec8a+1gOtwjG9C7eGdUDWFPtphMaW/PQOdGdwQE6of966h 08q8aydTVqPyc6BlBswO7GuRGZvbVbSjXzYlnWR3btBq5N/fAyyLJVZQAR/CLmHCNxuMnquGLnh Ki9ObapaRsHnKsbyLXLqmRwcEn/t2Ywexl6X3EbXj9/YMjD5OQJehn/bvQ8tFvT1+BObAtIFNxa lE5v1KAME9l6c0Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/img/img-i2s-in.c | 2 +- sound/soc/img/img-i2s-out.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c index dacc29fcf24b..b69a364d619e 100644 --- a/sound/soc/img/img-i2s-in.c +++ b/sound/soc/img/img-i2s-in.c @@ -395,7 +395,7 @@ static int img_i2s_in_dma_prepare_slave_config(struct snd_pcm_substream *st, struct snd_pcm_hw_params *params, struct dma_slave_config *sc) { unsigned int i2s_channels = params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd = st->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c index f442d985ab87..6f9831c6d6e0 100644 --- a/sound/soc/img/img-i2s-out.c +++ b/sound/soc/img/img-i2s-out.c @@ -401,7 +401,7 @@ static int img_i2s_out_dma_prepare_slave_config(struct snd_pcm_substream *st, struct snd_pcm_hw_params *params, struct dma_slave_config *sc) { unsigned int i2s_channels = params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd = st->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; From patchwork Tue Apr 30 14:02:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=TN7fm+zc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMWY5yp1z1ydT for ; Wed, 1 May 2024 00:09:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=TN7fm+zc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMWY3KN0z3dWS for ; Wed, 1 May 2024 00:09:13 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=TN7fm+zc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::62d; helo=mail-ej1-x62d.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNY51ljz3cX8 for ; Wed, 1 May 2024 00:03:09 +1000 (AEST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a55911bff66so702903866b.0 for ; Tue, 30 Apr 2024 07:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485787; x=1715090587; darn=lists.ozlabs.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=xJJbSwuzaR0w7NGJdc7U0qNxw71mhhvz2h+n/8bje3M=; b=TN7fm+zcd+OrR9gAAMBwlvIm+r2QzaTNP+WtsgkWcujq1evNwIOzBbjOJZ97q4SpwQ phMsqaaPcuEBmkxfx14fFAhBU580qASkvpEbAZF3j6b12zfcptj4TdP8pvL5M298IWDZ cpw858gy5MGRJkjCsVS0ibRbmzwYmD7h/MHyPXi5AN2daIKAWjw90nByYghvv7bkrUX1 NEOkqumciYlZreNtMscWYyt9xZsvm0hBL1TxJnP0sD31GjsxfvUuLxACtuMESY88UmAJ ROdYIUxRsaIMWtWx6gPKA5qHcxKjRNu2/WYbuXfSP7TO+YAn1cZy6zoiIVBtt9i5WQFa 2cyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485787; x=1715090587; 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=xJJbSwuzaR0w7NGJdc7U0qNxw71mhhvz2h+n/8bje3M=; b=OVHTReJra0fWmWVakf02jLdlN5iDpDX0wXGE3MgR3W/Bumq3XD5NLWWkhoHKruxOLX XGUOJ73GjSxwqdeuAqdku74ICmRM5QY/3MpFnydWpWTj1dxzf2Cjnp5X4ccDcCOPKAfo PNwaixk+pP6PruYdQFLiBYAain3PK7dffL1/cPZcMyp3xwx0hfqmVhSqu8jfuhGJBko2 ZK3N+Eh9OKaGsPhWQWlet3YuNCjg6joTjZZ8o06+vt2R4xr+0wYXEifacKjqVaZD38ca RT1ysE+CDz1zcnwlzpyf/OFEOaHY3Nrjdfm6Tpck8JJ+W3gIq228lu6m4cjgeKRCj8P5 sogg== X-Forwarded-Encrypted: i=1; AJvYcCWfajuI5DtLNm/i102nT+1E+YPAVJDoAiC3ExfNlciN5ExRjlvLtPF7ftnZ+SNdPQH7Bcu3cSBsqLusz/jJJS7X+55T7fiOlT2JIVmaMw== X-Gm-Message-State: AOJu0YwAUo4pNt6xAEH8zQY4iHXangJjQpZFgOFZbUe+sQrvRe3j9CkC b4YlRplaEFHl71GyHVLOsLH7JSd81+nYve3/VNLfyU1GETyFavZgdtLbWG9+l68= X-Google-Smtp-Source: AGHT+IGuEd/p4bNUH8qGU+eaFSK8VAtxB3CIFoT6x1kpuMcKSCXiGNBYxe9tpKOFHZ0t3goA5+TDFQ== X-Received: by 2002:a17:906:5d1:b0:a52:5460:a1c6 with SMTP id t17-20020a17090605d100b00a525460a1c6mr8141356ejt.48.1714485786717; Tue, 30 Apr 2024 07:03:06 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:06 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:17 +0200 Subject: [PATCH 08/13] ASoC: kirkwood: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-8-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=764; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=XOQ3D1Q+qL3SzysXsYcm80LUwBWHBaXzmlHz6/Wj4iY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn0JcifyNVMar6zygwpR2fCs5/vlSNdY5zrU P/gTARf59qJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD59AAKCRDBN2bmhouD 1zGnD/4/+HNhnrisX+IxTCcgOIYVGlhMNGY5vKejxjMo983A81khcr7uNg3V39Ut/IpxeMUDDM2 Rk6W37xxCNkLbnV8wmT6q0+6JYwo8P4avbWhlcyWX4f/X54F3DagobrxkUqSfNm3z/Ohm2iMNsI 5ugz6Ay/15M8khl/LqKWzwuHNFkFgmxkcWkPSduL9KTHrRilAIDNLYrHPm02HPDdxNLtZNU+BHW HTvM9E0VR5hTDhkw7zVMnhr+YV3QpwCclGbZOhu0Cp0nBuhuyLS6jviuYyHCMCY6GkcreN+twHB cXmh7Xs1u91x/WYnyYmDtSjzvRIkkxVrWxw/QN9qTHQ1RYB/Xx60ra0zeLmBEmOfRz9SMfyGoUn vRlI/JhDNPgNBYSjjkyIBwajOY5i3uiToFIm6XjRwuDnhvfIY1W7C/uwA0GMStEoF+JFVDyw8pW XIHJD1hjJyGYX0RH/SbX84Zx3pQWMS27eL7z7lzWdJWctPFRnKSWOGotjeOgM72adhckEHzGgIF QJDjo4+G5LVVPbCJwrxnbN0CSfbzPMsVVru2jraEYMcMNH7CzrolNQXfdPgbEj/6nlHJvhm8a5t qifBptWPRDKql5mFD1fojt0Pdiv7EWmzeVOR/7d4Fw5AkjTCjcEbUzTHSDxxQlJZ3JQ4G9+PKsH o8NVxPN16vhnqFQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/kirkwood/kirkwood-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index ef00792e1d49..036b42058272 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c @@ -19,7 +19,7 @@ static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *subs) { - struct snd_soc_pcm_runtime *soc_runtime = subs->private_data; + struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(subs); return snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(soc_runtime, 0)); } From patchwork Tue Apr 30 14:02:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929588 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wwsqw7T9; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMXZ048Zz20fY for ; Wed, 1 May 2024 00:10:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wwsqw7T9; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMXY60QQz3vXG for ; Wed, 1 May 2024 00:10:05 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wwsqw7T9; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::12c; helo=mail-lf1-x12c.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNd6gFJz3cP3 for ; Wed, 1 May 2024 00:03:13 +1000 (AEST) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-51abd9fcbf6so9618764e87.1 for ; Tue, 30 Apr 2024 07:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485790; x=1715090590; darn=lists.ozlabs.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=HMdvqht5zOkDrEgl++6w26ILXUpiKeLdEJgBolPMUp4=; b=wwsqw7T9TxkzEu7aIEVjUAyMq+bGQiM2CVj9zjdAtMuVDem346HJQ45s3iqYIMdpY/ h0+0SBKInZ1IxXoCgiw9fqLTSz0NsOEyvvlZBWq+T/ASFcrxk9g26bnNGLE0D9PYWw7U FumQ4xxTngnfZvIaYkfJREbVjrQgkWU7bzUg7oGL2WRWqj5YEnj2CQxy7BXukZMEwLiN sJfNS5n+io/STuqp+Efr9/eNbIcsz222yebGBJlQLiHEVbmWhRtv2zzstLpbUnlhknNL WZlImRAPVVDCUlwTuyOCHTJY85aGMlRwfE2Sijlywu6/KrmSSfseE31UCZGvAZIx44k/ 4yVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485790; x=1715090590; 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=HMdvqht5zOkDrEgl++6w26ILXUpiKeLdEJgBolPMUp4=; b=BgUyzCRmLS/ihL62mpGjuGZlT+Bsgk+CkA1AU3IrEguwVPgjSSKYfHnk9iYs0leR1w lF4JEziq7RcV+C7F3tYQ6UeNqs94AEcoUwMzISsOKZQrwgQtQiKnDf8RfkvwTL5u/4St I52nZRBBT/LFxW8hJ68tKPGHQJIC9ZtSq8WLoT6ilS44FwzWeR3Q82RZLguBoew/GQNy 9ypd5AZZkfatmLyLmW0sOpnhF0z3EC2g4plXyOjONpC7spEa9c9Rttf+jTSG5RghOUDI zwaXti8VDUU4S9tgonjD1VK2QfEM1vIW9YxZGjW3kqjFnzh1853QiIjg9IkmOp1pRqb4 95HA== X-Forwarded-Encrypted: i=1; AJvYcCUGVNcmFh9Ppk6OqwBYgtR0Topj65Qc7cZX/RqQGWPAj5akPnpD1gu7RUilEWUsHp0BkWRMI0Jdi7PrXvk5gFy8MASI/VdjLmWzVKVeyQ== X-Gm-Message-State: AOJu0YwAJ1TFRe0PzqMuP3TEc6xCpZIW+x48c/QxMRzJuHTpjxRuVwrP ebifQxmjN1D1QQzJmP4/EyiNu0tcfBRRhSAjlFA6AHh0HrrbfvEt7zsTAxS7HGg= X-Google-Smtp-Source: AGHT+IHF9BCm3Hpto4qRWqGnR6LWsHIvsR6psO89D0oVIbNwL85POL6TwPmXMEZNmxvO3lf19inFfA== X-Received: by 2002:a05:6512:3982:b0:519:166a:d217 with SMTP id j2-20020a056512398200b00519166ad217mr13782162lfu.32.1714485789720; Tue, 30 Apr 2024 07:03:09 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:08 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:18 +0200 Subject: [PATCH 09/13] ASoC: loongson: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-9-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1661; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=b6kuGLsh7Fncnab7O/x1sZHKoAE2to9yOPoWLkFWFoc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn1MXBzjTFYW1vw+HGX+bgAlb8xjIeAN12qT 8heTgZA8qOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD59QAKCRDBN2bmhouD 18asD/sG4cfwm5/cvMuyWs/KhNg7FPcNnM4eFOVtUPz5xnRqVF4pt6jUcKqDJjRfrq3s5JoYJ3c vBUD9jgSmkuB8tYCeWM/fFAOimxAXRa1keWd3xM/+KL3qsLAqkpXIdkHwS20hkhT7fIF+E2cU34 35Ajyyg+q/q32ZXoeF+z7chz0oMLOUq3jDN4mGTO2PE/l4xWHZqC30HaBVtVZLYOr2WdfJN14l+ YsJUUR1UBA5aXsr++f01Vf/m5pPIFSvYtRQcrp5YyZeaWVGm24AD0kDXcfdaYuSD6hlnoVB1j9K LlP/ODUgDC6zWb68dtVEkLXAfru4YUdiN9M9PLsBzBz0IIoe1aPihWRNB80Uyu2Z/lWy8ceeaX/ rMUdGMoXE+1AcbqrE0sZvujjGVmL/5axnumRcAJRvAi4jE27qyDapAyfgL2FTvrC5fHHC0WF/Pe zkWTZpTx4al2ZotNljcAD9imjfQSGKB+Iovem2sQW+eZIGnWm6EeDiADskK/J5bROpHvWbfLRMM rXaqxY9WzOy+EFocuuu+Vq9ckAOOUcikB/3Y6YS/odwg7AZZA9hLSefMdTXWrnaJnScqKcP/bAw gRWnITyzDhtzuAN/vsyQ5gi3lbBmCYNL5XhK6oDlLe5BamoqScRwdbTHBthRDUiaLtaYXHQGkXj jOwKVSiBpozJEaw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/loongson/loongson_card.c | 2 +- sound/soc/loongson/loongson_dma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c index e8432d466f60..fae5e9312bf0 100644 --- a/sound/soc/loongson/loongson_card.c +++ b/sound/soc/loongson/loongson_card.c @@ -23,7 +23,7 @@ struct loongson_card_data { static int loongson_card_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); struct loongson_card_data *ls_card = snd_soc_card_get_drvdata(rtd->card); diff --git a/sound/soc/loongson/loongson_dma.c b/sound/soc/loongson/loongson_dma.c index 8090662e8ff2..4fcc2868160b 100644 --- a/sound/soc/loongson/loongson_dma.c +++ b/sound/soc/loongson/loongson_dma.c @@ -226,7 +226,7 @@ static int loongson_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_card *card = substream->pcm->card; struct loongson_runtime_data *prtd; struct loongson_dma_data *dma_data; From patchwork Tue Apr 30 14:02:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929589 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hQnRihbx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMYj43HLz23jG for ; Wed, 1 May 2024 00:11:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hQnRihbx; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMYj1Rjjz3cT1 for ; Wed, 1 May 2024 00:11:05 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hQnRihbx; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::229; helo=mail-lj1-x229.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNk2rtDz3cSq for ; Wed, 1 May 2024 00:03:18 +1000 (AEST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2db2f6cb312so89783591fa.2 for ; Tue, 30 Apr 2024 07:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485795; x=1715090595; darn=lists.ozlabs.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=HlReh/uKfKGykX7vYGkVx56/1oeqm3j6UBVK+Qmhu9k=; b=hQnRihbxItluZ9DNHkQgYcRtBPOMUjkJSDyf3M6LR6D85eU1l4VvI/Ro1g36zFISbA CyqdVMmNeT5dKRocAcCdRdg9SnTwe+FbhRDBb3zlk2QTBrnOS2AhiX2s5CAtAg0YKezQ qeXmbHFgHZHGLNj7C/Y/OcJay4YZb+8DfL0fo//ZIQVV+noj4W6D5QOosCu7TESma4HG g4+1Qr/7twfP5moJIh+N6DISrpdlV2Q5bBFp3F5RxwMaEXPRrQfaTngDB8Q3TxB4osKV 3DQ2tmrXCXgxDWLR+vZgUpfG3k7lZxmhSye+IW/LTu6B8kqKSaREKQ2+GrBWXO1SVs3S pezA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485795; x=1715090595; 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=HlReh/uKfKGykX7vYGkVx56/1oeqm3j6UBVK+Qmhu9k=; b=GRN7ep2eExT0NIqzzoqcUbqUZ7dQVgLZg0VLER08+yJDh+dbYzAG+J4S2dX/kinCQF m1kU8RrDplmzsPQCTmY8DSnDzNiDtry0mlFv/FIZXTU4PN9SGi3PGV390sEtI4itzR1T PUtcojwudg66p8M5b8s6yWDMlnW6sY9O3nUbx3fTVspmDMJOYe39vgqbNcoMeRGu2WRP mElWYl1nURU0RiOd0xnye0rX654sal7lIXOGxyhdZBUYlJo3Jzr2DAm0eYdTSQ8BjqmE evPAQ/Vl0sLAEEwNln723b08i7lSc/1Nq8wWgVOjLEx334jc0u+MdarIAouXXdYwWw1R sl5A== X-Forwarded-Encrypted: i=1; AJvYcCXDicTW/kT5rxt/BgNStehmAJUDx/Bm8mbXMMkbJZGYWxXeOatQl7JE2xqTgdjdEGJKHxReBorMveBhIM1wDLoODjU5TGugzn75v/j2KA== X-Gm-Message-State: AOJu0Yxb2/7TUMYhRaIe5lIL44PsIR+Pp3S8t322eEPG+qqo0eSjlzrV vfRf3rfpt5haRjzTLm3g1w38gcd9CVa8ULEcPGD1WNx9FArfB+CO27JdEmZzvMc= X-Google-Smtp-Source: AGHT+IEjPyu9X1615THrmlgihVBnJj6snuJyIqe3VYMH9bOXPEPLADlqYnOlMYNNwswyFzCxSlW3hA== X-Received: by 2002:a2e:9145:0:b0:2df:b2d5:5935 with SMTP id q5-20020a2e9145000000b002dfb2d55935mr8668895ljg.28.1714485792538; Tue, 30 Apr 2024 07:03:12 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:11 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:19 +0200 Subject: [PATCH 10/13] ASoC: mediatek: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-10-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=13819; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=74+WER8rBVNChp8T011lJzusbjvdwfTeUc05vWQCtnc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn2wIAKWRRmb3f+Eu7E/sNsicAIeRJntuzxZ SxYr98J11CJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD59gAKCRDBN2bmhouD 1yOiD/9+no2oO2meu/Ufx9CEy3qSO7oTggEWW3FaqAqFcceuY3ZcL6EMZ2biHC/QRNK4ebDskKU 3O2P3faEC8XJpoITbkbDIiqXeyFCKlF8xXpOUoqJU2b/1DL8tjHLJ65Dg+xoktZHD2NWmNoQiRg eIA9zZjygsEGOywLbr00ulna67FOpbcwyo0pYJ3dQYy1TyOTBy9jFGsl8RxPBCcZfhE2P3xy9Op 3YJQdjnLIEm0nGjkPUwV/mbyv1dB9guABGSShJm5gvvH+W+/cqmtzgzKa5lD3MLc//md1a3Ju+V GYH6YWtUfX7QSYdrf2odSjymVm9iBei+GgTtQW9SfPeVHHo17PilaDoe5GVaygZohC2HM2K33n1 Po5GQ+qHU9/lDaSYbLMh26vyEayDUXnoxPUHaOgSiNZamo6XG6T07CTTJnF0XA0JoNRQd5eyWJs BHmwevPcP6/bP/iV9hjNJnOo7ORDuwBCFPhQlH2IgPI/WGR/3ux6Ozr54ngy6kgQ1l8FYVYJ5zm lkr1t63qAutgNeS0JPV+5JJfLfhPY0jPjSPT2oOa93zLB79CYb2OCU4CZNxFUoUZ1ICYyxfXdkz vSpyKtJNvE/u0Mzrwu0nPoMZhU+mWKpd1utzIbZX8OCoJLTfC5V20Hpv2quS3imeWDvF5BCURTw YI43f977A5OcnvA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/mediatek/mt7986/mt7986-afe-pcm.c | 4 ++-- sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 14 +++++++------- sound/soc/mediatek/mt8186/mt8186-mt6366.c | 2 +- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 8 ++++---- sound/soc/mediatek/mt8188/mt8188-mt6359.c | 6 +++--- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 10 +++++----- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c b/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c index c1c486e275b9..572ded279b53 100644 --- a/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c +++ b/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c @@ -106,7 +106,7 @@ static const struct snd_pcm_hardware mt7986_afe_hardware = { static int mt7986_memif_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); @@ -116,7 +116,7 @@ static int mt7986_memif_fs(struct snd_pcm_substream *substream, static int mt7986_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c index bfcfc68ac64d..bafbef96a42d 100644 --- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c +++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c @@ -40,7 +40,7 @@ static const struct snd_pcm_hardware mt8186_afe_hardware = { static int mt8186_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct snd_pcm_runtime *runtime = substream->runtime; int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -82,7 +82,7 @@ static int mt8186_fe_startup(struct snd_pcm_substream *substream, static void mt8186_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct mt8186_afe_private *afe_priv = afe->platform_priv; int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -104,7 +104,7 @@ static int mt8186_fe_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; unsigned int channels = params_channels(params); @@ -153,7 +153,7 @@ static int mt8186_fe_hw_free(struct snd_pcm_substream *substream, static int mt8186_fe_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime = substream->runtime; struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct mt8186_afe_private *afe_priv = afe->platform_priv; @@ -252,7 +252,7 @@ static int mt8186_fe_trigger(struct snd_pcm_substream *substream, int cmd, static int mt8186_memif_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); @@ -269,7 +269,7 @@ static int mt8186_get_dai_fs(struct mtk_base_afe *afe, static int mt8186_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); @@ -290,7 +290,7 @@ static int mt8186_get_memif_pbuf_size(struct snd_pcm_substream *substream) static int mt8186_fe_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime = substream->runtime; struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366.c b/sound/soc/mediatek/mt8186/mt8186-mt6366.c index 8fd31c52b077..771d53611c2a 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366.c @@ -297,7 +297,7 @@ static const struct snd_soc_ops mt8186_da7219_i2s_ops = { static int mt8186_rt5682s_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c index 9647fe133dc8..ccb6c1f3adc7 100644 --- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c @@ -91,7 +91,7 @@ int mt8188_afe_fs_timing(unsigned int rate) static int mt8188_memif_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = NULL; struct mtk_base_afe *afe = NULL; struct mt8188_afe_private *afe_priv = NULL; @@ -300,7 +300,7 @@ static int mt8188_afe_enable_cm(struct mtk_base_afe *afe, static int mt8188_afe_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -334,7 +334,7 @@ static int mt8188_afe_fe_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif = &afe->memif[id]; @@ -358,7 +358,7 @@ static int mt8188_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd, { struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); const struct mt8188_afe_channel_merge *cm = mt8188_afe_found_cm(dai); - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime = substream->runtime; int id = snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif = &afe->memif[id]; diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index f629fc6bbb53..eba6f4c445ff 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -557,7 +557,7 @@ enum { static int mt8188_dptx_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); unsigned int rate = params_rate(params); unsigned int mclk_fs_ratio = 256; unsigned int mclk_fs = rate * mclk_fs_ratio; @@ -658,7 +658,7 @@ static int mt8188_dumb_amp_init(struct snd_soc_pcm_runtime *rtd) static int mt8188_max98390_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); unsigned int bit_width = params_width(params); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai; @@ -821,7 +821,7 @@ static const struct snd_soc_ops mt8188_nau8825_ops = { static int mt8188_rt5682s_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c index 64af9bf363fd..38891d1bd18a 100644 --- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c +++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c @@ -84,7 +84,7 @@ int mt8195_afe_fs_timing(unsigned int rate) static int mt8195_memif_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); @@ -281,7 +281,7 @@ mt8195_afe_paired_memif_clk_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, int enable) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct mt8195_afe_private *afe_priv = afe->platform_priv; int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -310,7 +310,7 @@ mt8195_afe_paired_memif_clk_enable(struct snd_pcm_substream *substream, struct snd_soc_dai *dai, int enable) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); struct mt8195_afe_private *afe_priv = afe->platform_priv; int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -342,7 +342,7 @@ mt8195_afe_paired_memif_clk_enable(struct snd_pcm_substream *substream, static int mt8195_afe_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -380,7 +380,7 @@ static int mt8195_afe_fe_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai); int id = snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif = &afe->memif[id]; diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index 62e4e34cffbb..ca8751190520 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -338,7 +338,7 @@ static const struct snd_soc_ops mt8195_hdmitx_dptx_playback_ops = { static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); return snd_soc_dai_set_sysclk(cpu_dai, 0, params_rate(params) * 256, @@ -394,7 +394,7 @@ static int mt8195_dptx_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, static int mt8195_rt5682_etdm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_card *card = rtd->card; struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); From patchwork Tue Apr 30 14:02:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PhOAxzsc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMZT6VsFz23jG for ; Wed, 1 May 2024 00:11:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PhOAxzsc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMZT5LTCz3dRk for ; Wed, 1 May 2024 00:11:45 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PhOAxzsc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::62d; helo=mail-ej1-x62d.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNl6HXKz3cYj for ; Wed, 1 May 2024 00:03:19 +1000 (AEST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a58fbbcd77aso301152066b.2 for ; Tue, 30 Apr 2024 07:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485797; x=1715090597; darn=lists.ozlabs.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=JWJR2WoIWwHgA1WyLmTI5AFP9P56iC3vbRDROZEp3Cc=; b=PhOAxzsci9N9VrzUA5cP6irjmFaBlMk7A8aOSvU9d0kIJrl8eMs60bJCm6/+PI6Rnr 3rR4W9Cm8z53IIymJTRT56LJP9zcbRQcFDAFohE6uwhSuYWNHXfLC8HaxAPqzBKSZEbq GV8wPzKuugmxVJhvw44lqFC817LphKt+g9XzKh7qtJ7jl2a83eMh0HgPEaH3z38/1mrX nkBAnSGHWra5KnfmUUQ/DU+KwZWW8I8C1DkK27j+5lc2NGe1aywS/4Dv2WEmeB8v4WON dGNkfXt6W6D3E62AtU7IPlRf/0lkimECd616TPiyqge8ScmdG52SyC5jM8yggm0rxk53 rVtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485797; x=1715090597; 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=JWJR2WoIWwHgA1WyLmTI5AFP9P56iC3vbRDROZEp3Cc=; b=dS0K9LG5IKRrxcXavDkiXFb0dxxz9x6kMW7B5+DYhkptVnlpjoZJDDxd3Rq8I6gozC qOzrzwaEOKK+9YqugObbs9mczOgx3our66viETmXM0Ntpv0xgzCltG3MR7iHFo4F9w3b iucuDJMhnn5kYhCw5/LFXlsUTuvmXsZHeSWbb79HkavNuaH8g+muNZGF1Q9/gfsMwduE iRTIfm7iiMaCVWSYAXEksZ89EwH0AShTOtEdSZO+zyM9BuXvvoYPpbNe2YRv9qUsr2uA tXeNgd7YTGO9GubOT4XbjGukFAjXDrkyA0zXE8tAdggbI/WzFdIDSa4q8qk6C2x8/tGB t7ng== X-Forwarded-Encrypted: i=1; AJvYcCWOBBrPcdfScHbWGCyQoTZL7NalONGf7qu6xopAjfcBBaE9jL1zFLoC6DL3EoYwAK2Q4NwYOaQkzg5BR4PqzYJQyGhwC+qjiEaD1cwAMg== X-Gm-Message-State: AOJu0Yy1NCppqXQlTHxE2gr8hlXio+hseSbv/v3WDGtyiSJew92qEwPC 0hCbUkAlMFuI+HVnhFOfrFU5LTOW/lz1Vs2MgiPIVrY9dzc2Ai5guMdpFN7DUxE= X-Google-Smtp-Source: AGHT+IGzpv19AvraaJONqek/5WZ+vpK0ygTzaKpESURpr1fKUPncz+rrCHoTLxWTmS70O2gF9usxBg== X-Received: by 2002:a17:906:fb19:b0:a46:cef3:4aba with SMTP id lz25-20020a170906fb1900b00a46cef34abamr6908081ejb.75.1714485797197; Tue, 30 Apr 2024 07:03:17 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:16 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:20 +0200 Subject: [PATCH 11/13] ASoC: meson: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-11-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1197; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=2L2Sd/bZA9DPmGMKb1blU4asO9ABeFUMOyqlFuFMjDE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn2JvN54IaqcYA5GLEuMvhDQe+mNVTJTI3Tr QdG3HJ5mpaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD59gAKCRDBN2bmhouD 197sD/4lVw4vRS0TaJQoEqN1/VKp4Q9D5lysYmYFjuJDSklcrh+mHGjmHyG95rjuMpfUp5WdZ9F iytvncSSC/Cuz5v/Jf8fvm3m9JjwXFFBP5Lc4SMyVJAeiWnSKjzxXSJpUg4BiTtCWCFACQ+V2Bb YGk8kFBRlLhu+hIsRVvO7YExMVKSyWC+LUviOI2MtzsH1IZm+J1MJ32ygUWTM2XfMun8P6JaMaS zdUyUnJjZrzCI9/u7V7zlNe7qD1tuI5xufOqCOiAa6z0lCBNjRJeSVaVzniiHsE9d/ko9UTugjE fj2ylpg5b6Vgg5XqItpdB+YsDKsAIWOpQw+4DM9EyACs1+eZoj3ODueF18BqqnON9iBFHyQC+PS tFWPcxkNUPvKTgBAo35M7FSPkECi12I5S4WqPZrRjoTs1lUtOhRGq3DjzGjtxPPe1fgDGvsk4Mf 4VM/tTJWrMOhnmX9/Vm3iZWKyJcLwmff0kZYETc6VVP4YKbsUIvlZbkhmLuh4EY05gpbzW/i98e 2SqiRpAD6/3HhVAbX7RcNsQAFGYv0XBd6/7ewRdKkn2ly0KIqT3t5dloWm1fn8iCmzLrSnDN+mR h9asUnfi+hgioFVTE27PhDIzW+cxFlTOVreYfN8Fh5JIFmJW8FNL9xUzP6zwTdjGwt18Z9Ey1s3 y25Qq5uL4jC7B2Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/meson/aiu-fifo.c | 2 +- sound/soc/meson/axg-fifo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c index 4041ff8e437f..b222bde1f61b 100644 --- a/sound/soc/meson/aiu-fifo.c +++ b/sound/soc/meson/aiu-fifo.c @@ -25,7 +25,7 @@ static struct snd_soc_dai *aiu_fifo_dai(struct snd_pcm_substream *ss) { - struct snd_soc_pcm_runtime *rtd = ss->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss); return snd_soc_rtd_to_cpu(rtd, 0); } diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index bebee0ca8e38..1ead5ebc84c4 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -46,7 +46,7 @@ static struct snd_pcm_hardware axg_fifo_hw = { static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss) { - struct snd_soc_pcm_runtime *rtd = ss->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss); return snd_soc_rtd_to_cpu(rtd, 0); } From patchwork Tue Apr 30 14:02:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GtbswIeW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMbP43Sbz23jG for ; Wed, 1 May 2024 00:12:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GtbswIeW; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMbP1TYhz3vnG for ; Wed, 1 May 2024 00:12:33 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GtbswIeW; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::12e; helo=mail-lf1-x12e.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNq6dQwz3cYc for ; Wed, 1 May 2024 00:03:23 +1000 (AEST) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-516d1ecaf25so7961529e87.2 for ; Tue, 30 Apr 2024 07:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485800; x=1715090600; darn=lists.ozlabs.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=iPEO0RWAvqMjT0IhuA0J9gOKQsCIQYXZsdev+OBW9Pk=; b=GtbswIeWjcq9ccBFl7BvseEuDVdDEGVeDBurlpjtKTHnDMWosJfSgZttbCjlAfir0C 069NU33WD+sZPN5p3+ZtRaIFmLeoQ69Iv/XaNJ7eRK18LABjCDgSIasmDYH6ZOBexAjL SpiUj/tvXxCuQSvJEnkjh6ufLPXSB5uDffhiz1FAZmW5J9pwk250FCdoi3VypG9Wof/7 jEwxDAsvYA7qaZSvwh/Vi0LRI0xuZ5/k5OCSJYqNUy+KiiWbJcDauBJ7IPSiR1adMUD6 GH9ZVk3Npuc4DzzJkSIWEYUeoNRU4FbTOpnEJYl4NKaR6PM5tAKtJM8iHVJIWD6NpDzR akpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485800; x=1715090600; 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=iPEO0RWAvqMjT0IhuA0J9gOKQsCIQYXZsdev+OBW9Pk=; b=a37OPxrX3VcHsSh8GeSQq1Xh0FpJ1wB4rW4nWpxbYpFERFfOEUGywQ0PtPjwMLzAIA NfXrRIECf8uLLqF455v+W9o9CwyPUC+Mqaxd8p4Mk4BHcRt9WA8oXBgk9srM2IbWQiwP fLX/CPASZPIqbpo8ZzyQvetxirueiatn32A2xQkOw8ywdqQcs6Zvh42sZ5fwQpB67fRR h/dul5iDt6XlbKi0Vc/RA/bvLyg62vZYnvNnY0JWLmO5kp6Jw9SMP1FEHJp5mMl4KP8+ I3bixIZN1PKP7w1wDu3+LetQE8kAkLl1GeHe+V/HKpnsx6DVGpMUWjbKsFg9Jlflp4OD +gdw== X-Forwarded-Encrypted: i=1; AJvYcCVNKPbj6oBHMlA3Jm6bCjNpRU5qcchyVve2EAn+s1XZAIPC31aEVNv5B2waVnsTB4OwNoOHfPFseRdZQgc2FqDZ419/L637A03Rt/Ef7g== X-Gm-Message-State: AOJu0Yxy+mYW7d+mUWrOhnybCKbL0ai229nNEmkVU2jjysEhpFwPXh0r DXimjA3xnMRMT99qZSY9BJ4ocV4GetCEYGMRLXW2ikUEnubaiu5bouxRmepAiYw= X-Google-Smtp-Source: AGHT+IGh5m+2saezt4d4/Xj30jwjHn2HaB5/1wzlPXeDMAywvUMwy38mdPMQn/OqpOvF0tN4moRDWA== X-Received: by 2002:ac2:4342:0:b0:516:d0c2:755 with SMTP id o2-20020ac24342000000b00516d0c20755mr1936131lfl.63.1714485799614; Tue, 30 Apr 2024 07:03:19 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:19 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:21 +0200 Subject: [PATCH 12/13] ASoC: samsung: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-12-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=859; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=s6T6qKBmGyM2bmAZfxmnWfBAOCON5ixd+eIprC5zOI4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn3jE3Jqd/FGkciqXRI8lqVudz+blh1rLunh DAPo4JfRZmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD59wAKCRDBN2bmhouD 167MD/9WOiPSu4HFniDht9/iDlJgx4fouuoHImJ/CM8XXopNUpo7cqRR15JqKSLsDj6vLCZnDjI XJH4l92Ge2WRJcz0/XCKWm3Oj9AtC7ODuCsB3t2mfhBJxD0iuojyzEbOdRvzU55KzY/Jm2DElBe AVz2VKMPgF1zFr4pkhx3dxiMHbLe6UGPzibytjl5whdT2xAoImo+S2NZTWCKOe4+N7Zrs5X4MKN nksx0kWoenkduh9GxKCpr++Kokx/YYpvDE8obQfhLY80Z4tPSY6cX4vv9sfrzB9vGeLAU9yTvAc Wxh0WUV5cT2zuYc4pUkyqV+EX/Y3tPEE5xSP136C9a7FWO+Rd52ezaWXED2BY3hXspNrTrKXXTD nFQfKJ3M0bszW7Tctw01tKYZUa9Qf0bz/0oVbI6rpDgM3+PPLaVWT1D47FaKzfKQ9jnjaZWzOoF 1F53c9Pv5Cdt+RLqjXfD1JfrGJRJ7hUbPzMQ/arruJidb9QiloV9Dp70EuGD0VudxXWXtwRzztI eIzKDw49c8QYUITfwxYEr1QsvBeQMeOGj/PlXQl1p6vj/Y4oFGW1SjDTITGrfjGFfmKEABGvYP6 yK41SS5+akvGSPouciQ7r2EIqpAZMYxIFkaCVPRLm6VL/jKT9HDivO012DCh8z7Q3NuvimCGlwg o5bO2V6wsqvDkUQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski --- sound/soc/samsung/midas_wm1811.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index f31244156ff6..0841e2e6f8ce 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -127,7 +127,7 @@ static int midas_stop_fll1(struct snd_soc_pcm_runtime *rtd) static int midas_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); unsigned int pll_out; /* AIF1CLK should be at least 3MHz for "optimal performance" */ From patchwork Tue Apr 30 14:02:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1929597 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y2BUGfDz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTMcB0cwJz23jG for ; Wed, 1 May 2024 00:13:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y2BUGfDz; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VTMc958ssz3wDw for ; Wed, 1 May 2024 00:13:13 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y2BUGfDz; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::52f; helo=mail-ed1-x52f.google.com; envelope-from=krzysztof.kozlowski@linaro.org; receiver=lists.ozlabs.org) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VTMNt1xCvz3cSM for ; Wed, 1 May 2024 00:03:26 +1000 (AEST) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5726716a006so4642144a12.2 for ; Tue, 30 Apr 2024 07:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485802; x=1715090602; darn=lists.ozlabs.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=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=y2BUGfDzXe7ZR1UjjOI47MsZghyYUTTwQrNi+gN3JCHTrrSu0yJlli6lAWLnEPA8DG o8giL3lFEri4obam/kdepsM40etShQW1N2kcd/nFnTvSDJBNbRr40839SyDyOggdfZ9+ lh3KlyJYdvU8AkhZD0lDQIdkjZeaaIH10Lsu+PetsZtYG81yb2kr32b65mZUSDkd1gXr v5+p0391eSbh79e8LJQ5jOcvFShmyrc5o9tPuUkE8yHgx62dTAD3rtu3X/5m9UWNLOP0 AWokyt6t6Bv9whic2hwPqHfkIhQI8ETGCGsWArvU9H6IVPdwTI7htLG6xsiY+98fWdY/ vJKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714485802; x=1715090602; 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=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=g6C5qHORLg60rG3HSpVKO11I8FXQOpL5QdgRjCYnvFHHnJTcAGcWKwq0X10CqIyOzH yANqBaeh1A1xjy0/APKbs5MxCZLCEEkXxyiaNdfNMcDJVFq2/ujXAO6rm8aqkPuHUtKQ jUxkiKd0R9paAqDHOWQAd7eoSGbNtb+Nw1/YuWH9EyyBnYzOhGzQan5VFrN5aMybWxIQ fONREaf1eOkxRm0nBdyG3BkfOX8GX5j+pd1J90ZWpBcY4PVkPkQGjve+7/re5b9SwA6K nprITrS07zdaUH81yEcXLRyt2nFP83laFPx6XcnB3HKab4q0njitXdf2prjnPDlCTm9E TXJA== X-Forwarded-Encrypted: i=1; AJvYcCVfkwVXbLlanCVqUcvIYF8qqxf9pI904r0LYykVwxtsW+Vez5TOlhAfZXXDwMlypXVAgFXtgl2iLW3Y0pJuOBsvwFPWZG19YPpzicmbiA== X-Gm-Message-State: AOJu0YwUQ2pjZNFI+LQ0Jntw18RZvjKrgIW/S6ibpHtXpwPjeXobdvE+ oTLN3wlb2phJ+zkrEfwQoCuG0Hn3/fX+18LjX0wwXR3DBS9uIN1lbpEC2AGrLIs= X-Google-Smtp-Source: AGHT+IHSymzbs0C8MGLs3EVai6AvWaGt9IGpYcAnz/QtQsZ0owRN86WOYk4l43txKHjNaleFCNL96Q== X-Received: by 2002:a17:906:b78c:b0:a58:ff19:1bd7 with SMTP id dt12-20020a170906b78c00b00a58ff191bd7mr4814671ejb.24.1714485802359; Tue, 30 Apr 2024 07:03:22 -0700 (PDT) Received: from [127.0.1.1] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id pv27-20020a170907209b00b00a5940af3f67sm31434ejb.16.2024.04.30.07.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:03:21 -0700 (PDT) From: Krzysztof Kozlowski Date: Tue, 30 Apr 2024 16:02:22 +0200 Subject: [PATCH 13/13] ASoC: sunxi: Use snd_soc_substream_to_rtd() for accessing private_data MIME-Version: 1.0 Message-Id: <20240430-asoc-snd-substream-clean-v1-13-6f8a8902b479@linaro.org> References: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> In-Reply-To: <20240430-asoc-snd-substream-clean-v1-0-6f8a8902b479@linaro.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Thierry Reding , Jonathan Hunter , Peter Ujfalusi , Jarkko Nikula , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Matthias Brugger , AngeloGioacchino Del Regno , Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Sylwester Nawrocki , Ban Tao , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=855; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=skJQwkduJ0UqVILLbpIVR8oru+2QUc2pKBYrAAVKHLI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmMPn42nKdNBa2rMr1pgKaAGhX7w0XUyPtyKW9V bUEsOjG4LCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjD5+AAKCRDBN2bmhouD 147DD/4ieg9gyFCb0g9PJBqL29gkEXs/qxtb2TaodG03VYLhq+fFzv2vOzJZhszAb1VOkS8eI0F KlbKY9lyGbdzA1h6zSNA0p/UgvlOtsdv4xC+0KT0yy7TXAza83A9DSl1qDnkNTdOFgc42e1+9FU eaGGfDloUavMXd6rNB7SRZMQRcm41b47P/mRzEa2cA1bjkAlrlBm6NwPeVLP5A/Kcr3Tb3EZ2pI HgLvCY5h27fuJYugwmxUMfqOjXMdWLx9SSAQ5yfhuYZZBgKU100MiFOvcW2nlDlhncmjU0WcU5t H7ySW9GYOdqAqEkELNGxb97j0Ov7StcHdE1uz4YmdansE+m8dNQTp3CaZ4LdH2+2TFF/sP4aynu H2GUeJKaC1N/Ng+cEI1h0gMDXKbR8qyTg+SjoM6i7+5UP1I2coCVMYrneh2dpEyJOp9MNFOvj5d UzzEQMRQeFilQTHwB3xynjKLIUqJbjhqfafH5A0FECh/lb7OoM+PTU7VciDC4L/s1Xl/NOiJCnq 69WLOXnti2pJsaGzvUMsSHAlokIA+7NRIpUewkiHs/lN9zgB7QfsX/zvrQTookURZBTMehAN/cd yW7Vl73L2bSpn6CppvaD8hpkm5+NhqYeNWbMxnKsVdyQiMo84C2YNgI+3cBxRRpVQUYuh98RXgk h6j6UQIf5KNOdKQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jernej Skrabec --- sound/soc/sunxi/sun50i-dmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index c76628bc86c6..fedfa4fc95fb 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -74,7 +74,7 @@ static const struct dmic_rate dmic_rate_s[] = { static int sun50i_dmic_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { - struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sun50i_dmic_dev *host = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)); /* only support capture */