ASoC: Intel: avs: ssm4567: Remove nau8825 bits
Some of the nau8825 clock control got into the ssm4567, remove it. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230303134854.2277146-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
d24dbc865c
Коммит
933de2d127
|
@ -15,7 +15,6 @@
|
|||
#include <sound/soc-acpi.h>
|
||||
#include "../../../codecs/nau8825.h"
|
||||
|
||||
#define SKL_NUVOTON_CODEC_DAI "nau8825-hifi"
|
||||
#define SKL_SSM_CODEC_DAI "ssm4567-hifi"
|
||||
|
||||
static struct snd_soc_codec_conf card_codec_conf[] = {
|
||||
|
@ -34,41 +33,11 @@ static const struct snd_kcontrol_new card_controls[] = {
|
|||
SOC_DAPM_PIN_SWITCH("Right Speaker"),
|
||||
};
|
||||
|
||||
static int
|
||||
platform_clock_control(struct snd_soc_dapm_widget *w, struct snd_kcontrol *control, int event)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm = w->dapm;
|
||||
struct snd_soc_card *card = dapm->card;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
int ret;
|
||||
|
||||
codec_dai = snd_soc_card_get_codec_dai(card, SKL_NUVOTON_CODEC_DAI);
|
||||
if (!codec_dai) {
|
||||
dev_err(card->dev, "Codec dai not found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (SND_SOC_DAPM_EVENT_ON(event)) {
|
||||
ret = snd_soc_dai_set_sysclk(codec_dai, NAU8825_CLK_MCLK, 24000000,
|
||||
SND_SOC_CLOCK_IN);
|
||||
if (ret < 0)
|
||||
dev_err(card->dev, "set sysclk err = %d\n", ret);
|
||||
} else {
|
||||
ret = snd_soc_dai_set_sysclk(codec_dai, NAU8825_CLK_INTERNAL, 0, SND_SOC_CLOCK_IN);
|
||||
if (ret < 0)
|
||||
dev_err(card->dev, "set sysclk err = %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dapm_widget card_widgets[] = {
|
||||
SND_SOC_DAPM_SPK("Left Speaker", NULL),
|
||||
SND_SOC_DAPM_SPK("Right Speaker", NULL),
|
||||
SND_SOC_DAPM_SPK("DP1", NULL),
|
||||
SND_SOC_DAPM_SPK("DP2", NULL),
|
||||
SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0, platform_clock_control,
|
||||
SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route card_base_routes[] = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче