Skip to content

Commit

Permalink
ALSA: asoc: at91 - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.
Browse files Browse the repository at this point in the history
This patch merges struct snd_soc_codec_dai and struct
snd_soc_cpu_dai into struct snd_soc_dai for the AT91 platform.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Liam Girdwood authored and Jaroslav Kysela committed Jul 10, 2008
1 parent 453ba20 commit d37ae53
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions sound/soc/at91/at91-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int at91_pcm_preallocate_dma_buffer(struct snd_pcm *pcm,
static u64 at91_pcm_dmamask = 0xffffffff;

static int at91_pcm_new(struct snd_card *card,
struct snd_soc_codec_dai *dai, struct snd_pcm *pcm)
struct snd_soc_dai *dai, struct snd_pcm *pcm)
{
int ret = 0;

Expand Down Expand Up @@ -367,7 +367,7 @@ static void at91_pcm_free_dma_buffers(struct snd_pcm *pcm)

#ifdef CONFIG_PM
static int at91_pcm_suspend(struct platform_device *pdev,
struct snd_soc_cpu_dai *dai)
struct snd_soc_dai *dai)
{
struct snd_pcm_runtime *runtime = dai->runtime;
struct at91_runtime_data *prtd;
Expand All @@ -392,7 +392,7 @@ static int at91_pcm_suspend(struct platform_device *pdev,
}

static int at91_pcm_resume(struct platform_device *pdev,
struct snd_soc_cpu_dai *dai)
struct snd_soc_dai *dai)
{
struct snd_pcm_runtime *runtime = dai->runtime;
struct at91_runtime_data *prtd;
Expand Down
12 changes: 6 additions & 6 deletions sound/soc/at91/at91-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static void at91_ssc_shutdown(struct snd_pcm_substream *substream)
/*
* Record the SSC system clock rate.
*/
static int at91_ssc_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai,
static int at91_ssc_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
int clk_id, unsigned int freq, int dir)
{
/*
Expand All @@ -303,7 +303,7 @@ static int at91_ssc_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai,
/*
* Record the DAI format for use in hw_params().
*/
static int at91_ssc_set_dai_fmt(struct snd_soc_cpu_dai *cpu_dai,
static int at91_ssc_set_dai_fmt(struct snd_soc_dai *cpu_dai,
unsigned int fmt)
{
struct at91_ssc_info *ssc_p = &ssc_info[cpu_dai->id];
Expand All @@ -315,7 +315,7 @@ static int at91_ssc_set_dai_fmt(struct snd_soc_cpu_dai *cpu_dai,
/*
* Record SSC clock dividers for use in hw_params().
*/
static int at91_ssc_set_dai_clkdiv(struct snd_soc_cpu_dai *cpu_dai,
static int at91_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
int div_id, int div)
{
struct at91_ssc_info *ssc_p = &ssc_info[cpu_dai->id];
Expand Down Expand Up @@ -634,7 +634,7 @@ static int at91_ssc_prepare(struct snd_pcm_substream *substream)

#ifdef CONFIG_PM
static int at91_ssc_suspend(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai)
struct snd_soc_dai *cpu_dai)
{
struct at91_ssc_info *ssc_p;

Expand Down Expand Up @@ -662,7 +662,7 @@ static int at91_ssc_suspend(struct platform_device *pdev,
}

static int at91_ssc_resume(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai)
struct snd_soc_dai *cpu_dai)
{
struct at91_ssc_info *ssc_p;

Expand Down Expand Up @@ -700,7 +700,7 @@ static int at91_ssc_resume(struct platform_device *pdev,
#define AT91_SSC_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |\
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)

struct snd_soc_cpu_dai at91_ssc_dai[NUM_SSC_DEVICES] = {
struct snd_soc_dai at91_ssc_dai[NUM_SSC_DEVICES] = {
{ .name = "at91-ssc0",
.id = 0,
.type = SND_SOC_DAI_PCM,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/at91/at91-ssc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define AT91SSC_TCMR_PERIOD 1 /* BCLK divider for transmit FS */
#define AT91SSC_RCMR_PERIOD 2 /* BCLK divider for receive FS */

extern struct snd_soc_cpu_dai at91_ssc_dai[];
extern struct snd_soc_dai at91_ssc_dai[];

#endif /* _AT91_SSC_H */

8 changes: 4 additions & 4 deletions sound/soc/at91/eti_b1_wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static struct clk *pllb_clk;
static int eti_b1_startup(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_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;
int ret;

/* cpu clock is the AT91 master clock sent to the SSC */
Expand Down Expand Up @@ -87,8 +87,8 @@ static int eti_b1_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;
int ret;

#ifdef CONFIG_SND_AT91_SOC_ETI_SLAVE
Expand Down

0 comments on commit d37ae53

Please sign in to comment.