diff options
| author | Takashi Iwai <tiwai@suse.de> | 2011-12-06 13:22:28 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2011-12-06 13:22:28 +0100 |
| commit | 6c39d6aca10ffac15f6decb6afd9080549fc2392 (patch) | |
| tree | 532e75637e12b3a4424d6fc56da8370d5b419806 /sound/soc/soc-utils.c | |
| parent | a020428364485751b607105c8f5a608f9b1fd38b (diff) | |
| parent | cefcc03ffc9527dde56807339edb1719c8dbae5f (diff) | |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'sound/soc/soc-utils.c')
| -rw-r--r-- | sound/soc/soc-utils.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index 0c12b98484b..4220bb0f273 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -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) { |
