15
15
#include <sound/soc-acpi.h>
16
16
#include "../../../codecs/nau8825.h"
17
17
18
- #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi"
19
18
#define SKL_SSM_CODEC_DAI "ssm4567-hifi"
20
19
21
20
static struct snd_soc_codec_conf card_codec_conf [] = {
@@ -34,41 +33,11 @@ static const struct snd_kcontrol_new card_controls[] = {
34
33
SOC_DAPM_PIN_SWITCH ("Right Speaker" ),
35
34
};
36
35
37
- static int
38
- platform_clock_control (struct snd_soc_dapm_widget * w , struct snd_kcontrol * control , int event )
39
- {
40
- struct snd_soc_dapm_context * dapm = w -> dapm ;
41
- struct snd_soc_card * card = dapm -> card ;
42
- struct snd_soc_dai * codec_dai ;
43
- int ret ;
44
-
45
- codec_dai = snd_soc_card_get_codec_dai (card , SKL_NUVOTON_CODEC_DAI );
46
- if (!codec_dai ) {
47
- dev_err (card -> dev , "Codec dai not found\n" );
48
- return - EINVAL ;
49
- }
50
-
51
- if (SND_SOC_DAPM_EVENT_ON (event )) {
52
- ret = snd_soc_dai_set_sysclk (codec_dai , NAU8825_CLK_MCLK , 24000000 ,
53
- SND_SOC_CLOCK_IN );
54
- if (ret < 0 )
55
- dev_err (card -> dev , "set sysclk err = %d\n" , ret );
56
- } else {
57
- ret = snd_soc_dai_set_sysclk (codec_dai , NAU8825_CLK_INTERNAL , 0 , SND_SOC_CLOCK_IN );
58
- if (ret < 0 )
59
- dev_err (card -> dev , "set sysclk err = %d\n" , ret );
60
- }
61
-
62
- return ret ;
63
- }
64
-
65
36
static const struct snd_soc_dapm_widget card_widgets [] = {
66
37
SND_SOC_DAPM_SPK ("Left Speaker" , NULL ),
67
38
SND_SOC_DAPM_SPK ("Right Speaker" , NULL ),
68
39
SND_SOC_DAPM_SPK ("DP1" , NULL ),
69
40
SND_SOC_DAPM_SPK ("DP2" , NULL ),
70
- SND_SOC_DAPM_SUPPLY ("Platform Clock" , SND_SOC_NOPM , 0 , 0 , platform_clock_control ,
71
- SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD ),
72
41
};
73
42
74
43
static const struct snd_soc_dapm_route card_base_routes [] = {
0 commit comments