Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157720
b: refs/heads/master
c: faf907c
h: refs/heads/master
v: v3
  • Loading branch information
Shine Liu authored and Mark Brown committed Aug 25, 2009
1 parent d6eea9a commit 0c0ed07
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 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: d09a2afc9359407114b7062519101f1ee2d05388
refs/heads/master: faf907c7ba3d7df6266366556817f2ef7314640a
10 changes: 10 additions & 0 deletions trunk/sound/soc/s3c24xx/s3c-i2s-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
unsigned long irqs;
int ret = 0;
int channel = ((struct s3c24xx_pcm_dma_params *)
rtd->dai->cpu_dai->dma_data)->channel;

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

Expand Down Expand Up @@ -416,6 +418,14 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
s3c2412_snd_txctrl(i2s, 1);

local_irq_restore(irqs);

/*
* Load the next buffer to DMA to meet the reqirement
* of the auto reload mechanism of S3C24XX.
* This call won't bother S3C64XX.
*/
s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED);

break;

case SNDRV_PCM_TRIGGER_STOP:
Expand Down
10 changes: 10 additions & 0 deletions trunk/sound/soc/s3c24xx/s3c2443-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
u32 ac_glbctrl;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
int channel = ((struct s3c24xx_pcm_dma_params *)
rtd->dai->cpu_dai->dma_data)->channel;

ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);
switch (cmd) {
Expand All @@ -312,6 +315,8 @@ static int s3c2443_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
}
writel(ac_glbctrl, s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);

s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED);

return 0;
}

Expand All @@ -334,6 +339,9 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
u32 ac_glbctrl;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
int channel = ((struct s3c24xx_pcm_dma_params *)
rtd->dai->cpu_dai->dma_data)->channel;

ac_glbctrl = readl(s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);
switch (cmd) {
Expand All @@ -349,6 +357,8 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
}
writel(ac_glbctrl, s3c24xx_ac97.regs + S3C_AC97_GLBCTRL);

s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED);

return 0;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/sound/soc/s3c24xx/s3c24xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
int ret = 0;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
int channel = ((struct s3c24xx_pcm_dma_params *)
rtd->dai->cpu_dai->dma_data)->channel;

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

Expand All @@ -296,6 +299,8 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
s3c24xx_snd_rxctrl(1);
else
s3c24xx_snd_txctrl(1);

s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/s3c24xx/s3c24xx-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ static int s3c24xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
prtd->state |= ST_RUNNING;
s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_START);
s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_STARTED);
break;

case SNDRV_PCM_TRIGGER_STOP:
Expand Down

0 comments on commit 0c0ed07

Please sign in to comment.