Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1992a6fb authored by Liam Girdwood's avatar Liam Girdwood Committed by Jaroslav Kysela
Browse files

ALSA: asoc: s3c24xx - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.



This patch merges struct snd_soc_codec_dai and struct
snd_soc_cpu_dai into struct snd_soc_dai for the S3C24xx platform.

Signed-off-by: default avatarLiam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 917f93ac
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
	struct snd_pcm_hw_params *params)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
	struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
	unsigned int pll_out = 0, bclk = 0;
	int ret = 0;
	unsigned long iis_clkrate;
@@ -156,7 +156,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;

	DBG("Entered %s\n", __func__);

@@ -176,7 +176,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream,
	struct snd_pcm_hw_params *params)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
	unsigned int pcmdiv = 0;
	int ret = 0;
	unsigned long iis_clkrate;
@@ -222,7 +222,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream,
static int neo1973_voice_hw_free(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
	struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;

	DBG("Entered %s\n", __func__);

@@ -546,7 +546,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
/*
 * BT Codec DAI
 */
static struct snd_soc_cpu_dai bt_dai = {
static struct snd_soc_dai bt_dai = {
	.name = "Bluetooth",
	.id = 0,
	.type = SND_SOC_DAI_PCM,
+7 −7
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ static inline int s3c2412_snd_is_clkmaster(void)
/*
 * Set S3C2412 I2S DAI format
 */
static int s3c2412_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai,
static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
			       unsigned int fmt)
{
	u32 iismod;
@@ -500,7 +500,7 @@ EXPORT_SYMBOL_GPL(s3c2412_iis_calc_rate);
/*
 * Set S3C2412 Clock source
 */
static int s3c2412_i2s_set_sysclk(struct snd_soc_cpu_dai *cpu_dai,
static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
				  int clk_id, unsigned int freq, int dir)
{
	u32 iismod = readl(s3c2412_i2s.regs + S3C2412_IISMOD);
@@ -528,7 +528,7 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_cpu_dai *cpu_dai,
/*
 * Set S3C2412 Clock dividers
 */
static int s3c2412_i2s_set_clkdiv(struct snd_soc_cpu_dai *cpu_dai,
static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
				  int div_id, int div)
{
	struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
@@ -602,7 +602,7 @@ EXPORT_SYMBOL_GPL(s3c2412_get_iisclk);


static int s3c2412_i2s_probe(struct platform_device *pdev,
			     struct snd_soc_cpu_dai *dai)
			     struct snd_soc_dai *dai)
{
	DBG("Entered %s\n", __func__);

@@ -648,7 +648,7 @@ static int s3c2412_i2s_probe(struct platform_device *pdev,

#ifdef CONFIG_PM
static int s3c2412_i2s_suspend(struct platform_device *dev,
			      struct snd_soc_cpu_dai *dai)
			      struct snd_soc_dai *dai)
{
	struct s3c2412_i2s_info *i2s = &s3c2412_i2s;
	u32 iismod;
@@ -676,7 +676,7 @@ static int s3c2412_i2s_suspend(struct platform_device *dev,
}

static int s3c2412_i2s_resume(struct platform_device *pdev,
			      struct snd_soc_cpu_dai *dai)
			      struct snd_soc_dai *dai)
{
	struct s3c2412_i2s_info *i2s = &s3c2412_i2s;

@@ -708,7 +708,7 @@ static int s3c2412_i2s_resume(struct platform_device *pdev,
	SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
	SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)

struct snd_soc_cpu_dai s3c2412_i2s_dai = {
struct snd_soc_dai s3c2412_i2s_dai = {
	.name	= "s3c2412-i2s",
	.id	= 0,
	.type	= SND_SOC_DAI_I2S,
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

extern struct clk *s3c2412_get_iisclk(void);

extern struct snd_soc_cpu_dai s3c2412_i2s_dai;
extern struct snd_soc_dai s3c2412_i2s_dai;

struct s3c2412_rate_calc {
	unsigned int	clk_div;	/* for prescaler */
+5 −5
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ static struct s3c24xx_pcm_dma_params s3c2443_ac97_mic_mono_in = {
};

static int s3c2443_ac97_probe(struct platform_device *pdev,
			      struct snd_soc_cpu_dai *dai)
			      struct snd_soc_dai *dai)
{
	int ret;
	u32 ac_glbctrl;
@@ -262,7 +262,7 @@ static int s3c2443_ac97_probe(struct platform_device *pdev,
}

static void s3c2443_ac97_remove(struct platform_device *pdev,
				struct snd_soc_cpu_dai *dai)
				struct snd_soc_dai *dai)
{
	free_irq(IRQ_S3C244x_AC97, NULL);
	clk_disable(s3c24xx_ac97.ac97_clk);
@@ -274,7 +274,7 @@ static int s3c2443_ac97_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;

	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
		cpu_dai->dma_data = &s3c2443_ac97_pcm_stereo_out;
@@ -316,7 +316,7 @@ static int s3c2443_ac97_hw_mic_params(struct snd_pcm_substream *substream,
	struct snd_pcm_hw_params *params)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;

	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
		return -ENODEV;
@@ -352,7 +352,7 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
		SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
		SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)

struct snd_soc_cpu_dai s3c2443_ac97_dai[] = {
struct snd_soc_dai s3c2443_ac97_dai[] = {
{
	.name = "s3c2443-ac97",
	.id = 0,
+1 −1
Original line number Diff line number Diff line
@@ -26,6 +26,6 @@
#define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97
#endif

extern struct snd_soc_cpu_dai s3c2443_ac97_dai[];
extern struct snd_soc_dai s3c2443_ac97_dai[];

#endif /*S3C24XXAC97_H_*/
Loading