linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <kuninori.morimoto.gx@renesas.com>,
	<nicolas.ferre@microchip.com>, <nsaenz@kernel.org>,
	<shawnguo@kernel.org>, <linux-imx@nxp.com>,
	<cezary.rojewski@intel.com>,
	<pierre-louis.bossart@linux.intel.com>,
	<linux-mips@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-amlogic@lists.infradead.org>, <daniel@zonque.org>,
	<srinivas.kandagatla@linaro.org>,
	<linux-rockchip@lists.infradead.org>, <krzk@kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-sunxi@lists.linux.dev>, <linux-tegra@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <linux-xtensa@linux-xtensa.org>,
	<peter.ujfalusi@gmail.com>, <jarkko.nikula@bitmer.com>,
	<heiko@sntech.de>, <jbrunet@baylibre.com>,
	<kernel@pengutronix.de>, <alsa-devel@alsa-project.org>,
	<patches@opensource.cirrus.com>
Subject: [PATCH 17/56] ASoC: qcom: Update to use set_fmt_new callback
Date: Thu, 19 May 2022 16:42:39 +0100	[thread overview]
Message-ID: <20220519154318.2153729-18-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20220519154318.2153729-1-ckeepax@opensource.cirrus.com>

As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/qcom/apq8016_sbc.c            | 2 +-
 sound/soc/qcom/qdsp6/audioreach.c       | 4 ++--
 sound/soc/qcom/qdsp6/q6afe-dai.c        | 2 +-
 sound/soc/qcom/qdsp6/q6afe.c            | 6 +++---
 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +-
 sound/soc/qcom/sc7180.c                 | 2 +-
 sound/soc/qcom/sdm845.c                 | 6 +++---
 sound/soc/qcom/sm8250.c                 | 4 ++--
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index b0a4f7ca27515..e54b8961112f3 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -172,7 +172,7 @@ static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
 
-	snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_CBS_CFS);
+	snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
 	return apq8016_dai_init(rtd, qdsp6_dai_get_lpass_id(cpu_dai));
 }
 
diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
index 98c0efa1d0fec..01dac32c50fda 100644
--- a/sound/soc/qcom/qdsp6/audioreach.c
+++ b/sound/soc/qcom/qdsp6/audioreach.c
@@ -732,10 +732,10 @@ static int audioreach_i2s_set_media_format(struct q6apm_graph *graph,
 	intf_cfg->cfg.sd_line_idx = module->sd_line_idx;
 
 	switch (cfg->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
-	case SND_SOC_DAIFMT_CBC_CFC:
+	case SND_SOC_DAIFMT_BP_FP:
 		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_INTERNAL;
 		break;
-	case SND_SOC_DAIFMT_CBP_CFP:
+	case SND_SOC_DAIFMT_BC_FC:
 		/* CPU is slave */
 		intf_cfg->cfg.ws_src = CONFIG_I2S_WS_SRC_EXTERNAL;
 		break;
diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 8bb7452b8f18c..8f8794cffc1c5 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -648,7 +648,7 @@ static const struct snd_soc_dai_ops q6hdmi_ops = {
 static const struct snd_soc_dai_ops q6i2s_ops = {
 	.prepare	= q6afe_dai_prepare,
 	.hw_params	= q6i2s_hw_params,
-	.set_fmt	= q6i2s_set_fmt,
+	.set_fmt_new	= q6i2s_set_fmt,
 	.shutdown	= q6afe_dai_shutdown,
 	.set_sysclk	= q6afe_mi2s_set_sysclk,
 };
diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 625724852a7fb..919e326b9462b 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -1328,11 +1328,11 @@ int q6afe_i2s_port_prepare(struct q6afe_port *port, struct q6afe_i2s_cfg *cfg)
 	pcfg->i2s_cfg.bit_width = cfg->bit_width;
 	pcfg->i2s_cfg.data_format = AFE_LINEAR_PCM_DATA;
 
-	switch (cfg->fmt & SND_SOC_DAIFMT_MASTER_MASK) {
-	case SND_SOC_DAIFMT_CBS_CFS:
+	switch (cfg->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+	case SND_SOC_DAIFMT_BP_FP:
 		pcfg->i2s_cfg.ws_src = AFE_PORT_CONFIG_I2S_WS_SRC_INTERNAL;
 		break;
-	case SND_SOC_DAIFMT_CBM_CFM:
+	case SND_SOC_DAIFMT_BC_FC:
 		/* CPU is slave */
 		pcfg->i2s_cfg.ws_src = AFE_PORT_CONFIG_I2S_WS_SRC_EXTERNAL;
 		break;
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
index ce9e5646d8f3a..82ee52051f831 100644
--- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
+++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
@@ -207,7 +207,7 @@ static const struct snd_soc_dai_ops q6i2s_ops = {
 	.shutdown	= q6apm_lpass_dai_shutdown,
 	.set_channel_map  = q6dma_set_channel_map,
 	.hw_params        = q6dma_hw_params,
-	.set_fmt	= q6i2s_set_fmt,
+	.set_fmt_new	= q6i2s_set_fmt,
 };
 
 static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c
index efccb5c0b3e00..f5f7c64b23a27 100644
--- a/sound/soc/qcom/sc7180.c
+++ b/sound/soc/qcom/sc7180.c
@@ -155,7 +155,7 @@ static int sc7180_snd_startup(struct snd_pcm_substream *substream)
 		}
 
 		snd_soc_dai_set_fmt(codec_dai,
-				    SND_SOC_DAIFMT_CBS_CFS |
+				    SND_SOC_DAIFMT_BC_FC |
 				    SND_SOC_DAIFMT_NB_NF |
 				    SND_SOC_DAIFMT_I2S);
 
diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
index 61fda790f3756..d8d35563af00f 100644
--- a/sound/soc/qcom/sdm845.c
+++ b/sound/soc/qcom/sdm845.c
@@ -316,8 +316,8 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd)
 
 static int sdm845_snd_startup(struct snd_pcm_substream *substream)
 {
-	unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS;
-	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS;
+	unsigned int fmt = SND_SOC_DAIFMT_BP_FP;
+	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_BC_FC;
 	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
 	struct snd_soc_card *card = rtd->card;
 	struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card);
@@ -356,7 +356,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
 		snd_soc_dai_set_sysclk(cpu_dai,
 			Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT,
 			MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
-		snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_CBS_CFS);
+		snd_soc_dai_set_fmt(cpu_dai, fmt);
 
 
 		break;
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 6e1184c8b672a..ce4a5713386a3 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -96,8 +96,8 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
 
 static int sm8250_snd_startup(struct snd_pcm_substream *substream)
 {
-	unsigned int fmt = SND_SOC_DAIFMT_CBS_CFS;
-	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_CBS_CFS;
+	unsigned int fmt = SND_SOC_DAIFMT_BP_FP;
+	unsigned int codec_dai_fmt = SND_SOC_DAIFMT_BC_FC;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
 	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
-- 
2.30.2


  parent reply	other threads:[~2022-05-19 15:48 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 15:42 [PATCH 00/56] Specify clock provider directly to CPU DAIs Charles Keepax
2022-05-19 15:42 ` [PATCH 01/56] ASoC: core: Add set_fmt_new callback that directly specifies provider Charles Keepax
2022-05-19 15:42 ` [PATCH 02/56] ASoC: amd: vangogh: Update to use set_fmt_new callback Charles Keepax
2022-05-19 15:42 ` [PATCH 03/56] ASoC: atmel: " Charles Keepax
2022-05-19 15:42 ` [PATCH 04/56] ASoC: au1x: " Charles Keepax
2022-05-19 15:42 ` [PATCH 05/56] ASoC: bcm: " Charles Keepax
2022-05-19 15:42 ` [PATCH 06/56] ASoC: ep93xx: " Charles Keepax
2022-05-19 15:42 ` [PATCH 07/56] ASoC: dwc: " Charles Keepax
2022-05-19 15:42 ` [PATCH 08/56] ASoC: fsl: " Charles Keepax
2022-05-19 15:42 ` [PATCH 09/56] ASoC: hisilicon: " Charles Keepax
2022-05-19 15:42 ` [PATCH 10/56] ASoC: img: " Charles Keepax
2022-05-19 15:42 ` [PATCH 11/56] ASoC: Intel: " Charles Keepax
2022-05-19 15:42 ` [PATCH 12/56] ASoC: js4740-i2s: " Charles Keepax
2022-05-19 15:42 ` [PATCH 13/56] ASoC: mediatek: " Charles Keepax
2022-05-19 15:42 ` [PATCH 14/56] ASoC: meson: " Charles Keepax
2022-05-19 15:42 ` [PATCH 15/56] ASoC: mxs-saif: " Charles Keepax
2022-05-19 15:42 ` [PATCH 16/56] ASoC: pxa: " Charles Keepax
2022-05-19 15:42 ` Charles Keepax [this message]
2022-05-19 15:42 ` [PATCH 18/56] ASoC: rockchip: " Charles Keepax
2022-05-20 13:39   ` Nicolas Frattaroli
2022-05-19 15:42 ` [PATCH 19/56] ASoC: samsung: " Charles Keepax
2022-05-19 15:42 ` [PATCH 20/56] ASoC: sh: " Charles Keepax
2022-05-20  0:51   ` Kuninori Morimoto
2022-05-19 15:42 ` [PATCH 21/56] ASoC: stm: " Charles Keepax
2022-05-19 15:42 ` [PATCH 22/56] ASoC: sunxi: " Charles Keepax
2022-05-19 23:40   ` Samuel Holland
2022-05-20  9:56     ` Charles Keepax
2022-05-19 15:42 ` [PATCH 23/56] ASoC: tegra: " Charles Keepax
2022-05-19 15:42 ` [PATCH 24/56] ASoC: test-component: " Charles Keepax
2022-05-20  0:52   ` Kuninori Morimoto
2022-05-19 15:42 ` [PATCH 25/56] ASoC: ti: " Charles Keepax
2022-05-28  9:18   ` Péter Ujfalusi
2022-05-19 15:42 ` [PATCH 26/56] ASoC: ux500: " Charles Keepax
2022-05-19 15:42 ` [PATCH 27/56] ASoC: xtensa: " Charles Keepax
2022-05-19 15:42 ` [PATCH 28/56] ASoC: core: Always send the CPU DAI a direct clock specifier Charles Keepax
2022-05-19 15:42 ` [PATCH 29/56] ASoC: amd: vangogh: Rename set_fmt_new back to set_fmt Charles Keepax
2022-05-19 15:42 ` [PATCH 30/56] ASoC: atmel: " Charles Keepax
2022-05-19 15:42 ` [PATCH 31/56] ASoC: au1x: " Charles Keepax
2022-05-19 15:42 ` [PATCH 32/56] ASoC: bcm: " Charles Keepax
2022-05-19 15:42 ` [PATCH 33/56] ASoC: ep93xx: " Charles Keepax
2022-05-19 15:42 ` [PATCH 34/56] ASoC: dwc: " Charles Keepax
2022-05-19 15:42 ` [PATCH 35/56] ASoC: fsl: " Charles Keepax
2022-05-19 15:42 ` [PATCH 36/56] ASoC: hisilicon: " Charles Keepax
2022-05-19 15:42 ` [PATCH 37/56] ASoC: img: " Charles Keepax
2022-05-19 15:43 ` [PATCH 38/56] ASoC: Intel: " Charles Keepax
2022-05-19 15:43 ` [PATCH 39/56] ASoC: jz4740-i2s: " Charles Keepax
2022-05-19 15:43 ` [PATCH 40/56] ASoC: mediatek: " Charles Keepax
2022-05-19 15:43 ` [PATCH 41/56] ASoC: meson: " Charles Keepax
2022-05-19 15:43 ` [PATCH 42/56] ASoC: mxs-saif: " Charles Keepax
2022-05-19 15:43 ` [PATCH 43/56] ASoC: pxa: " Charles Keepax
2022-05-19 15:43 ` [PATCH 44/56] ASoC: qcom: " Charles Keepax
2022-05-19 15:43 ` [PATCH 45/56] ASoC: rockchip: " Charles Keepax
2022-05-19 15:43 ` [PATCH 46/56] ASoC: samsung: " Charles Keepax
2022-05-20  6:45   ` Krzysztof Kozlowski
2022-05-19 15:43 ` [PATCH 47/56] ASoC: sh: " Charles Keepax
2022-05-19 15:43 ` [PATCH 48/56] ASoC: stm: " Charles Keepax
2022-05-19 15:43 ` [PATCH 49/56] ASoC: sunxi: " Charles Keepax
2022-05-19 15:43 ` [PATCH 50/56] ASoC: tegra: " Charles Keepax
2022-05-19 15:43 ` [PATCH 51/56] ASoC: test-component: " Charles Keepax
2022-05-19 15:43 ` [PATCH 52/56] ASoC: ti: " Charles Keepax
2022-05-28  9:19   ` Péter Ujfalusi
2022-05-19 15:43 ` [PATCH 53/56] ASoC: ux500: " Charles Keepax
2022-05-19 15:43 ` [PATCH 54/56] ASoC: xtensa: " Charles Keepax
2022-05-19 15:43 ` [PATCH 55/56] ASoC: soc-dai: Remove set_fmt_new callback Charles Keepax
2022-05-19 15:43 ` [PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local Charles Keepax
2022-05-20  1:02   ` Kuninori Morimoto
2022-05-20 10:24     ` Charles Keepax
2022-05-22 23:26       ` Kuninori Morimoto
2022-05-19 18:43 ` [PATCH 00/56] Specify clock provider directly to CPU DAIs Pierre-Louis Bossart
2022-06-09 13:32 ` Mark Brown
2022-06-10  2:03   ` Samuel Holland
2022-06-10 12:03     ` Mark Brown
2022-06-13  9:54       ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220519154318.2153729-18-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=daniel@zonque.org \
    --cc=heiko@sntech.de \
    --cc=jarkko.nikula@bitmer.com \
    --cc=jbrunet@baylibre.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=nsaenz@kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=peter.ujfalusi@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=shawnguo@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).