forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/samsung/s3c24xx-i2s.c
....@@ -1,18 +1,13 @@
1
-/*
2
- * s3c24xx-i2s.c -- ALSA Soc Audio Layer
3
- *
4
- * (c) 2006 Wolfson Microelectronics PLC.
5
- * Graeme Gregory graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
6
- *
7
- * Copyright 2004-2005 Simtec Electronics
8
- * http://armlinux.simtec.co.uk/
9
- * Ben Dooks <ben@simtec.co.uk>
10
- *
11
- * This program is free software; you can redistribute it and/or modify it
12
- * under the terms of the GNU General Public License as published by the
13
- * Free Software Foundation; either version 2 of the License, or (at your
14
- * option) any later version.
15
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+//
3
+// s3c24xx-i2s.c -- ALSA Soc Audio Layer
4
+//
5
+// (c) 2006 Wolfson Microelectronics PLC.
6
+// Graeme Gregory graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
7
+//
8
+// Copyright 2004-2005 Simtec Electronics
9
+// http://armlinux.simtec.co.uk/
10
+// Ben Dooks <ben@simtec.co.uk>
1611
1712 #include <linux/delay.h>
1813 #include <linux/clk.h>
....@@ -23,10 +18,7 @@
2318 #include <sound/soc.h>
2419 #include <sound/pcm_params.h>
2520
26
-#include <mach/gpio-samsung.h>
27
-#include <plat/gpio-cfg.h>
2821 #include "regs-iis.h"
29
-
3022 #include "dma.h"
3123 #include "s3c24xx-i2s.h"
3224
....@@ -353,10 +345,6 @@
353345 if (ret)
354346 return ret;
355347
356
- /* Configure the I2S pins (GPE0...GPE4) in correct mode */
357
- s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
358
- S3C_GPIO_PULL_NONE);
359
-
360348 writel(S3C2410_IISCON_IISEN, s3c24xx_i2s.regs + S3C2410_IISCON);
361349
362350 s3c24xx_snd_txctrl(0);
....@@ -366,7 +354,7 @@
366354 }
367355
368356 #ifdef CONFIG_PM
369
-static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
357
+static int s3c24xx_i2s_suspend(struct snd_soc_component *component)
370358 {
371359 s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
372360 s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
....@@ -378,7 +366,7 @@
378366 return 0;
379367 }
380368
381
-static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
369
+static int s3c24xx_i2s_resume(struct snd_soc_component *component)
382370 {
383371 int ret;
384372
....@@ -413,8 +401,6 @@
413401
414402 static struct snd_soc_dai_driver s3c24xx_i2s_dai = {
415403 .probe = s3c24xx_i2s_probe,
416
- .suspend = s3c24xx_i2s_suspend,
417
- .resume = s3c24xx_i2s_resume,
418404 .playback = {
419405 .channels_min = 2,
420406 .channels_max = 2,
....@@ -430,6 +416,8 @@
430416
431417 static const struct snd_soc_component_driver s3c24xx_i2s_component = {
432418 .name = "s3c24xx-i2s",
419
+ .suspend = s3c24xx_i2s_suspend,
420
+ .resume = s3c24xx_i2s_resume,
433421 };
434422
435423 static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
....@@ -446,7 +434,7 @@
446434 s3c24xx_i2s_pcm_stereo_in.addr = res->start + S3C2410_IISFIFO;
447435
448436 ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL,
449
- NULL, NULL);
437
+ "tx", "rx", NULL);
450438 if (ret) {
451439 dev_err(&pdev->dev, "Failed to register the DMA: %d\n", ret);
452440 return ret;