Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170239
b: refs/heads/master
c: 1452556
h: refs/heads/master
i:
  170237: 1171b04
  170235: 9dbe4b4
  170231: ea3f427
  170223: cd24121
  170207: cd0302c
  170175: b0a3c5e
  170111: 32f4783
  169983: e3df3fc
v: v3
  • Loading branch information
Mark Brown committed Nov 18, 2009
1 parent 3b22b8c commit bf796ac
Show file tree
Hide file tree
Showing 68 changed files with 897 additions and 140 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9ede4eca01cc64ce37549c282b6fde727c0ec84
refs/heads/master: 1452556bebc302121eea5dfb3cbd464824406bb8
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-s3c6400/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#define S3C64XX_PA_IIS1 (0x7F003000)
#define S3C64XX_PA_TIMER (0x7F006000)
#define S3C64XX_PA_IIC0 (0x7F004000)
#define S3C64XX_PA_PCM0 (0x7F009000)
#define S3C64XX_PA_PCM1 (0x7F00A000)
#define S3C64XX_PA_IISV4 (0x7F00D000)
#define S3C64XX_PA_IIC1 (0x7F00F000)

Expand Down
17 changes: 17 additions & 0 deletions trunk/arch/arm/plat-s3c/include/plat/audio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* arch/arm/plat-s3c/include/plat/audio.h
*
* Copyright (c) 2009 Samsung Electronics Co. Ltd
* Author: Jaswinder Singh <jassi.brar@samsung.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

/**
* struct s3c_audio_pdata - common platform data for audio device drivers
* @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
*/
struct s3c_audio_pdata {
int (*cfg_gpio)(struct platform_device *);
};
3 changes: 3 additions & 0 deletions trunk/arch/arm/plat-s3c/include/plat/devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ extern struct platform_device s3c64xx_device_iis0;
extern struct platform_device s3c64xx_device_iis1;
extern struct platform_device s3c64xx_device_iisv4;

extern struct platform_device s3c64xx_device_pcm0;
extern struct platform_device s3c64xx_device_pcm1;

extern struct platform_device s3c_device_fb;
extern struct platform_device s3c_device_usb;
extern struct platform_device s3c_device_lcd;
Expand Down
101 changes: 100 additions & 1 deletion trunk/arch/arm/plat-s3c64xx/dev-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@

#include <mach/irqs.h>
#include <mach/map.h>
#include <mach/dma.h>
#include <mach/gpio.h>

#include <plat/devs.h>

#include <plat/audio.h>
#include <plat/gpio-bank-d.h>
#include <plat/gpio-bank-e.h>
#include <plat/gpio-cfg.h>

static struct resource s3c64xx_iis0_resource[] = {
[0] = {
Expand Down Expand Up @@ -66,3 +71,97 @@ struct platform_device s3c64xx_device_iisv4 = {
.resource = s3c64xx_iisv4_resource,
};
EXPORT_SYMBOL(s3c64xx_device_iisv4);


/* PCM Controller platform_devices */

static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
{
switch (pdev->id) {
case 0:
s3c_gpio_cfgpin(S3C64XX_GPD(0), S3C64XX_GPD0_PCM0_SCLK);
s3c_gpio_cfgpin(S3C64XX_GPD(1), S3C64XX_GPD1_PCM0_EXTCLK);
s3c_gpio_cfgpin(S3C64XX_GPD(2), S3C64XX_GPD2_PCM0_FSYNC);
s3c_gpio_cfgpin(S3C64XX_GPD(3), S3C64XX_GPD3_PCM0_SIN);
s3c_gpio_cfgpin(S3C64XX_GPD(4), S3C64XX_GPD4_PCM0_SOUT);
break;
case 1:
s3c_gpio_cfgpin(S3C64XX_GPE(0), S3C64XX_GPE0_PCM1_SCLK);
s3c_gpio_cfgpin(S3C64XX_GPE(1), S3C64XX_GPE1_PCM1_EXTCLK);
s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_PCM1_FSYNC);
s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_PCM1_SIN);
s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT);
break;
default:
printk(KERN_DEBUG "Invalid PCM Controller number!");
return -EINVAL;
}

return 0;
}

