Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283886
b: refs/heads/master
c: 102477b
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 6, 2011
1 parent 78d5cc4 commit 847cf46
Show file tree
Hide file tree
Showing 2 changed files with 31 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: a2760e4b368ce61fbf0cc073b09bb6ed07a36b27
refs/heads/master: 102477b6380978b1532e5d1f769155026a332aff
31 changes: 30 additions & 1 deletion trunk/sound/soc/soc-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,36 @@ int snd_soc_params_to_bclk(struct snd_pcm_hw_params *params)
}
EXPORT_SYMBOL_GPL(snd_soc_params_to_bclk);

static struct snd_soc_platform_driver dummy_platform;
static const struct snd_pcm_hardware dummy_dma_hardware = {
.formats = 0xffffffff,
.channels_min = 1,
.channels_max = UINT_MAX,

/* Random values to keep userspace happy when checking constraints */
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER,
.buffer_bytes_max = 128*1024,
.period_bytes_min = PAGE_SIZE,
.period_bytes_max = PAGE_SIZE*2,
.periods_min = 2,
.periods_max = 128,
};

static int dummy_dma_open(struct snd_pcm_substream *substream)
{
snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);

return 0;
}

static struct snd_pcm_ops dummy_dma_ops = {
.open = dummy_dma_open,
.ioctl = snd_pcm_lib_ioctl,
};

static struct snd_soc_platform_driver dummy_platform = {
.ops = &dummy_dma_ops,
};

static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)
{
Expand Down

0 comments on commit 847cf46

Please sign in to comment.