aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/uniphier/aio-ld11.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/uniphier/aio-ld11.c')
-rw-r--r--sound/soc/uniphier/aio-ld11.c66
1 files changed, 11 insertions, 55 deletions
diff --git a/sound/soc/uniphier/aio-ld11.c b/sound/soc/uniphier/aio-ld11.c
index 8b44f8dc4970..01cc3b961999 100644
--- a/sound/soc/uniphier/aio-ld11.c
+++ b/sound/soc/uniphier/aio-ld11.c
@@ -188,36 +188,9 @@ static const struct uniphier_aio_pll uniphier_aio_pll_ld11[] = {
[AUD_PLL_HSC0] = { .enable = true, },
};
-static int uniphier_aio_ld11_probe(struct snd_soc_dai *dai)
-{
- int ret;
-
- ret = uniphier_aio_dai_probe(dai);
- if (ret < 0)
- return ret;
-
- ret = snd_soc_dai_set_pll(dai, AUD_PLL_A1, 0, 0, 36864000);
- if (ret < 0)
- return ret;
- ret = snd_soc_dai_set_pll(dai, AUD_PLL_F1, 0, 0, 36864000);
- if (ret < 0)
- return ret;
-
- ret = snd_soc_dai_set_pll(dai, AUD_PLL_A2, 0, 0, 33868800);
- if (ret < 0)
- return ret;
- ret = snd_soc_dai_set_pll(dai, AUD_PLL_F2, 0, 0, 33868800);
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
{
.name = AUD_GNAME_HDMI,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_PCMOUT1,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -234,12 +207,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_PCMIN2,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.capture = {
.stream_name = AUD_NAME_PCMIN2,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -247,12 +218,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_GNAME_LINE,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_PCMOUT2,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -267,12 +236,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_HPCMOUT1,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_HPCMOUT1,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -280,12 +247,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 8,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_PCMOUT3,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_PCMOUT3,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -293,12 +258,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_HIECOUT1,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_HIECOUT1,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -306,12 +269,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_spdif_ops,
+ .ops = &uniphier_aio_spdif_ld11_ops,
},
{
.name = AUD_NAME_EPCMOUT2,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_EPCMOUT2,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -321,12 +282,10 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_EPCMOUT3,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
.playback = {
.stream_name = AUD_NAME_EPCMOUT3,
.formats = SNDRV_PCM_FMTBIT_S32_LE,
@@ -336,19 +295,16 @@ static struct snd_soc_dai_driver uniphier_aio_dai_ld11[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = &uniphier_aio_i2s_ops,
+ .ops = &uniphier_aio_i2s_ld11_ops,
},
{
.name = AUD_NAME_HIECCOMPOUT1,
- .probe = uniphier_aio_ld11_probe,
- .remove = uniphier_aio_dai_remove,
- .compress_new = snd_soc_new_compress,
.playback = {
.stream_name = AUD_NAME_HIECCOMPOUT1,
.channels_min = 1,
.channels_max = 1,
},
- .ops = &uniphier_aio_spdif_ops,
+ .ops = &uniphier_aio_spdif_ld11_ops2,
},
};
@@ -372,7 +328,7 @@ static const struct uniphier_aio_chip_spec uniphier_aio_ld20_spec = {
.addr_ext = 1,
};
-static const struct of_device_id uniphier_aio_of_match[] = {
+static const struct of_device_id uniphier_aio_of_match[] __maybe_unused = {
{
.compatible = "socionext,uniphier-ld11-aio",
.data = &uniphier_aio_ld11_spec,
@@ -391,7 +347,7 @@ static struct platform_driver uniphier_aio_driver = {
.of_match_table = of_match_ptr(uniphier_aio_of_match),
},
.probe = uniphier_aio_probe,
- .remove = uniphier_aio_remove,
+ .remove_new = uniphier_aio_remove,
};
module_platform_driver(uniphier_aio_driver);