Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193307
b: refs/heads/master
c: 377b6f6
h: refs/heads/master
i:
  193305: 609f51e
  193303: b302363
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Mar 3, 2010
1 parent bbf5e4f commit 2ec3bd4
Show file tree
Hide file tree
Showing 2 changed files with 19 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: 50831450503b828b3f8c031aa664340062afb3b0
refs/heads/master: 377b6f62effcb91c53cd7ff8709a94d72d23b6ae
19 changes: 18 additions & 1 deletion trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,23 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
return 0;
}

/*
* soc level wrapper for pointer callback
*/
static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_card *card = socdev->card;
struct snd_soc_platform *platform = card->platform;
snd_pcm_uframes_t offset = 0;

if (platform->pcm_ops->pointer)
offset = platform->pcm_ops->pointer(substream);

return offset;
}

/* ASoC PCM operations */
static struct snd_pcm_ops soc_pcm_ops = {
.open = soc_pcm_open,
Expand All @@ -808,6 +825,7 @@ static struct snd_pcm_ops soc_pcm_ops = {
.hw_free = soc_pcm_hw_free,
.prepare = soc_pcm_prepare,
.trigger = soc_pcm_trigger,
.pointer = soc_pcm_pointer,
};

#ifdef CONFIG_PM
Expand Down Expand Up @@ -1328,7 +1346,6 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
dai_link->pcm = pcm;
pcm->private_data = rtd;
soc_pcm_ops.mmap = platform->pcm_ops->mmap;
soc_pcm_ops.pointer = platform->pcm_ops->pointer;
soc_pcm_ops.ioctl = platform->pcm_ops->ioctl;
soc_pcm_ops.copy = platform->pcm_ops->copy;
soc_pcm_ops.silence = platform->pcm_ops->silence;
Expand Down

0 comments on commit 2ec3bd4

Please sign in to comment.