From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6BD5176FC0 for ; Tue, 30 Apr 2024 14:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485763; cv=none; b=OI6lsJLTDUA+FauOTcdzXAZbrQPVl5XsHaT6Lc1SyhmW+R8zt6E8GecD7lGbIk8+yyA0n1+DJbOLXqx0ycs+2UBXvCZBuLKHVyptD8N6vsidKnKzfPpeFmivWimNger5kjV7+80eSF6Q4r49x4JPgu19cSyK8paijWRQbk1KqCs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485763; c=relaxed/simple; bh=EYOXzIuCEupt1Jy5CsKHEjSmv9410RCbwX9prH3L2HA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=akaUiqosaslaJbtgnxsJ7fICK31wmdlk090Ltoc8y+hz1nvPLEoTrXc215rkHvXp3ehuJ02CMR2apXmCqdPN40sz0s+ocn8+Kvx+WQYM+NL8eviApetcBghke89haXntRPvBJ+VcXNsEpHzMLoB+bqjLCd8V3q7hBIH5VkxaMmY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FV0KeHFA; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FV0KeHFA" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-56e69888a36so6037450a12.3 for ; Tue, 30 Apr 2024 07:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485759; x=1715090559; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Sbe9yQYz/BTDyMh+ij8kmCNBJHEOOFsTDuijF7mUMdo=; b=FV0KeHFAOojFBLFgcvxg79kxqHlEg4+mhd43zc86eIjHzitFHmh7fYy/Ji23MLpAKW QMS7ejQKzb0w3IPXuVqtx0xBlt81BDya+iWcbQ0R/uF5EV3bLUqw5t8yhfL/c3ebl/Kq HT9pQUd7mmNbMz4ZAYmB9GBX8nxoNrDW20w/tXIoglw83DfYGsxCUQAx+aL6bkLqxr9z TKvGDOO2agCf7j4BfcGYs0Ln0tpWzkM3AKF0N8A255Cfmeali7S3oRkM/HSd/joIKWXH kOkM1DAHbLEJ221N5tabU/0c8y4c2fduh2JdBJLt+4xlSRksxVxkywZ/AYMDpw9GTVgK kECQ== 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=ZRnmsMqwR7ElxGJg3cL1ezqSspoM0G+abscV1oqXTExvTw0yut3EVm8GATHEyrLpB2 YOAAxVuoZ541mGT4kd0rzeu8D75niVEuuJ/tlTSscHIurfob+KCEfQmeXKJ3WDCjh9dH I8oH30Bs+CjMIVy2lePNld2QUw2dxQ9vcBBAJTS8R0r68Rjkgw9NmxXLGgXaOd+0SV1k QQquaVl6oiHKD6BfmQuxRBX+YaokQpyHMKtWqErdPczOWChZgFbfSXAlCD4jOOahXh5a 1+XKPHpMp4nX1sLhXVvzWje5KmJL27DOJbCisZdRjlB1MoY/NPmc/+zkNPMnFJUo1o2C HU0w== X-Forwarded-Encrypted: i=1; AJvYcCXf/k/dVA5tr/9V+1JH/Ykkl3dAATSZ+V4BIGNIyOLMclP9sWFbiALEcAmisbPXJIcwfphemq0KAQBhyHTxyXx2k34e6lmE7j7Myyj4 X-Gm-Message-State: AOJu0YxJqpiMzvNBJZUFxH2+5NZc8+G9cdJZYs39Y4w9NspxL5ZJCJhg Tn2N4Vfo55ZuI0JdqdQdUSA17h+82xxNiWikzJbtIXt5AePsmkR6d3kmMJP4Niw= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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_ru= ntime *rtd) =20 static int msm8916_qdsp6_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct apq8016_sbc_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -213,7 +213,7 @@ static int msm8916_qdsp6_startup(struct snd_pcm_substre= am *substream) =20 static void msm8916_qdsp6_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct apq8016_sbc_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D 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 *com= ponent, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime =3D substream->runtime; - struct snd_soc_pcm_runtime *soc_prtd =3D substream->private_data; + struct snd_soc_pcm_runtime *soc_prtd =3D snd_soc_substream_to_rtd(substre= am); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(soc_prtd, 0); struct device *dev =3D 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) =20 static int sc7180_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct sc7180_snd_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -234,7 +234,7 @@ static int sc7180_snd_startup(struct snd_pcm_substream = *substream) =20 static int sc7180_qdsp_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct sc7180_snd_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -307,7 +307,7 @@ static int dmic_set(struct snd_kcontrol *kcontrol, =20 static void sc7180_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct sc7180_snd_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -334,7 +334,7 @@ static void sc7180_snd_shutdown(struct snd_pcm_substrea= m *substream) =20 static void sc7180_qdsp_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct sc7180_snd_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -389,7 +389,7 @@ static int sc7180_adau7002_init(struct snd_soc_pcm_runt= ime *rtd) =20 static int sc7180_adau7002_snd_startup(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); struct snd_pcm_runtime *runtime =3D 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_substrea= m *substream, struct snd_pcm_hw_params *params) { struct snd_pcm_runtime *runtime =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; const struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sc7280_snd_data *pdata =3D snd_soc_card_get_drvdata(rtd->card); @@ -237,7 +237,7 @@ static int sc7280_snd_hw_params(struct snd_pcm_substrea= m *substream, =20 static int sc7280_snd_swr_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); const struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sc7280_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; @@ -268,7 +268,7 @@ static int sc7280_snd_swr_prepare(struct snd_pcm_substr= eam *substream) =20 static int sc7280_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); const struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); =20 switch (cpu_dai->id) { @@ -287,7 +287,7 @@ static int sc7280_snd_prepare(struct snd_pcm_substream = *substream) =20 static int sc7280_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct sc7280_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); const struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; @@ -312,7 +312,7 @@ static int sc7280_snd_hw_free(struct snd_pcm_substream = *substream) =20 static void sc7280_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct sc7280_snd_data *data =3D snd_soc_card_get_drvdata(card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); @@ -339,7 +339,7 @@ static int sc7280_snd_startup(struct snd_pcm_substream = *substream) { unsigned int fmt =3D SND_SOC_DAIFMT_CBS_CFS; unsigned int codec_dai_fmt =3D SND_SOC_DAIFMT_CBS_CFS; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); int ret =3D 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) =20 static void sc8280xp_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *pdata =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *pdata =3D snd_soc_card_get_drvdata(rtd->card); =20 @@ -98,7 +98,7 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substrea= m *substream, =20 static int sc8280xp_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sc8280xp_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; @@ -109,7 +109,7 @@ static int sc8280xp_snd_prepare(struct snd_pcm_substrea= m *substream) =20 static int sc8280xp_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct sc8280xp_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D 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 *substr= eam, struct sdw_stream_runtime *sruntime, bool *stream_prepared) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); int ret; =20 @@ -105,7 +105,7 @@ int qcom_snd_sdw_hw_params(struct snd_pcm_substream *su= bstream, struct snd_pcm_hw_params *params, struct sdw_stream_runtime **psruntime) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); =20 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 *s= ubstream) { unsigned int fmt =3D SND_SOC_DAIFMT_BP_FP; unsigned int codec_dai_fmt =3D SND_SOC_DAIFMT_BC_FC; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); =20 @@ -72,7 +72,7 @@ static int sm8250_snd_startup(struct snd_pcm_substream *s= ubstream) =20 static void sm2450_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *pdata =3D snd_soc_card_get_drvdata(rtd->card); =20 @@ -93,7 +93,7 @@ static int sm8250_snd_hw_params(struct snd_pcm_substream = *substream, =20 static int sm8250_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sm8250_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; @@ -104,7 +104,7 @@ static int sm8250_snd_prepare(struct snd_pcm_substream = *substream) =20 static int sm8250_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct sm8250_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime =3D 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) =20 static void x1e80100_snd_shutdown(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); =20 @@ -76,7 +76,7 @@ static int x1e80100_snd_hw_params(struct snd_pcm_substrea= m *substream, =20 static int x1e80100_snd_prepare(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; @@ -87,7 +87,7 @@ static int x1e80100_snd_prepare(struct snd_pcm_substream = *substream) =20 static int x1e80100_snd_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct x1e80100_snd_data *data =3D snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct sdw_stream_runtime *sruntime =3D data->sruntime[cpu_dai->id]; --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BD091A38C3 for ; Tue, 30 Apr 2024 14:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485766; cv=none; b=lDh26U7LtVVn0ZHJLM4D8pPSPMPWFfoFsxAHD7wFjab1NY+FoEvZeRmwPKoQ1+g+ODb9jo7f/7lX3Mb/6nuyzbQ09cuzNX0vxVOdGo6O7svb0RqFRVw+dLX0YaQt708j+Hb7Tm5acAeazcwyYx5VwN7v/UR+rkgPPEi/D27o0xg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485766; c=relaxed/simple; bh=NWayqZgMTQyhrridkNgCIJtQs25nYri5VnM17XYp3Mo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TsSJdMw7tdbqMvhnKFXf9GP3RjdkCF7bRodqgdEd3HhIzkJyUvsoKTuT+PchkU9xrz5FBl56zhmxSIlzjHgKh9zDzn9YEoOS9FY3x81uq3/0i1A2YXmzxhAGc4aNId6PTuH8/8kaC5IfTfjxxBVylekydMhCbRSf31PVM/IwnGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Mn1WoN4O; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Mn1WoN4O" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a587831809eso688576466b.1 for ; Tue, 30 Apr 2024 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485762; x=1715090562; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5IV4t0pNrZLc8K3zjbiMUiExRG0rwvdrAQLRnesERno=; b=Mn1WoN4O8pznAiLFMdVQ9Uq3Fh/qnHcV3hdeWGJS6hyk68CeSVVz9Zsr8sNGu9IQEd 2q5v86GMsTNBOTvqEfWiiQCbuDRVmi8/aOrezhbTjQR8Gd9u/dtvIFwgN8BtFEOlZVRO W3KsNKynECP2UeuzqrshDVEbhey/gzYIUCkEnND5SQD1XUlGARqDEHuUEiCNWb/4AgsF t/SWHrRyXlDTAvblEHnuuj7nim4+HoO5boc9c5QtAgGMGewYQkuTCz1jMDNDmTyvOO5+ aAPXpWf4ibW32ggUC22fiM6ZpMyUFZPEgNgvdhbe+rPm9eogY3cow3TiSwtMiQ2f2zWS KhRQ== 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=QIHGr8qYP+rmW42jVYra+/c05iMUfWSS+z379sIA5k6DOnAY1UtOnRSyxI2S4wSSKR IfrHoh6+xKUvayfYv7nrymBd25kRnIO0Tw61hbD3F1+y/OPMjjqSC8ZkORVb1S0dST3S 4mud5T3xbTGDD3OFX+5IfS0WwbYg9C9g/5O8/frDZkLyveDdO4j0jgaPqqdpJ4mhQXuk MBXOLlQjZQ67i7KqjQSm9Itu0u1EoNFwDZj7MqT42NZo0zAdWUyN2c0j8h/L1UKb/7lY BuHCWnMrynFJvf56u7Xdb0KsOWOZB1h2L871DDy+/jIRSd+LqEVZTi7Uz9rWFKKL07NA MH0g== X-Forwarded-Encrypted: i=1; AJvYcCUDQTidSE230kNehXS8/TV9D88EzI7FMZLbAmW5T/vFHVTms3X+hIGcoQSzQZ9qhwH8Hf1TQ6QysxcXurQezM5thPYIRNitdEkMrE6/ X-Gm-Message-State: AOJu0Yw52tsMCdmzPP5lqVf37xcc//9whl6jneAfwnNTJWAa+aEvnLkD zEyx4zll7d8tIAoCrcaPRgR3yzWMIkiNTMHpx6/46HSQ6yfTJiZrhb57hoT9P2E= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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_a= soc_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(unsign= ed 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); struct snd_soc_card *card =3D rtd->card; struct tegra_machine *machine =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dmap; struct dma_chan *chan; struct snd_soc_dai *cpu_dai =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); =20 if (rtd->dai_link->no_pcm) return 0; @@ -142,7 +142,7 @@ int tegra_pcm_hw_params(struct snd_soc_component *compo= nent, struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_dmaengine_dai_dma_data *dmap; struct dma_slave_config slave_config; struct dma_chan *chan; --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D9AD1A38EC for ; Tue, 30 Apr 2024 14:02:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485768; cv=none; b=Nee5/ZQ6cXS6KFewFB5Eg2ivcRi+CfHCmE7lnbsdLbzQchOHW/0W5LA064Tx1qqUZLP2RxVeHi1WXhCC/we+sduCapy2Wbin5rCB8yAniM8Q7jKjacBLJ6uctUjKvnhLxxagkFHcCjzPx7USii9ejpHjqu4A5fBHaPWTDde1D8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485768; c=relaxed/simple; bh=WaTWh6A8XvKFs+19MMAHdgA+abbpsyoPq1iDSypgs+0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WaO+6rAuDy3uP4c1h4qur/sBcUpxxd65/D1dHF/orJi5BNFFgPSqfPAdI5rC5iDKX+vdUjuvKUIZBUHi0lmYX9lyfEjH4DQ3U/NKmp0WL09ulWr55AboRX1odU4IG8EJ0s3VJJFE1wWGLf81mTQnA/pzcC3pWujiAyxVGhOjuGo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qXMUD8s5; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qXMUD8s5" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a55b93f5540so776254166b.1 for ; Tue, 30 Apr 2024 07:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485764; x=1715090564; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5Lk1lue097q/WOSyrBvWDsG60XQkpuZqlzoh3fFX8H4=; b=qXMUD8s5yCZbgTUQybhxAeNfSALWk6K0PyaISj56e0GbTkSL/slLjnMU6L/vVh+GAS z/AiY/u2BfmRmjojeJkntc1TcRWwwsi3hdVTbRN/+g8Qz+Il0kIyG/Nf3XbLfbTiLE5J m49rOVhR01gOjMAVjNh3QpWDL//7F1UGE3WEUPLU2eLDjDMYZU8D7eIraAVAatdSwqnF +flPUGA8pcfEJvE+AI8yZwyesZnqpG61BBT8cuTCkHwH0f0Z07AL3/Byl8sXFzZLX6Wh eDfr9I+9yUrJrrkFJctswfBisVEGA7/+09PyUPP6AaLBg/+svkd0KNQ2xhHVoXjCUqo6 /1WA== 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=rEbXYwmotVkFsnWjtjnL3AjhiRWHUefczztUixmv9EKLF5P3XRuyyd89mCmCiOV/2C knNx3FLZfiviKUhHcV/CBX1stn7b824C9tIcjPYSS0oMv0a6Zvvq8sLMnfLHqyLBBM84 jq085LpMAk7XgRsXKse0soeHwo0EfFk2TYNv6VLBs+YshyZ7ORhjcRGleQycUbujBINg Ovx8sxP/eim0PCxTAU8sxmgQrsXb9CxNuR2BCwXzmupW/6NJbDwGj32Z2S9sTpEiwg5s C8SMe+27W8z1iThFb+8Fv9N7Out4DyVbpTKaS0a2otrqsjpA0Kzf0//vlIKrELzgA8t3 I8Zw== X-Forwarded-Encrypted: i=1; AJvYcCXWnnMCmwNnPRyNKkJIc7AdkEgr6XqjW360o9hLQGB0we1n+6LZzNw6AvvJEg2CwIqw/o9wsjmHqg0lpO3rju+dAHpe6U8qUeFeyynV X-Gm-Message-State: AOJu0Yxkw6ri2EeK5KmOYB9QNBdMekaSJbrZfZf+HuAgDA+esIxIAJ71 wTtTj+9KZBGFyMMY/71J8juJXGTPwpYs+r+ezhvFbuauW1m1twyqNJ08X8W8b4A= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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 *s= s) { - struct snd_soc_pcm_runtime *rtd =3D ss->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(ss); =20 return snd_soc_card_get_drvdata(rtd->card); } --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B61821BED60 for ; Tue, 30 Apr 2024 14:02:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485770; cv=none; b=KUWMSRUmfolfQwRT9Dla2HS4zRWJoAd8xfOsEkooGWnpe3jLeW80eRB2A0plmO86SBgEffFfa1cs2YPnFwovaDqIq5csF9ZikCN25EwCdFKEBLhLUYNFoSc9Pr+TCAnqhfiUdh7UiBUya6dpyUSjdcp/a8vMH39D2AOj99u3Cfw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485770; c=relaxed/simple; bh=eDseprbctVXAhiZOvRsQsRjQ1srjlolDCUwu7Poiuqc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qu3yOzliOEsrkqzXUqTdJNxZtjlZFSjStCwjoQIz9fIb5I+qEAvhrWNPBrLfu9dOhnibmXrKRKRrMGbEqGpSqL+C8xTHUIkxsnObEsRrmwtkM3YxzhJQaK0D82r7jCACFMvL8sHg9ebwis87pIULsAoFzcdpMv6goKQnwS7WuPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JXuJ+FY0; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JXuJ+FY0" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a58872c07d8so1172672566b.0 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=1714485767; x=1715090567; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sVmB3IwNsO++LEmxsGA1Of52OGeiLTZOoIEqlaO4Y6U=; b=JXuJ+FY0c0lAPiN6GB2Bftfx2yBNQjdDyx2Vqhmu6/+risPyomjPYAhmOZJaa+3BXb iinwmCmGuEc4H/bqmw8lVdKGp2ePsAiQpN0iwDpHEygvh6TNvCvENONKSpDhGAgIxNrY wFTQ65p/NHJmHOQXidyMw1wib/2MSYOe0K/5WdnQgGcbhYhNbA3tbTi89PG96qo3th6j rlGFEpsqsMPDx0M/hxv9VxJ0eEKwE5yyxTuGJ6MTRqnPqKPkLN+b7H927IOXsTIGCJDT SfOjkWLYFZ03yy5aQRkIzYZa70STynBdeopSugN5jTUjr1FWxt86c3Oxxe6jvSRwHZTd p9VQ== 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=wvazS6sj6UydD7Bs+9lq4qC8bhXYKxny63uZo528vipgQXxuAfXpVX/vREpneODZIT Jg4wSM/mjG2zVD0bCuc+GNFWQEUMbjjCvULy2VCtV7iHrz8s4PH7r+00C7+UMXZ/I37E ansapMorFI4idjHgMuGiCN2DPPRCIs+VkLeBKKZfIFI6j1evK7z9Yhprx68rgX5HPom8 /6QUvqDZE4YVP1ONN5Wz2wK0QLvbyjjOKrpMstC6jdiCOD0Ms+hTTQSofTjFZM4vWu11 fAQRaWCvxqBoEQU6R59Wk3R3cBgYVo7amzD+q4DIf2SiWtNPwWVD1SmROExLjGBQ9B43 XI0A== X-Forwarded-Encrypted: i=1; AJvYcCVZ3H9zQnEZa/DShIq7iFU+OD0End3nQ/DuQYD3nrCJeX8+8JkY9fgLrhTMFbyFUxvw75WFpm9pYBM83J68d3MHNhmcS0ydw6DgmIvZ X-Gm-Message-State: AOJu0Yxh/A/Ifgu0ofubM54pIHtHHFhGOGOTymXT5fgH22Wc3W33GKzJ MrLGX15G0BuoC0X3PpW8up9NISKRgzUaszMGcWsL+9PgOk8NbbYBknWI37AtZh4= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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 *substr= eam, struct snd_pcm_hw_params *params) { struct dma_chan *chan =3D snd_dmaengine_pcm_get_chan(substream); - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D 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); =20 int pxa2xx_pcm_open(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime =3D substream->runtime; struct snd_dmaengine_dai_dma_data *dma_params; int ret; --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 764461BED60 for ; Tue, 30 Apr 2024 14:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485776; cv=none; b=f9drTfsn5cdWptPponDRoagbUxFOseAZbI18SIxI3YkkBr2/nBguGwE2jkyFdz+Dmej3BG/I4qHedWBEMgaNG2qK/YFDBD8mr4Z+UqTEG2feBWZTGq2MfS4D0dNj9nJOZ001ndo+Zo1/8+gpCQFlUEY3jnqVZfGo5fxgHYeh2cY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485776; c=relaxed/simple; bh=/1R0OmMKMV4s3Y8w3vGDBextL0ongiiaeIRyC36ykHM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qGnY9DBcTJU1i8ztsBe9DnC/E7xqTLY4YVslTKCUolyLayZatOZImyq9GuRqjMhZhQy1ELKzasa04dx1Kj14Ccf6OKb1vkanZGlAMi6QAb1sOyFGLICmEp61W7aKnoAHOlMOTkH5Z1DSImtJBc8ZF7grlqaCy4B8iX/JWS5kSEo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PkdghBtS; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PkdghBtS" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a58e787130fso533422066b.0 for ; Tue, 30 Apr 2024 07:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485773; x=1715090573; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9KNDmF6F3m74+nDreAw5/fBepQ+vGW6wvqeA9DbjkOo=; b=PkdghBtSfxb6D0kM3kA5TqNWNjay/dLOsOHrlOeuvvfuZnHgFP5ZrTR/mgNPXnLrk5 0cLossExspN5NSFqqDFgr17Q5fqpwVN1GiiW7il0KR8Rin1fxLOJ8lrGObyfXPiPd24N 2b4dJgHlkim19fhTvSEK/KUAbdZZHf/mZ8+74+Gne9+TaSyJ/1fG3agbw5rPzW2TDtim HQ5MxciIgDZYm0OzqRMG8j9EH4yx8YCA8FYsz/9NmOsa9WJJ1rd6o7eKFoA9rAF0/m5p G1Im5GcpJ9TNwGAOgi5PUlJMdyCAFgjCREd1dao4XL+gWY4f09t610QR3vRcdrAwO/9p VBMA== 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=jkpHW1NrBkt1XVD0r9KigdPANquu01ALwsrrMWm+5oyrjwEwznFbwNsmPGPkZh4rXS OqXr3WZj5G4LignNH9531hUgD40Veccv7sSXacxf2kHjeP6L2Jw7BHSYQaI+8T0Im52C 4eTex4qpKf0pHwpRSR72wIhmgO+WvXm2DnED6nNyZCWnaLUTwZMCRqrI9BYTn1Y2sK1E hTtq5Yc+tiMkrjT4nA6A6HOFJnl394PSxyz41U8Wka5qHPESGVZlsSWuj0vEqQKZpcRe 5aT8DNwafQ2+e1o2J0/LwOnzkiklnJKEduiCgoyVH5QhX2JzWyzmgNc0eI1l86uP+5gX UAcA== X-Forwarded-Encrypted: i=1; AJvYcCUgAx6+k1MYLQ3CPPPk7+NExFiojJ+VaBOAQjSMrw8QWZhMOwi9byDppkDsh2/tlA5WzPrSgzuY/fl4GfmxOXbo+aJyqZ9gIzExZPWS X-Gm-Message-State: AOJu0YxljJ2/KzIDdVTMHM5odZozFNTN75Dm6EPOwPVFkxV/LWVGNec9 v6Zhh44xVaoozaYr7MsCw4CCrcRKPcgy9dCbtNiWa8aH/oHa6tcevxnBHaeDjrM= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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-ma= ch-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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct acp_card_drvdata *drvdata =3D card->drvdata; struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5= 682-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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; int srate, i, ret; =20 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *prtd =3D snd_soc_substream_to_rtd(substream); int ret; =20 runtime =3D substream->runtime; --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FE19179956 for ; Tue, 30 Apr 2024 14:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485781; cv=none; b=RZ+FqQtvnAhMHmGTbnaAS+0NNxZoQgfYClf7tS9FF6eeoE5npD3u/OWct7XwAWQ2yl4tT+pBUGXyy10rGQqM2BiaoA3D1yrTJqJKEhU32fJCYuqV6ItsIp9GCw+0iJzGz7BBdHw+j3T56SCIPnKCbkS04u+x6g9uaUrCq+BMQso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485781; c=relaxed/simple; bh=ucjMMVrCkGueEU7NLLh2sAE4bDhfGS2t9ibvgfiZuqk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b+V/cXUu0nHZ0MvhYwL4THg0aoAqwC0eA8ihKOk8BRB0qFWPte/j3svBHPBNQSHKTEnx33kzbIC5tUtOiZt6iX+VlxN6537CVJUYU/kKGVS0eDGiYI4RoqlpT37MzOTXEdZu4zvq8K9INfcJhR4gyriFkZNRS9RoMthOkbOcx4I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WLo0YXhx; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WLo0YXhx" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2db13ca0363so91886131fa.3 for ; Tue, 30 Apr 2024 07:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485778; x=1715090578; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YNgLEZpy94T5of5dDiteuT7S3SOS839FWPGD9Oz3+lU=; b=WLo0YXhxs+89zUa1nnsMelZjTBw89jgfn25QCZf2YnTAVyIdcNxNVH0Lma4iVLDHcJ DhLNuYoI/GAt3EgQ5AZMBC8rqUuIO/Dk4/cG6WECZUl36U0WwldPMmPgzF2jH+GAkmpI SvJmpuui+1JvkEyvj+WAXNdlzfphHwnD0rLW3/vAPw3x/w/RCWHca8AmyJSgODxpRhcV 7hgQn31zseULhu7zWAGPatUnxULYkPfKinLrpcVbgeIb6moT46mMmbZHL85vNe/VMyHr LYCZCUa/1vJdRcEvJArRtxFzHklUSJU0KO091k4H2S5wN41ap3Mgh3ldVCFOsYe6BuMC JTlQ== 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=EEYpK3VHugM3TBkws3vdl4NbXLz8cYfi8t36T92eN+bkXUobiet48fkXh2sKyRNZDx zNPPCuLGnYDKSyX0snR3j+eXxEhFo/maSVK3mTHA2eMnEO7JZZlPK4BGoVuBzWJEICk+ dE3F8CVlv4RL6ElzFV3CwN0s3QBPn5J2RBvEqAYQb5TaNJtygnRHvyG9B782bCRbhSyP 4e3W0twTNJmMfrOStasdL2B7xeKm7TNNhcRrLM2XeC8nFxIgVXFfe46bM9IPNg0GgoUE A+X7CF1YJso10SOnEqBeQn1qAJypbhi3VyM9vm9WD4bB/bFJoocDHBFVkdecWWjw2DxG NzvQ== X-Forwarded-Encrypted: i=1; AJvYcCVDPYhOPlJxOUgV65yIcsQyOVDKoWBd9h0LC9cl+EdBNMebNB2m2vhZRroIY+luZqyhm0nPplYXEYs7PmYwPNCdb02+fl5kfRiIOHOB X-Gm-Message-State: AOJu0Ywl4agP7Xb/KsDKFx/8OcuJr3pNhJkhUlYarG8vQwWh/QuYpjjD IK46DvZcBeQ67vC9A+ex8NLMRB+kn4XMy6uRMHtzthGlFPljeOE+4B+91/Nc8TA= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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_subst= ream *substream, =20 static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct fsl_asoc_card_priv *priv =3D snd_soc_card_get_drvdata(rtd->card); struct codec_priv *codec_priv =3D &priv->codec_priv; struct device *dev =3D 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_p= cm_substream *substream, struct snd_pcm_hw_params *params, int slots, int slot_width) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct imx_card_data *data =3D snd_soc_card_get_drvdata(rtd->card); const struct imx_card_plat_data *plat_data =3D data->plat_data; struct dai_link_data *link_data =3D &data->link_data[rtd->num]; @@ -289,7 +289,7 @@ static unsigned long akcodec_get_mclk_rate(struct snd_p= cm_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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_card *card =3D rtd->card; struct imx_card_data *data =3D 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 =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct imx_card_data *data =3D snd_soc_card_get_drvdata(card); struct dai_link_data *link_data =3D &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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct imx_hdmi_data *data =3D snd_soc_card_get_drvdata(rtd->card); bool tx =3D substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK; struct snd_soc_dai *cpu_dai =3D 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_compone= nt *component, struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg =3D dev_get_drvdata(cpu_dai->dev); =20 @@ -461,7 +461,7 @@ static int imx_rpmsg_pcm_trigger(struct snd_soc_compone= nt *component, struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg =3D dev_get_drvdata(cpu_dai->dev); int ret =3D 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 =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct fsl_rpmsg *rpmsg =3D dev_get_drvdata(cpu_dai->dev); struct rpmsg_info *info =3D dev_get_drvdata(component->dev); --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 850AA179970 for ; Tue, 30 Apr 2024 14:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485785; cv=none; b=JEWvgwCcp/AtJU1ph24zlaXW9eG9V0cedDb37rDu6MqbufLRIRjO/YfO2IybLd8lV4h+CKxqR4Y3tKbrXASbI14UWbq0t0milAasiscmK+0Lw55h0LVqDNSNRYjw/V2W+t9tw+8zIB8VyThnquZvEP8aZYUa6KwodPwBqmUljgY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485785; c=relaxed/simple; bh=ZJVoQsuYVbU6eX1WKifNhQyvCwwvs/Q4umjN6N4+yu4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JciBAl7HM4yWtMT6bLW/GFFqA9t3yyKw0qoo6BYyuo0KF4WzFdOfXWywX4+4u4U2G/+ZllNyotRlnAp5+a0rtyb+9wISNBtFdQzUiJpBqlRDNG4KwUrdCEv6ogRbNf/CQ6KyoYIHleuRDbSBXpJUl/cCkP0p2wNMqluoB89uL4E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ldtTebgW; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ldtTebgW" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a5872b74c44so646210066b.3 for ; Tue, 30 Apr 2024 07:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485781; x=1715090581; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8wnYPNchoJMJHPXPE9uqd4IXLQ1+2DNP0wbgQTer3qE=; b=ldtTebgWlJEzlLX5URZHyCeDlBnLJo17vVkTKPqhfmAzHM0S6AMjXqnlDPltjsOQMq JrVRkUUv/AiQ+FU0lMwKViuNVZ00cMd5W8NhR3Ab9dmNCPZ/9MVoqCw1n/G6GMfjp/Ec prqLaFJ4tZrWJXFR4vAQxLUvq4Fvk6PqQoEqFTvFZTXp4upNrbpcL6j1NLAtjbcgV9mr 5xyIiDDZTs4QcYSWRODOKRqABrkHrWeK9b3Vn2wBApmupjVhBwpb36eCvi58HZBMbZSD kSStiGAM1WqLfYMk/eg2fH+ud+ULPLKOk1/Leb9ijfkE+cLoXmuGDDintLheRTDy/kEj oiEA== 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=vK3CcdQjBdJ49flnEaZd/nxsoRPQuZFexCM7bbapgMawhk9VbaKmq3K/tJAgJlnsOY /kW1KaQaPGYkOcUVg+wfLhc0aciw5D925rsVKKCKMvjNGovoVazCjAFQClT09Am37Rcg 5KOqyzNoFjIv/gWnCuTg0PrqyKGV8uvfK8us3QGP5iKzXIX2G01pYf1CBNehQHrm8Fqw vrCjXfUPEFxfCjH22awxb/GKOwh1LYWkMoJ++mROB8g73HtjHe22MI7wcUg6jcT2V6sG 0iJQym/wkkLzvvfBbFUp/wMcdXCsckhTGovlBecZNBHWwqGSv4PtIuOie9Dyw7mrxWLa d9ZA== X-Forwarded-Encrypted: i=1; AJvYcCVLMZgTg4CjSyU10FekNMtgcHX+5AOK/XnBqKTiUKQJ1rSJue3IiwQGRACEcQHIIi6SMr/e3mzgv4qtbzytD1QYcMd3GYXCkPkY/f/d X-Gm-Message-State: AOJu0YxpsmzXtiSqUAfQIUcNHLl//BcTuv3P1iLEzHmPgvs3KgAIa/rs wrEsSOMuHbwg2czB2z9w7TSChRAXbvV58b4CtmKbQTfRnVX4/glSLCzA/T/TsPE= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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 s= nd_pcm_substream *st, struct snd_pcm_hw_params *params, struct dma_slave_config *sc) { unsigned int i2s_channels =3D params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd =3D st->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; =20 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 =3D params_channels(params) / 2; - struct snd_soc_pcm_runtime *rtd =3D st->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(st); struct snd_dmaengine_dai_dma_data *dma_data; int ret; =20 --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6FE41C233E for ; Tue, 30 Apr 2024 14:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485792; cv=none; b=p5Uq2DPxNFdch5IKESRRVtwxPf/hUAJPjeHEtf2/lFIXZIq2X2GcuAWB2kkXwqtLnaJsqBAepSCJnG20h3I11Na3Ew/+wXyJSDHl3dFAD9g4RdmEfr3Seopjjhnc2VZkUBjRSP1VdM78pGwg2k1mYwoEEbM05ltryrSr2XMnzz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485792; c=relaxed/simple; bh=XOQ3D1Q+qL3SzysXsYcm80LUwBWHBaXzmlHz6/Wj4iY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ifi5aPwRhlCTGsZUCwZvl1JkKSmL9ODbVgZC6qX5FdM5tKb1I0BgwUIIrDhjoHXLDKFC5+anUei8kuNHTC7BTTzFFh+Q74vS+g1pNtYU7Q0aLJuUcbSSom/dwSagi/Mq8fQfffE+3LjvW0VajLCGEfwxAdvFcJy1M23r/sLnQXs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=POFKTWs1; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="POFKTWs1" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-56e1f3462caso7438373a12.3 for ; Tue, 30 Apr 2024 07:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485787; x=1715090587; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xJJbSwuzaR0w7NGJdc7U0qNxw71mhhvz2h+n/8bje3M=; b=POFKTWs12Tc02ab3xQdrltXnjezd8qZowxHju4xh8sOAvreJlbZp/nFZDi4H2rbj6U 5DB/J8LnaCZC58y7iO6PPeLTqv8Xn1R/XC40jggUPo2zh1ozO/w/Rmai3c54meLWZftH rb9bYWn9s3NVXqVk78WkLrcp9lCMoGUHkqZka/5x+lJolpqVqOaUHlqgeVnBzHbYSbWs vtXrjyFazTXYJVQYMMWByGYWcbdTWg4mhJKxtXc13VKYMegNICZWQBUnkF4JN9PNtTXF xYh76YA8SV0dESMeSqr+/fVMheZM9L4mua3m/Imu2WFvpAybvusXkFEbdNmGJ9iSXpQ+ 3bzw== 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=uE6H4axRVgz/SZqErBgKRl6U7luEGzASoYFrFtXXbsphqUAl4hvV9b3RCT2LM6WV4L y0mNETn86w0ux7gLuM37ZsMV8q0rZmJD3p3D3R7z7/k/zpjsL7KXYySmM8j/SJuaxX+8 ZJz7WRRyAF8XD6JTAkVFWCCtElMWot6h9fyD2XEbBB3henlLj8yG1Xgjj5AwulsolyQL GwY2KD/8mkF/ArZlkUmWGSDpeygOuDM+c/CYtRCfWE+Q8mcCPWMRDqqiwC4df8REsBlR vEOOcBvCm/2+GwbGrTG5cv2pr0rUYczSYTM815RoEytQdaf8K5nwO/D+SFFAaqkvsTAA egvQ== X-Forwarded-Encrypted: i=1; AJvYcCVEd1XwdnLThb4c2a7PkMvhf+jyg9LdEBhzE/wnGUTOTNB/yjhWUzAIhy44yfK9wXwI/o5eYWUwi0j2QyDlBqAOakSq094CikZNMVYN X-Gm-Message-State: AOJu0Yzqgu8M2+WMyUAwd7VBeEExabw/2JIGD/RHm8EA3V2ejpy5Ekz4 On1N92tIoKgm1tF9aJCHQC3gBVsY5ttYTAJdnd5DfWL45G89K5I59HmeoKvFkOE= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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/kirkwoo= d-dma.c index ef00792e1d49..036b42058272 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c @@ -19,7 +19,7 @@ =20 static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *s= ubs) { - struct snd_soc_pcm_runtime *soc_runtime =3D subs->private_data; + struct snd_soc_pcm_runtime *soc_runtime =3D snd_soc_substream_to_rtd(subs= ); return snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(soc_runtime, 0)); } =20 --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D7271C6890 for ; Tue, 30 Apr 2024 14:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485798; cv=none; b=n9k338zFl+J+LgNcqJWl7CGmpvJhGmzA8xm4JbuQlxvntxujwX4UYRAud3+nJGdoVP5DfVOJ2Fu75ROdgEN303aY1mxVUvwGuUnAVU+Lxp/1GlRCa9xgd4ZnfGJxyyJ+FiFhHNWFtqGb/1qSXlXF6aFyU7pXiAV+B8z9jYsGeN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485798; c=relaxed/simple; bh=b6kuGLsh7Fncnab7O/x1sZHKoAE2to9yOPoWLkFWFoc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LpIuy30eo9fri10esonn99+MqSWB9aEuISrnA7k9nyf4yJBagD0NayVRpS0udNVu47wi4B7ZAGaeMeOFAQ6HxXIBxfhscWasuAI0l/+r1bmXNqNWoDioX8gmNulX6kWH5hflpve0WOWZPonlsP2G16/h0O2/ZVVjzhcXRQxgUh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=MQ+wKUqU; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MQ+wKUqU" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5176f217b7bso10096600e87.0 for ; Tue, 30 Apr 2024 07:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485790; x=1715090590; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HMdvqht5zOkDrEgl++6w26ILXUpiKeLdEJgBolPMUp4=; b=MQ+wKUqUdmLOnrscMQ93jwOT3v+vrGXhHU6ngSRsvl7AHAoP0p9nLGueG7E10QSF1Z zUSeVauiHVfgFmws6/3oJjlRtgphYI03syDm/88ZseTk46DuDTACeU95tL+UhTgDFEnJ QBUWXS2ND5dHfogFpWMWRd+L7xqaBbTEqgtnXSDtcvvzJvqUDLm1HFUHbUfNfj4RHXIB OyJCIttnfo3u/CZlRZfstz+dF6+PYC0gH5PJa0TXencg66snkcc+G4xEKai3AAcUTnVx 44fH/1rzWdRF+X30i5WwtAylxZyS5l34k5iRgL5140cu09kONKKOsaaV0UbKdnUN6W7C /Rhg== 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=F6O6tEnDGeFQ3owP+9R9pcC5mS5fFF4TyqDH0cVFe2tOC1SyTaiwYpoAvOB51OrC9S RMeBaZRlcvkM0VoxXonPnFKRcyLgIcwYJ1gQYvyjLFVmN3CRL0jUMUSe+0VTVMUwWFGo 670nJFKdqO2FvZD69RR8mIfA0bEmZfwQA9Jr3wd1eRAmxzogJnVMYZsdEwr7iAFAhnAR xruZ12k6+rcWtf4vg1S6QQIgFord7d0KR7lrkVynY18+jNqX0IyenoxhnWeJ6lz2G0Ra yp4kIynOyE+qEI4tx+tg6TNJpAlmgNgPLHbM5o2Hh22SSfldQFfoO3Sy2mwWSWqwPVMS O3tw== X-Forwarded-Encrypted: i=1; AJvYcCWhPQGF6HOXFuxDq8qeSjv04KZBMkvau/A1evqWNQTao5ldInGnsHbV+c9XBcLrjITxq6VmN4Jr5Wj9BPyVZ9unAtG9y3pgz3l9/owQ X-Gm-Message-State: AOJu0YwzYIglxVv2UXZpQcwqSTpTzxvYblLfnRhg80O5SDVk+hlxqWjT vfdrVRp6r46Tybp3QnyTR8CnMgdLVP6n1TavAkGAn7Ru86f7WeDVgMObZeyWez4= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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/loongs= on_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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); struct loongson_card_data *ls_card =3D snd_soc_card_get_drvdata(rtd->card= ); diff --git a/sound/soc/loongson/loongson_dma.c b/sound/soc/loongson/loongso= n_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 =3D substream->runtime; - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_card *card =3D substream->pcm->card; struct loongson_runtime_data *prtd; struct loongson_dma_data *dma_data; --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B83DB1C65E0 for ; Tue, 30 Apr 2024 14:03:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485803; cv=none; b=Q1qxQglkslbxSLwKtWmrfbIN3MhalBpVS3+J9DYgauW1o4zNfFADk9ycm8aDGW9tVGPHwxYU8CdBx+0y9lo6SylngIa9ZkHy8/oUqf9v1zpdzHRZGKe6PGdJV56UXdR6vORvdAYpo8eyMCANdb64K4GEgTwkaX6blh7TGW8FhdI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485803; c=relaxed/simple; bh=74+WER8rBVNChp8T011lJzusbjvdwfTeUc05vWQCtnc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=llKyOjynDVgr8lX1WmAmQSayMF1N3Msn90PPiT5hc/3p1rYs9RukAFEoEXDw956/sxafMlWS9c1FfxvwSA6kquIIUmLNrlLZdRpEGc7Qow+Rav7c12kOI3iiUr3BTsoFjn/TqqfjVfUzE9YlnZ4YvA+K1F+sHQ84k0RxwIPZiRs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JTHWtZ9I; arc=none smtp.client-ip=209.85.208.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JTHWtZ9I" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2dd6a7ae2dcso91592201fa.1 for ; Tue, 30 Apr 2024 07:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485795; x=1715090595; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HlReh/uKfKGykX7vYGkVx56/1oeqm3j6UBVK+Qmhu9k=; b=JTHWtZ9Is89rHkLNyHWxYkSfcM3YSZF3xxq3O8gQAJjs0/A72TDfD/HKzEsfJCmZRC yWQPIJewU5IcLTQOvX2KCnQfPmk8gBLLobgkWaWqWBzLSunRqz/FDu0eNbMy35zhqAcN nUgKfhB/HZr2oifdDYrfIwpU1InitCl7l69AIqoZgjN+FGSXqG26fZuchwTCYhvHYiIv pGJ4mZM16GTxb6jSktCx+rrBxWvfM7Z21CbnLHXg1oWikao6Isf0Q0G4JY+3pmKDX4+b hvOmv3R4NI1p+I5Q8zJnU0+7dT0qbeTbI3fnKQl4zMVWS7bLeykgTbnMpW9nb/ne2+9l suTw== 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=xIV4lXp++LHghDGZGNB/kECZNz23SXUh5Vnqd4aXXkMKvXi4z2AR09+QRj8oc29vTr 3lxDBcp0QXEFGSc64RNPJogK/pDCS9ho8Kib+7J1O01dgxFpbBgAdAbiD6KocCZv9/e5 hGfX52QbDZK9QHDDKIEa4hzKMHj957V2zOa9u7ImC6xUmQHFtVmmT5mRluF4am1SwEFI TQYyq3/1qHo+ZpxsC8h5I6XIVUc3hmqH9GNfTHqLN/P8NUQnWQZXPRhvH6WRN/mnDLOV 8bIdKKdTmKx948zsS2KvGg3fzV0zOsz5s1p4lqRmUbWEucNL8qLcHJ3+0JsmBq4mIFUA z4uw== X-Forwarded-Encrypted: i=1; AJvYcCWHNhNheQh2pzq0dvcEx7chkE3ky3kZT6sgBEtcxLni4G3ZPuhdJSpO+xYMMaYy2bpEJFFD37msC60ji63k1ARRm7RswPsc8mGGJ4lF X-Gm-Message-State: AOJu0YyddPFfJieuIViNPA4LPyDJ/PQVaUlgwlxM8dynVp5e9drnlNjl gQ1WibdK8RYa0HKSoTVfD0DtrasryNgAVmj2/kGzEbH+sfe36ztZNsLJBDrJCZg= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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/mediate= k/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_hardwar= e =3D { static int mt7986_memif_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D snd_soc_rtdcom_lookup(rtd, AFE_PC= M_NAME); struct mtk_base_afe *afe =3D snd_soc_component_get_drvdata(component); =20 @@ -116,7 +116,7 @@ static int mt7986_memif_fs(struct snd_pcm_substream *su= bstream, static int mt7986_irq_fs(struct snd_pcm_substream *substream, unsigned int rate) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D snd_soc_rtdcom_lookup(rtd, AFE_PC= M_NAME); struct mtk_base_afe *afe =3D snd_soc_component_get_drvdata(component); =20 diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediate= k/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 = =3D { static int mt8186_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); struct snd_pcm_runtime *runtime =3D substream->runtime; int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -82,7 +82,7 @@ static int mt8186_fe_startup(struct snd_pcm_substream *su= bstream, static void mt8186_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); struct mt8186_afe_private *afe_priv =3D afe->platform_priv; int id =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; unsigned int channels =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime =3D substream->runtime; struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); struct mt8186_afe_private *afe_priv =3D 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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe =3D snd_soc_component_get_drvdata(component); @@ -269,7 +269,7 @@ static int mt8186_get_dai_fs(struct mtk_base_afe *afe, =20 static int mt8186_irq_fs(struct snd_pcm_substream *substream, unsigned int= rate) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe =3D snd_soc_component_get_drvdata(component); @@ -290,7 +290,7 @@ static int mt8186_get_memif_pbuf_size(struct snd_pcm_su= bstream *substream) static int mt8186_fe_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime =3D substream->runtime; struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D 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 = =3D { static int mt8186_rt5682s_i2s_hw_params(struct snd_pcm_substream *substrea= m, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediate= k/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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D NULL; struct mtk_base_afe *afe =3D NULL; struct mt8188_afe_private *afe_priv =3D NULL; @@ -300,7 +300,7 @@ static int mt8188_afe_enable_cm(struct mtk_base_afe *af= e, static int mt8188_afe_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime =3D substream->runtime; struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -334,7 +334,7 @@ static int mt8188_afe_fe_hw_params(struct snd_pcm_subst= ream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif =3D &afe->memif[id]; @@ -358,7 +358,7 @@ static int mt8188_afe_fe_trigger(struct snd_pcm_substre= am *substream, int cmd, { struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); const struct mt8188_afe_channel_merge *cm =3D mt8188_afe_found_cm(dai); - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime * const runtime =3D substream->runtime; int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif =3D &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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); unsigned int rate =3D params_rate(params); unsigned int mclk_fs_ratio =3D 256; unsigned int mclk_fs =3D rate * mclk_fs_ratio; @@ -658,7 +658,7 @@ static int mt8188_dumb_amp_init(struct snd_soc_pcm_runt= ime *rtd) static int mt8188_max98390_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); unsigned int bit_width =3D params_width(params); struct snd_soc_dai *cpu_dai =3D 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 =3D { static int mt8188_rt5682s_i2s_hw_params(struct snd_pcm_substream *substrea= m, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediate= k/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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_component *component =3D snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME); struct mtk_base_afe *afe =3D snd_soc_component_get_drvdata(component); @@ -281,7 +281,7 @@ mt8195_afe_paired_memif_clk_prepare(struct snd_pcm_subs= tream *substream, struct snd_soc_dai *dai, int enable) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); struct mt8195_afe_private *afe_priv =3D afe->platform_priv; int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -310,7 +310,7 @@ mt8195_afe_paired_memif_clk_enable(struct snd_pcm_subst= ream *substream, struct snd_soc_dai *dai, int enable) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); struct mt8195_afe_private *afe_priv =3D afe->platform_priv; int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -342,7 +342,7 @@ mt8195_afe_paired_memif_clk_enable(struct snd_pcm_subst= ream *substream, static int mt8195_afe_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime =3D substream->runtime; struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; @@ -380,7 +380,7 @@ static int mt8195_afe_fe_hw_params(struct snd_pcm_subst= ream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct mtk_base_afe *afe =3D snd_soc_dai_get_drvdata(dai); int id =3D snd_soc_rtd_to_cpu(rtd, 0)->id; struct mtk_base_afe_memif *memif =3D &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_play= back_ops =3D { static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); =20 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_p= cm_runtime *rtd, static int mt8195_rt5682_etdm_hw_params(struct snd_pcm_substream *substrea= m, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct snd_soc_card *card =3D rtd->card; struct snd_soc_dai *cpu_dai =3D snd_soc_rtd_to_cpu(rtd, 0); struct snd_soc_dai *codec_dai =3D snd_soc_rtd_to_codec(rtd, 0); --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D07D1CB302 for ; Tue, 30 Apr 2024 14:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485804; cv=none; b=N3QIVWEjBxP8/5aA/qElxFpNS9hqXMCUdqcYY/Iwd+/2buwzr2H7sjbbRgyvMWG7Sg2JEAlUDf6JHqRPDchOB6+TmrVNPDhhdYEW4j+mb9E5p8zsepDSzcB2qGdGMiXoCBBLUVGv9JeylYs3BYVo3kspYJ08a7M/ll/StYefMxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485804; c=relaxed/simple; bh=2L2Sd/bZA9DPmGMKb1blU4asO9ABeFUMOyqlFuFMjDE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U3wImXmK/7Q9k0WHGwCTg/8xZ8PbDlspjRDH8ZRWU8SlvKes5+rfTpCZDKmTTJzTZzv/kwraSMEhkZHSbLvK8VFApILav6KhWBWMXsM+t4LREeOouF+APBHCagwFZhPk+Zc3ISfPeU7PdvHJ41B/zmkTjTrgfFJ5zLsviEZ+nwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ovWkDryA; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ovWkDryA" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a55911bff66so702928766b.0 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=1714485797; x=1715090597; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JWJR2WoIWwHgA1WyLmTI5AFP9P56iC3vbRDROZEp3Cc=; b=ovWkDryAi9hNgXJLkL9nKOPjgHzI2OsrE9ChwGtFoQH8etYJaloV69GO7bJB5xJ5wm LWNE7rodEUJdNML+5kVwG2B0Rb4Ta5vk4pkOkn5WTOWAh+NNQz/L2lghkB6uzUn6C8Lz rQl4tbZoMdBJ4Uiu/hPK34rgC7KlISVxRSNzQqXzUkZ9TEem9pltgF0RJ+XEvLadXO3x M8BoaaIhI/yb3U7hTdlzjnZiZ7u1TO0bUEdr/J6jujnIrog6lWIjbspoV3o30q8GoXOl 8RU0wmehf89UyXy4e8OFPy2xHT++nev272joGKHSIR10KGxnrkjnVM6LnZL1wOnsdXPd qFZg== 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=vAJZfHGGkrrO1fUjj+St+d5okkYNz5yEB/6E1Uq6mJcHbCzaesjKsIu/moUpTbAGOc W517LNKOdZZwaHm7dPQk0h4H+wYu5+IwiK6iqhMxUy1RWxG7zoYasmbwu6FUl5cbeEjS 2uUazDfLfeC/OUWyYb1cyG+K9uijZN8fiwnvUKtEMLEepz15zjRjvaufsvLYq7y9TV1u fMt2w6jIxH0hDUzsxeSlLhulY+GdzM6WW7R2hHAq16f4pjZcyM18Vq02LMp3xPZ2fwbl vNn0a8LaGls1rbFa0f7zt22RK5GgFNIz0k6+SAW8RIyFb8r410dXPCJelk5nun7Iu7u5 Iv1A== X-Forwarded-Encrypted: i=1; AJvYcCXP3qfNsUpZnWPbhbgjUEUsM3hsyDDBaDs2QwN/+qQkV1/xYmTB5WvQA8PW1imEOgODOgKgePrKVO+jLD2VmimVpMzkSe0gnVhRUjhD X-Gm-Message-State: AOJu0Yz2rT4WCvrLwm5w0G+7b9b7Y6MW4dpn2Q4RwX9wyl88fA6EmMM/ cfR6rqAwAYQ2KcvsXCIgXuMhQA0lrdr6yVERi4xec2PDd9AAyrnBhMdN5nroKCk= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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 @@ =20 static struct snd_soc_dai *aiu_fifo_dai(struct snd_pcm_substream *ss) { - struct snd_soc_pcm_runtime *rtd =3D ss->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(ss); =20 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 =3D { =20 static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss) { - struct snd_soc_pcm_runtime *rtd =3D ss->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(ss); =20 return snd_soc_rtd_to_cpu(rtd, 0); } --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AF1E1CB335 for ; Tue, 30 Apr 2024 14:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485805; cv=none; b=PzULZ9awNdgbzdFLlVrCCLyvr5RcHXYpVOyAoFaA7Qn4dPU8FIIw0GiDYlLkanPKMS0Fp+hpmjSmUZFv/62mpJ52WR33IjXkun34qVXS3rhM9k8l8dhYSq18Y4EsnCgK+zXUoUtjxOuLVfXrumZifgpfCD1QrRv48TE/D6V8qnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485805; c=relaxed/simple; bh=s6T6qKBmGyM2bmAZfxmnWfBAOCON5ixd+eIprC5zOI4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nbxVWn8BPqBCsx1RHn5apmAvdQFV1n+stuzRkp1tWfzO2losg2kGceRqjt7sxzYZiWzxJGe6zSzk1UnfbASuusCC7qT/AO3T7o55hWlspRXY8LVv7B0EBRCl5CatujYBoTjoymemP+il5dlrYxxqSHqvAYGW0e2tcFnBmtrQ8N4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SNbBSLjc; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SNbBSLjc" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2db17e8767cso67516241fa.3 for ; Tue, 30 Apr 2024 07:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714485800; x=1715090600; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=iPEO0RWAvqMjT0IhuA0J9gOKQsCIQYXZsdev+OBW9Pk=; b=SNbBSLjc1VVziqzGuW+J6hTjz5cJCqdtjKDK0HRpuiHyqTQLAZVOtn20vppB1ukPVU XsrSsqBsWFkbZZC+iRwybIKeCyw45gY8GMgURJEY3/VqspucLl4UPP7XInMES1VuskqK 8qrTABiIgoYeqMTMAwzC5g1BLFTOT+Rr69ZWvQt4Rwq6xdiEc6+ccAEfWwZ4sr1w9ZP0 XzILH0dVR0Z5kJcIB62n25hpETxUvvYoQ8bTo+i+iLyURIX9g2KV81D/CqvbouexZHia YqkWdMa93nZ57i3VVILsZ8dxMxnuhGNopueUQ6ufSa3JOGsAJfvqTfP+ahsiFYh4tH41 TxYA== 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=aZg0EIKnXy/0MHz18y9OFd85qEQ3lKYjDpL0kXrfNqQuDwJp6iwzBtGC/mHIL0opGI ulo2pXNX8Y3TyPqbGiDQbnkNcw8pFVggGbhhZxfWzUlQ1tgCozeG2BRbI5Oc1hnobCXL fz//xRM5Fw7YmHhLXS8krFB5xhPaqWce+E0FZedA5EZ4uaZiZ0W1GD8m6zJWmd9xkAkc cPv/Y6JzCtBUJhxnjuXNaH/XmULisLVtZYL6yFb9stQUhAAUaE4Rlu2vwIGgC4shwrzh ldzFmVB5ph9Oxrn9rByawHsd5ffcZ3+fURieNN2CTORZ27elY67qbUANrsP/tycBAfWi ElAA== X-Forwarded-Encrypted: i=1; AJvYcCVtPN2kTRhEiZyF6K2VWYvvokynbNly4tEhxpGhLxGvh0myuIslY+KeRwfsdhVGAfqD1oRaIYzvA7hA386/8cWIzDsqfNKpNwV6xx53 X-Gm-Message-State: AOJu0Ywae/6Ux6UGyNEGyYzgQiWhE8/AR5qvJHkD2Y2FaFeeRp4+r4Jm inyGGMYNmYmWl3lWTtZnN0jvI9XdwJH3rM2+B+Sq2AgK06onAy0Icuv4irGe8oc= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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_wm1= 811.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 =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); unsigned int pll_out; =20 /* AIF1CLK should be at least 3MHz for "optimal performance" */ --=20 2.43.0 From nobody Thu Sep 19 19:41:29 2024 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E319201257 for ; Tue, 30 Apr 2024 14:03:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485806; cv=none; b=Mb4Oxo660jlGdNWBN3tKFDY4ti4961HsCLDIAhDDAsduxtF16pWQGuxiRzOfOuQNKGSIj5cx4RjJA483OhXk9NeyP1uTlAEcR1meb47It6kzxnNE367GIscJBHz3vj/jZAnID/ScNEGleho1a1xFSvC3NiFXv9mt8t+m5NuwSJY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714485806; c=relaxed/simple; bh=skJQwkduJ0UqVILLbpIVR8oru+2QUc2pKBYrAAVKHLI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LRfmVrECEsIt1wUDGbV3BYaSn8nyaQ03hlrhiDAYiCq1BriWWGDd0z7RBXwSgf0BVqmj7B4dOeMA+CT4hsqAs+mgCPor49OIdm4jn/2Iuh5b9GxJgauAlkp2tUy5fo9TjmBKdJTTugkPWl0iuQQtvSjH9iPfb9LN9wqG8WJpclg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=LKEH6q2H; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LKEH6q2H" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5726716a006so4642143a12.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=1714485802; x=1715090602; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yC31R3m8W6wP+grnNVF/H3dyhG6qnKQukTpoDRo2U3E=; b=LKEH6q2Hw1mKS2oplomzGEuGnO94ttqC57D1d3xMNBgR0DcC1YyeZ2E5T7p1ZF5h+5 ZPwYWk5xe16+qswAaD0/7CdUuUvogrbYp9YLbR+JWZEOpq8lYVLyCVVaijP88L9EkPuH dPdwshharOYpIglQaxV3b3tqpaxj3ucFvGqCsy7cMBi/N2ve50FOjoZwzBIW8Ak+fW/Q BaxAv/hH8wIseK7Xj9vWvr1aVVojsKFh84ijuWDnYM/d0Os6sqbuBx40hQbyiC/WHKDb 23wZgNqdTXcn3T+o2giU4KviHWva2SAG8/E/wTsPQn3lfYihgtwG84om5DavUL4YxU17 kALw== 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=ZWZ6MXHwb/VF0zM52E7voelmjUUkpv8haJgL8y6wLTMZvh2StfYOn6Qlkeh8YlmTJJ YPrs/n2hC0o9LYDI0qpgE0Gb9IVfjAKhV8Kk+DisD/60ccj2SeS+PzoD5aux3sGcd1g1 mWOPEo3dg2PNpzngXZwmDPIks6vjxsp4fF1v2GCwS3kq0pYEPNdn21KAMC0j9eA7Vwr9 wAKEzvXpHRtd8HC7rvETqOl0dYgh/7Tyo8fW7e0TFs9xv5e6ax8ZUJfv4gzP9NW3pbOq wYZzVEjjF++N6XeQTZePgTjtE1LFyYzdaanyNonarNBeloPVJmdh/DP+EAUqH6NOX0vO Ojng== X-Forwarded-Encrypted: i=1; AJvYcCXsaLKbG5XPB9T0vCstYAM4KiAhsnlk5e9E4DzWt3WJvDoUaP4WN8CSMz7nyLAe0uC4jMdaouZY9hsmRN7GV1th7ZGMHY9uBJrTpuzb X-Gm-Message-State: AOJu0YypNugXjrU4TkP9UZXLMPvIb3AqrwtJlXbuhZGdZj5kpvBvhOQX RfRQIUkVcsn5zcSfMo1axo7XditGlzHqTWxdShVU6wN73e+nsAYQz9RK8/Yn+mQ= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Krzysztof Kozlowski 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 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[] =3D { static int sun50i_dmic_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { - struct snd_soc_pcm_runtime *rtd =3D substream->private_data; + struct snd_soc_pcm_runtime *rtd =3D snd_soc_substream_to_rtd(substream); struct sun50i_dmic_dev *host =3D snd_soc_dai_get_drvdata(snd_soc_rtd_to_c= pu(rtd, 0)); =20 /* only support capture */ --=20 2.43.0