Skip to content

Commit

Permalink
ASoC: Split s3c2412-i2s.c into core and SoC specific parts
Browse files Browse the repository at this point in the history
The S3C2412 I2S (IIS) interface is replicated on further Samsung SoC
parts in a broadly compatible way, so split the common code out into
a core called s3c-i2s-v2.[ch] so that the newer SoCs such as the
S3C6410 can make use of it.

As such, all the original s3c2412 functions are currently being left
with their original names, and will be renamed later in the series.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Ben Dooks authored and Mark Brown committed Mar 6, 2009
1 parent 3093e48 commit dc85447
Show file tree
Hide file tree
Showing 7 changed files with 767 additions and 593 deletions.
4 changes: 4 additions & 0 deletions sound/soc/s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ config SND_S3C24XX_SOC
config SND_S3C24XX_SOC_I2S
tristate

config SND_S3C_I2SV2_SOC
tristate

config SND_S3C2412_SOC_I2S
tristate
select SND_S3C_I2SV2_SOC

config SND_S3C2443_SOC_AC97
tristate
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/s3c24xx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ snd-soc-s3c24xx-objs := s3c24xx-pcm.o
snd-soc-s3c24xx-i2s-objs := s3c24xx-i2s.o
snd-soc-s3c2412-i2s-objs := s3c2412-i2s.o
snd-soc-s3c2443-ac97-objs := s3c2443-ac97.o
snd-soc-s3c-i2s-v2-objs := s3c-i2s-v2.o

obj-$(CONFIG_SND_S3C24XX_SOC) += snd-soc-s3c24xx.o
obj-$(CONFIG_SND_S3C24XX_SOC_I2S) += snd-soc-s3c24xx-i2s.o
obj-$(CONFIG_SND_S3C2443_SOC_AC97) += snd-soc-s3c2443-ac97.o
obj-$(CONFIG_SND_S3C2412_SOC_I2S) += snd-soc-s3c2412-i2s.o
obj-$(CONFIG_SND_S3C_I2SV2_SOC) += snd-soc-s3c-i2s-v2.o

# S3C24XX Machine Support
snd-soc-jive-wm8750-objs := jive_wm8750.o
Expand Down
6 changes: 3 additions & 3 deletions sound/soc/s3c24xx/jive_wm8750.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
struct s3c2412_rate_calc div;
struct s3c_i2sv2_rate_calc div;
unsigned int clk = 0;
int ret = 0;

Expand All @@ -83,8 +83,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
break;
}

s3c2412_iis_calc_rate(&div, NULL, params_rate(params),
s3c2412_get_iisclk());
s3c_i2sv2_calc_rate(&div, NULL, params_rate(params),
s3c2412_get_iisclk());

/* set codec DAI configuration */
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
Expand Down
Loading

0 comments on commit dc85447

Please sign in to comment.