ASoC: qcom: Update to use set_fmt_new callback
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 19 May 2022 15:42:39 +0000 (16:42 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:33:42 +0000 (12:33 +0100)
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>
Link: https://lore.kernel.org/r/20220519154318.2153729-18-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/apq8016_sbc.c
sound/soc/qcom/qdsp6/audioreach.c
sound/soc/qcom/qdsp6/q6afe-dai.c
sound/soc/qcom/qdsp6/q6afe.c
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
sound/soc/qcom/sc7180.c
sound/soc/qcom/sdm845.c
sound/soc/qcom/sm8250.c

index b0a4f7ca27515284f35e4a31cd67f98ef0d3df2e..e54b8961112f3f9a9d636874af1f23a1f258a6ee 100644 (file)
@@ -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));
 }
 
index 98c0efa1d0fec9054510482c973a7054a667d543..01dac32c50fda60782fdb3eadf9a02bd72e60824 100644 (file)
@@ -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;
index 8bb7452b8f18c7972f5106f7dc8707ca35d5342d..8f8794cffc1c520515180fde17cb5e7550468ca1 100644 (file)
@@ -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,
 };
index 625724852a7fb9a478727849c134add3e08bb3c9..919e326b9462b39dc316506c8c2987b699f93c4b 100644 (file)
@@ -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;
index ce9e5646d8f3a2de55e35944cc15263be46fbbb9..82ee52051f83158f42d6321c0a6f4638aeffa81e 100644 (file)
@@ -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 = {
index efccb5c0b3e00509b6b557dd68f178d7b0c1c542..f5f7c64b23a27ddeb1c6fa69c7d3ff61e54ba2f3 100644 (file)
@@ -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);
 
index 61fda790f3756022e6ef8299d9368442e3c50d08..d8d35563af00fda216649acbc3e8d1e08bb98fec 100644 (file)
@@ -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;
index 6e1184c8b672a68bd7bce6513ff5ab4a51023ad6..ce4a5713386a3681f6b17ce7ad3c59436554323c 100644 (file)
@@ -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);