static struct resource s3c64xx_pcm0_resource[] = {
[0] = {
.start = S3C64XX_PA_PCM0,
.end = S3C64XX_PA_PCM0 + 0x100 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_PCM0_TX,
.end = DMACH_PCM0_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_PCM0_RX,
.end = DMACH_PCM0_RX,
.flags = IORESOURCE_DMA,
},
};

struct s3c_audio_pdata s3c_pcm0_pdata = {
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
};

struct platform_device s3c64xx_device_pcm0 = {
.name = "samsung-pcm",
.id = 0,
.num_resources = ARRAY_SIZE(s3c64xx_pcm0_resource),
.resource = s3c64xx_pcm0_resource,
.dev = {
.platform_data = &s3c_pcm0_pdata,
},
};
EXPORT_SYMBOL(s3c64xx_device_pcm0);

static struct resource s3c64xx_pcm1_resource[] = {
[0] = {
.start = S3C64XX_PA_PCM1,
.end = S3C64XX_PA_PCM1 + 0x100 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_PCM1_TX,
.end = DMACH_PCM1_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMACH_PCM1_RX,
.end = DMACH_PCM1_RX,
.flags = IORESOURCE_DMA,
},
};

struct s3c_audio_pdata s3c_pcm1_pdata = {
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
};

struct platform_device s3c64xx_device_pcm1 = {
.name = "samsung-pcm",
.id = 1,
.num_resources = ARRAY_SIZE(s3c64xx_pcm1_resource),
.resource = s3c64xx_pcm1_resource,
.dev = {
.platform_data = &s3c_pcm1_pdata,
},
};
EXPORT_SYMBOL(s3c64xx_device_pcm1);
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/ad1836.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ static int ad1836_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, ad1836_dapm_widgets,
ARRAY_SIZE(ad1836_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);

pcm_err:
return ret;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/ad1938.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ static int ad1938_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, ad1938_dapm_widgets,
ARRAY_SIZE(ad1938_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);

ad1938_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/ak4535.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ static int ak4535_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/ak4671.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ static int ak4671_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/cx20442.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ static int cx20442_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, cx20442_audio_map,
ARRAY_SIZE(cx20442_audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/ssm2602.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ static int ssm2602_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_conn, ARRAY_SIZE(audio_conn));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/tlv320aic23.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec)
/* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ static int aic3x_add_widgets(struct snd_soc_codec *codec)
/* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/tlv320dac33.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ static int dac33_add_widgets(struct snd_soc_codec *codec)

/* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);

return 0;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,6 @@ static int twl4030_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ static int uda1380_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static int wm8350_add_widgets(struct snd_soc_codec *codec)
return ret;
}

return snd_soc_dapm_new_widgets(codec);
return 0;
}

static int wm8350_set_dai_sysclk(struct snd_soc_dai *codec_dai,
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,6 @@ static int wm8400_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8510.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ static int wm8510_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8523.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ static int wm8523_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8580.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ static int wm8580_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8711.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ static int wm8711_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/soc/codecs/wm8728.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ static int wm8728_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ static int wm8731_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8750.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ static int wm8753_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/soc/codecs/wm8900.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,6 @@ static int wm8900_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);

return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,6 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));

snd_soc_dapm_new_widgets(codec);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8940.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ static int wm8940_add_widgets(struct snd_soc_codec *codec)
ret = snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
if (ret)
goto error_ret;
ret = snd_soc_dapm_new_widgets(codec);

error_ret:
return ret;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8961.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,6 @@ static int wm8961_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, wm8961_dapm_widgets,
ARRAY_SIZE(wm8961_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);

return ret;

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/soc/codecs/wm8971.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ static int wm8971_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);

return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8974.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ static int wm8974_add_widgets(struct snd_soc_codec *codec)

snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8988.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,6 @@ static int wm8988_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, wm8988_dapm_widgets,
ARRAY_SIZE(wm8988_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);

return ret;

Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8990.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ static int wm8990_add_widgets(struct snd_soc_codec *codec)
/* set up the WM8990 audio map */
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));

snd_soc_dapm_new_widgets(codec);
return 0;
}

Expand Down
Loading

0 comments on commit bf796ac

Please sign in to comment.