Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47218
b: refs/heads/master
c: 6297027
h: refs/heads/master
v: v3
  • Loading branch information
Frank Mandarino authored and Jaroslav Kysela committed Feb 9, 2007
1 parent b88daf5 commit 5baed67
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 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: 171eb8f81d7b0706c1085d272e4955251ed9f05f
refs/heads/master: 6297027629a9349301e08442b67deb9783a5e984
7 changes: 6 additions & 1 deletion trunk/sound/soc/at91/at91-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int at91_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
runtime->dma_bytes = params_buffer_bytes(params);

prtd->params = rtd->cpu_dai->dma_data;
prtd->params = rtd->dai->cpu_dai->dma_data;
prtd->params->dma_intr_handler = at91_pcm_dma_irq;

prtd->dma_buffer = runtime->dma_addr;
Expand Down Expand Up @@ -363,6 +363,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)
{
Expand Down Expand Up @@ -410,6 +411,10 @@ static int at91_pcm_resume(struct platform_device *pdev,
at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable);
return 0;
}
#else
#define at91_pcm_suspend NULL
#define at91_pcm_resume NULL
#endif

struct snd_soc_platform at91_soc_platform = {
.name = "at91-audio",
Expand Down
9 changes: 5 additions & 4 deletions trunk/sound/soc/at91/at91-pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
* published by the Free Software Foundation.
*/

#ifndef _AT91_PCM_H
#define _AT91_PCM_H

#include <asm/arch/hardware.h>

struct at91_ssc_periph {
void __iomem *base;
u32 pid;
};


/*
* Registers and status bits that are required by the PCM driver.
*/
Expand All @@ -44,7 +46,6 @@ struct at91_ssc_mask {
u32 pdc_disable; /* PDC recv/trans disable */
};


/*
* This structure, shared between the PCM driver and the interface,
* contains all information required by the PCM driver to perform the
Expand All @@ -63,9 +64,9 @@ struct at91_pcm_dma_params {
void (*dma_intr_handler)(u32, struct snd_pcm_substream *);
};

extern struct snd_soc_cpu_dai at91_i2s_dai[3];
extern struct snd_soc_platform at91_soc_platform;


#define at91_ssc_read(a) ((unsigned long) __raw_readl(a))
#define at91_ssc_write(a,v) __raw_writel((v),(a))

#endif /* _AT91_PCM_H */

0 comments on commit 5baed67

Please sign in to comment.