diff options
-rw-r--r-- | arch/arm/mach-s5pc100/mach-smdkc100.c | 2 | ||||
-rw-r--r-- | sound/soc/s3c24xx/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/s3c24xx/smdk_wm8580.c | 73 |
3 files changed, 55 insertions, 22 deletions
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 18b405d514d6..dd192a27524d 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -96,6 +96,7 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = { | |||
96 | 96 | ||
97 | /* I2C0 */ | 97 | /* I2C0 */ |
98 | static struct i2c_board_info i2c_devs0[] __initdata = { | 98 | static struct i2c_board_info i2c_devs0[] __initdata = { |
99 | {I2C_BOARD_INFO("wm8580", 0x1b),}, | ||
99 | }; | 100 | }; |
100 | 101 | ||
101 | /* I2C1 */ | 102 | /* I2C1 */ |
@@ -190,6 +191,7 @@ static struct platform_device *smdkc100_devices[] __initdata = { | |||
190 | &s3c_device_ts, | 191 | &s3c_device_ts, |
191 | &s3c_device_wdt, | 192 | &s3c_device_wdt, |
192 | &smdkc100_lcd_powerdev, | 193 | &smdkc100_lcd_powerdev, |
194 | &samsung_asoc_dma, | ||
193 | &s5pc100_device_iis0, | 195 | &s5pc100_device_iis0, |
194 | &samsung_device_keypad, | 196 | &samsung_device_keypad, |
195 | &s5pc100_device_ac97, | 197 | &s5pc100_device_ac97, |
diff --git a/sound/soc/s3c24xx/Kconfig b/sound/soc/s3c24xx/Kconfig index 396f678d1af5..4989fad83563 100644 --- a/sound/soc/s3c24xx/Kconfig +++ b/sound/soc/s3c24xx/Kconfig | |||
@@ -62,7 +62,7 @@ config SND_S3C24XX_SOC_JIVE_WM8750 | |||
62 | 62 | ||
63 | config SND_SOC_SMDK_WM8580 | 63 | config SND_SOC_SMDK_WM8580 |
64 | tristate "SoC I2S Audio support for WM8580 on SMDK" | 64 | tristate "SoC I2S Audio support for WM8580 on SMDK" |
65 | depends on SND_S3C24XX_SOC && MACH_SMDK6410 | 65 | depends on SND_S3C24XX_SOC && (MACH_SMDK6410 || MACH_SMDKC100) |
66 | select SND_SOC_WM8580 | 66 | select SND_SOC_WM8580 |
67 | select SND_SAMSUNG_I2S | 67 | select SND_SAMSUNG_I2S |
68 | help | 68 | help |
diff --git a/sound/soc/s3c24xx/smdk_wm8580.c b/sound/soc/s3c24xx/smdk_wm8580.c index b1b3d12abcb9..0ae3d57d79e6 100644 --- a/sound/soc/s3c24xx/smdk_wm8580.c +++ b/sound/soc/s3c24xx/smdk_wm8580.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <sound/pcm_params.h> | 17 | #include <sound/pcm_params.h> |
18 | #include <sound/soc.h> | 18 | #include <sound/soc.h> |
19 | 19 | ||
20 | #include <asm/mach-types.h> | ||
21 | |||
20 | #include "../codecs/wm8580.h" | 22 | #include "../codecs/wm8580.h" |
21 | #include "dma.h" | 23 | #include "dma.h" |
22 | #include "i2s.h" | 24 | #include "i2s.h" |
@@ -200,33 +202,49 @@ static int smdk_wm8580_init_paifrx(struct snd_soc_pcm_runtime *rtd) | |||
200 | return 0; | 202 | return 0; |
201 | } | 203 | } |
202 | 204 | ||
205 | enum { | ||
206 | PRI_PLAYBACK = 0, | ||
207 | PRI_CAPTURE, | ||
208 | SEC_PLAYBACK, | ||
209 | }; | ||
210 | |||
203 | static struct snd_soc_dai_link smdk_dai[] = { | 211 | static struct snd_soc_dai_link smdk_dai[] = { |
204 | { /* Primary Playback i/f */ | 212 | [PRI_PLAYBACK] = { /* Primary Playback i/f */ |
205 | .name = "WM8580 PAIF RX", | 213 | .name = "WM8580 PAIF RX", |
206 | .stream_name = "Playback", | 214 | .stream_name = "Playback", |
207 | .cpu_dai_name = "samsung-i2s.2", | 215 | .cpu_dai_name = "samsung-i2s.2", |
208 | .codec_dai_name = "wm8580-hifi-playback", | 216 | .codec_dai_name = "wm8580-hifi-playback", |
209 | .platform_name = "samsung-audio", | 217 | .platform_name = "samsung-audio", |
210 | .codec_name = "wm8580-codec.0-001b", | 218 | .codec_name = "wm8580-codec.0-001b", |
211 | .init = smdk_wm8580_init_paifrx, | 219 | .init = smdk_wm8580_init_paifrx, |
212 | .ops = &smdk_ops, | 220 | .ops = &smdk_ops, |
213 | }, | 221 | }, |
214 | { /* Primary Capture i/f */ | 222 | [PRI_CAPTURE] = { /* Primary Capture i/f */ |
215 | .name = "WM8580 PAIF TX", | 223 | .name = "WM8580 PAIF TX", |
216 | .stream_name = "Capture", | 224 | .stream_name = "Capture", |
217 | .cpu_dai_name = "samsung-i2s.2", | 225 | .cpu_dai_name = "samsung-i2s.2", |
218 | .codec_dai_name = "wm8580-hifi-capture", | 226 | .codec_dai_name = "wm8580-hifi-capture", |
219 | .platform_name = "samsung-audio", | 227 | .platform_name = "samsung-audio", |
220 | .codec_name = "wm8580-codec.0-001b", | 228 | .codec_name = "wm8580-codec.0-001b", |
221 | .init = smdk_wm8580_init_paiftx, | 229 | .init = smdk_wm8580_init_paiftx, |
222 | .ops = &smdk_ops, | 230 | .ops = &smdk_ops, |
223 | }, | 231 | }, |
232 | [SEC_PLAYBACK] = { /* Sec_Fifo Playback i/f */ | ||
233 | .name = "Sec_FIFO TX", | ||
234 | .stream_name = "Playback", | ||
235 | .cpu_dai_name = "samsung-i2s.x", | ||
236 | .codec_dai_name = "wm8580-hifi-playback", | ||
237 | .platform_name = "samsung-audio", | ||
238 | .codec_name = "wm8580-codec.0-001b", | ||
239 | .init = smdk_wm8580_init_paifrx, | ||
240 | .ops = &smdk_ops, | ||
241 | }, | ||
224 | }; | 242 | }; |
225 | 243 | ||
226 | static struct snd_soc_card smdk = { | 244 | static struct snd_soc_card smdk = { |
227 | .name = "SMDK-I2S", | 245 | .name = "SMDK-I2S", |
228 | .dai_link = smdk_dai, | 246 | .dai_link = smdk_dai, |
229 | .num_links = ARRAY_SIZE(smdk_dai), | 247 | .num_links = 2, |
230 | }; | 248 | }; |
231 | 249 | ||
232 | static struct platform_device *smdk_snd_device; | 250 | static struct platform_device *smdk_snd_device; |
@@ -234,6 +252,19 @@ static struct platform_device *smdk_snd_device; | |||
234 | static int __init smdk_audio_init(void) | 252 | static int __init smdk_audio_init(void) |
235 | { | 253 | { |
236 | int ret; | 254 | int ret; |
255 | char *str; | ||
256 | |||
257 | if (machine_is_smdkc100()) { | ||
258 | smdk.num_links = 3; | ||
259 | /* S5PC100 has I2S0 as v5 */ | ||
260 | str = (char *)smdk_dai[PRI_PLAYBACK].cpu_dai_name; | ||
261 | str[strlen(str) - 1] = '0'; | ||
262 | str = (char *)smdk_dai[PRI_CAPTURE].cpu_dai_name; | ||
263 | str[strlen(str) - 1] = '0'; | ||
264 | /* Secondary is at offset SAMSUNG_I2S_SECOFF from Primary */ | ||
265 | str = (char *)smdk_dai[SEC_PLAYBACK].cpu_dai_name; | ||
266 | str[strlen(str) - 1] = '0' + SAMSUNG_I2S_SECOFF; | ||
267 | } | ||
237 | 268 | ||
238 | smdk_snd_device = platform_device_alloc("soc-audio", -1); | 269 | smdk_snd_device = platform_device_alloc("soc-audio", -1); |
239 | if (!smdk_snd_device) | 270 | if (!smdk_snd_device) |