aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-utils.c')
-rw-r--r--sound/soc/soc-utils.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index ec921ec99c2..cd987de341f 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -57,7 +57,36 @@ int snd_soc_params_to_bclk(struct snd_pcm_hw_params *params)
57} 57}
58EXPORT_SYMBOL_GPL(snd_soc_params_to_bclk); 58EXPORT_SYMBOL_GPL(snd_soc_params_to_bclk);
59 59
60static struct snd_soc_platform_driver dummy_platform; 60static const struct snd_pcm_hardware dummy_dma_hardware = {
61 .formats = 0xffffffff,
62 .channels_min = 1,
63 .channels_max = UINT_MAX,
64
65 /* Random values to keep userspace happy when checking constraints */
66 .info = SNDRV_PCM_INFO_INTERLEAVED |
67 SNDRV_PCM_INFO_BLOCK_TRANSFER,
68 .buffer_bytes_max = 128*1024,
69 .period_bytes_min = PAGE_SIZE,
70 .period_bytes_max = PAGE_SIZE*2,
71 .periods_min = 2,
72 .periods_max = 128,
73};
74
75static int dummy_dma_open(struct snd_pcm_substream *substream)
76{
77 snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
78
79 return 0;
80}
81
82static struct snd_pcm_ops dummy_dma_ops = {
83 .open = dummy_dma_open,
84 .ioctl = snd_pcm_lib_ioctl,
85};
86
87static struct snd_soc_platform_driver dummy_platform = {
88 .ops = &dummy_dma_ops,
89};
61 90
62static __devinit int snd_soc_dummy_probe(struct platform_device *pdev) 91static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)
63{ 92{