diff options
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-t5325.c')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-t5325.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sound/soc/kirkwood/kirkwood-t5325.c b/sound/soc/kirkwood/kirkwood-t5325.c index c772b3cf403..b47cc4e9b74 100644 --- a/sound/soc/kirkwood/kirkwood-t5325.c +++ b/sound/soc/kirkwood/kirkwood-t5325.c | |||
@@ -25,18 +25,7 @@ static int t5325_hw_params(struct snd_pcm_substream *substream, | |||
25 | { | 25 | { |
26 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 26 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
27 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 27 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
28 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 28 | unsigned int freq; |
29 | int ret; | ||
30 | unsigned int freq, fmt; | ||
31 | |||
32 | fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS; | ||
33 | ret = snd_soc_dai_set_fmt(cpu_dai, fmt); | ||
34 | if (ret < 0) | ||
35 | return ret; | ||
36 | |||
37 | ret = snd_soc_dai_set_fmt(codec_dai, fmt); | ||
38 | if (ret < 0) | ||
39 | return ret; | ||
40 | 29 | ||
41 | freq = params_rate(params) * 256; | 30 | freq = params_rate(params) * 256; |
42 | 31 | ||
@@ -70,11 +59,6 @@ static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd) | |||
70 | struct snd_soc_codec *codec = rtd->codec; | 59 | struct snd_soc_codec *codec = rtd->codec; |
71 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 60 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
72 | 61 | ||
73 | snd_soc_dapm_new_controls(dapm, t5325_dapm_widgets, | ||
74 | ARRAY_SIZE(t5325_dapm_widgets)); | ||
75 | |||
76 | snd_soc_dapm_add_routes(dapm, t5325_route, ARRAY_SIZE(t5325_route)); | ||
77 | |||
78 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); | 62 | snd_soc_dapm_enable_pin(dapm, "Mic Jack"); |
79 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); | 63 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); |
80 | snd_soc_dapm_enable_pin(dapm, "Speaker"); | 64 | snd_soc_dapm_enable_pin(dapm, "Speaker"); |
@@ -90,6 +74,7 @@ static struct snd_soc_dai_link t5325_dai[] = { | |||
90 | .platform_name = "kirkwood-pcm-audio", | 74 | .platform_name = "kirkwood-pcm-audio", |
91 | .codec_dai_name = "alc5621-hifi", | 75 | .codec_dai_name = "alc5621-hifi", |
92 | .codec_name = "alc562x-codec.0-001a", | 76 | .codec_name = "alc562x-codec.0-001a", |
77 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, | ||
93 | .ops = &t5325_ops, | 78 | .ops = &t5325_ops, |
94 | .init = t5325_dai_init, | 79 | .init = t5325_dai_init, |
95 | }, | 80 | }, |
@@ -98,8 +83,14 @@ static struct snd_soc_dai_link t5325_dai[] = { | |||
98 | 83 | ||
99 | static struct snd_soc_card t5325 = { | 84 | static struct snd_soc_card t5325 = { |
100 | .name = "t5325", | 85 | .name = "t5325", |
86 | .owner = THIS_MODULE, | ||
101 | .dai_link = t5325_dai, | 87 | .dai_link = t5325_dai, |
102 | .num_links = ARRAY_SIZE(t5325_dai), | 88 | .num_links = ARRAY_SIZE(t5325_dai), |
89 | |||
90 | .dapm_widgets = t5325_dapm_widgets, | ||
91 | .num_dapm_widgets = ARRAY_SIZE(t5325_dapm_widgets), | ||
92 | .dapm_routes = t5325_route, | ||
93 | .num_dapm_routes = ARRAY_SIZE(t5325_route), | ||
103 | }; | 94 | }; |
104 | 95 | ||
105 | static struct platform_device *t5325_snd_device; | 96 | static struct platform_device *t5325_snd_device; |