aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/au1x/psc-i2s.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/au1x/psc-i2s.c')
-rw-r--r--sound/soc/au1x/psc-i2s.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 9384702c7ebd..f916de4400ed 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -116,7 +116,8 @@ out:
116} 116}
117 117
118static int au1xpsc_i2s_hw_params(struct snd_pcm_substream *substream, 118static int au1xpsc_i2s_hw_params(struct snd_pcm_substream *substream,
119 struct snd_pcm_hw_params *params) 119 struct snd_pcm_hw_params *params,
120 struct snd_soc_dai *dai)
120{ 121{
121 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata; 122 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata;
122 123
@@ -240,7 +241,8 @@ static int au1xpsc_i2s_stop(struct au1xpsc_audio_data *pscdata, int stype)
240 return 0; 241 return 0;
241} 242}
242 243
243static int au1xpsc_i2s_trigger(struct snd_pcm_substream *substream, int cmd) 244static int au1xpsc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
245 struct snd_soc_dai *dai)
244{ 246{
245 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata; 247 struct au1xpsc_audio_data *pscdata = au1xpsc_i2s_workdata;
246 int ret, stype = SUBSTREAM_TYPE(substream); 248 int ret, stype = SUBSTREAM_TYPE(substream);
@@ -337,8 +339,7 @@ static void au1xpsc_i2s_remove(struct platform_device *pdev,
337 au1xpsc_i2s_workdata = NULL; 339 au1xpsc_i2s_workdata = NULL;
338} 340}
339 341
340static int au1xpsc_i2s_suspend(struct platform_device *pdev, 342static int au1xpsc_i2s_suspend(struct snd_soc_dai *cpu_dai)
341 struct snd_soc_dai *cpu_dai)
342{ 343{
343 /* save interesting register and disable PSC */ 344 /* save interesting register and disable PSC */
344 au1xpsc_i2s_workdata->pm[0] = 345 au1xpsc_i2s_workdata->pm[0] =
@@ -352,8 +353,7 @@ static int au1xpsc_i2s_suspend(struct platform_device *pdev,
352 return 0; 353 return 0;
353} 354}
354 355
355static int au1xpsc_i2s_resume(struct platform_device *pdev, 356static int au1xpsc_i2s_resume(struct snd_soc_dai *cpu_dai)
356 struct snd_soc_dai *cpu_dai)
357{ 357{
358 /* select I2S mode and PSC clock */ 358 /* select I2S mode and PSC clock */
359 au_writel(PSC_CTRL_DISABLE, PSC_CTRL(au1xpsc_i2s_workdata)); 359 au_writel(PSC_CTRL_DISABLE, PSC_CTRL(au1xpsc_i2s_workdata));
@@ -369,7 +369,6 @@ static int au1xpsc_i2s_resume(struct platform_device *pdev,
369 369
370struct snd_soc_dai au1xpsc_i2s_dai = { 370struct snd_soc_dai au1xpsc_i2s_dai = {
371 .name = "au1xpsc_i2s", 371 .name = "au1xpsc_i2s",
372 .type = SND_SOC_DAI_I2S,
373 .probe = au1xpsc_i2s_probe, 372 .probe = au1xpsc_i2s_probe,
374 .remove = au1xpsc_i2s_remove, 373 .remove = au1xpsc_i2s_remove,
375 .suspend = au1xpsc_i2s_suspend, 374 .suspend = au1xpsc_i2s_suspend,
@@ -389,8 +388,6 @@ struct snd_soc_dai au1xpsc_i2s_dai = {
389 .ops = { 388 .ops = {
390 .trigger = au1xpsc_i2s_trigger, 389 .trigger = au1xpsc_i2s_trigger,
391 .hw_params = au1xpsc_i2s_hw_params, 390 .hw_params = au1xpsc_i2s_hw_params,
392 },
393 .dai_ops = {
394 .set_fmt = au1xpsc_i2s_set_fmt, 391 .set_fmt = au1xpsc_i2s_set_fmt,
395 }, 392 },
396}; 393};
@@ -399,11 +396,12 @@ EXPORT_SYMBOL(au1xpsc_i2s_dai);
399static int __init au1xpsc_i2s_init(void) 396static int __init au1xpsc_i2s_init(void)
400{ 397{
401 au1xpsc_i2s_workdata = NULL; 398 au1xpsc_i2s_workdata = NULL;
402 return 0; 399 return snd_soc_register_dai(&au1xpsc_i2s_dai);
403} 400}
404 401
405static void __exit au1xpsc_i2s_exit(void) 402static void __exit au1xpsc_i2s_exit(void)
406{ 403{
404 snd_soc_unregister_dai(&au1xpsc_i2s_dai);
407} 405}
408 406
409module_init(au1xpsc_i2s_init); 407module_init(au1xpsc_i2s_init);