ASoC: SOF: amd: remove acp_dai_probe() function
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Mon, 3 Apr 2023 07:16:42 +0000 (12:46 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 3 Apr 2023 11:15:32 +0000 (12:15 +0100)
ACP SOF driver supports different audio configurations.
Explicit condition check for I2S configuration will break
other audio endpoint configurations.

acp_dai_probe() function is not required as we have
machine select logic to select the exact machine.

Remove acp_dai_probe() from existing AMD PCI driver code base.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230403071651.919027-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/amd/acp-common.c
sound/soc/sof/amd/acp.h
sound/soc/sof/amd/rembrandt.c
sound/soc/sof/amd/renoir.c

index 8ce4c89569338d1b483c7ee18c73f55aed7d605b..df36b411a12e66eb0e0bb8a4ab84a13775470491 100644 (file)
 #include "acp-dsp-offset.h"
 #include <sound/sof/xtensa.h>
 
-int acp_dai_probe(struct snd_soc_dai *dai)
-{
-       struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(dai->component);
-       const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata);
-       unsigned int val;
-
-       val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, desc->i2s_pin_config_offset);
-       if (val != desc->i2s_mode) {
-               dev_err(sdev->dev, "I2S Mode is not supported (I2S_PIN_CONFIG: %#x)\n", val);
-               return -EINVAL;
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL_NS(acp_dai_probe, SND_SOC_SOF_AMD_COMMON);
-
 /**
  * amd_sof_ipc_dump() - This function is called when IPC tx times out.
  * @sdev: SOF device.
index acad579476165d81d0f89628be512557395f5441..d7fc24917b3cf579bd12e67b1f30915d2cfae94c 100644 (file)
@@ -248,7 +248,6 @@ int sof_renoir_ops_init(struct snd_sof_dev *sdev);
 extern struct snd_sof_dsp_ops sof_rembrandt_ops;
 int sof_rembrandt_ops_init(struct snd_sof_dev *sdev);
 
-int acp_dai_probe(struct snd_soc_dai *dai);
 struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev);
 /* Machine configuration */
 int snd_amd_acp_find_config(struct pci_dev *pci);
index 5288ab882fc94c80f9fbb63b2ce64260e9173b79..f1d1ba57ab3a0d716daa42ede437d5cf36518e70 100644 (file)
@@ -48,7 +48,6 @@ static struct snd_soc_dai_driver rembrandt_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 48000,
                },
-               .probe = &acp_dai_probe,
        },
 
        [I2S_BT_INSTANCE] = {
@@ -73,7 +72,6 @@ static struct snd_soc_dai_driver rembrandt_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 48000,
                },
-               .probe = &acp_dai_probe,
        },
 
        [I2S_SP_INSTANCE] = {
@@ -98,7 +96,6 @@ static struct snd_soc_dai_driver rembrandt_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 48000,
                },
-               .probe = &acp_dai_probe,
        },
 
        [PDM_DMIC_INSTANCE] = {
@@ -126,7 +123,6 @@ static struct snd_soc_dai_driver rembrandt_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 96000,
                },
-               .probe = &acp_dai_probe,
        },
 };
 
index adade2e3d3be6ca65a008be1b7d53fa31bc448d6..47b863f6258c6d5d922411251155e5eb664151b5 100644 (file)
@@ -47,7 +47,6 @@ static struct snd_soc_dai_driver renoir_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 48000,
                },
-               .probe = &acp_dai_probe,
        },
 
        [I2S_SP_INSTANCE] = {
@@ -72,7 +71,6 @@ static struct snd_soc_dai_driver renoir_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 48000,
                },
-               .probe = &acp_dai_probe,
        },
 
        [PDM_DMIC_INSTANCE] = {
@@ -100,7 +98,6 @@ static struct snd_soc_dai_driver renoir_sof_dai[] = {
                        .rate_min = 8000,
                        .rate_max = 96000,
                },
-               .probe = &acp_dai_probe,
        },
 };