Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182774
b: refs/heads/master
c: a47979b
h: refs/heads/master
v: v3
  • Loading branch information
Chaithrika U S authored and Mark Brown committed Dec 4, 2009
1 parent ebadef0 commit cc6c949
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 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: 71f6e0645be42f93c0f90dfcc93b9d2d277c2ee6
refs/heads/master: a47979b5aa2117848b742828c98abe7eea42a9ff
18 changes: 16 additions & 2 deletions trunk/sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,27 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,
int ret = 0;

switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
if (!dev->clk_active) {
clk_enable(dev->clk);
dev->clk_active = 1;
}
/* Fall through */
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
davinci_mcasp_start(dev, substream->stream);
break;

case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
davinci_mcasp_stop(dev, substream->stream);
if (dev->clk_active) {
clk_disable(dev->clk);
dev->clk_active = 0;
}

break;

case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
davinci_mcasp_stop(dev, substream->stream);
break;
Expand Down Expand Up @@ -866,6 +879,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
}

clk_enable(dev->clk);
dev->clk_active = 1;

dev->base = (void __iomem *)IO_ADDRESS(mem->start);
dev->op_mode = pdata->op_mode;
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/davinci/davinci-mcasp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ struct davinci_audio_dev {
int sample_rate;
struct clk *clk;
unsigned int codec_fmt;
u8 clk_active;

/* McASP specific data */
int tdm_slots;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/davinci/davinci-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void print_buf_info(int slot, char *name)
static struct snd_pcm_hardware pcm_hardware_playback = {
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE),
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME),
.formats = (SNDRV_PCM_FMTBIT_S16_LE),
.rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
Expand Down

0 comments on commit cc6c949

Please sign in to comment.