15 #include <linux/module.h>
27 #ifdef CONFIG_SFFSDR_FPGA
28 #include <asm/plat-sffsdr/sffsdr-fpga.h>
33 #include "../codecs/pcm3008.h"
41 #define AUDIO_FORMAT (SND_SOC_DAIFMT_DSP_B | \
42 SND_SOC_DAIFMT_CBM_CFS | \
56 #ifndef CONFIG_SFFSDR_FPGA
59 pr_debug(
"warning: only 44.1 kHz is supported without SFFSDR FPGA module\n");
69 pr_debug(
"sffsdr_hw_params: rate = %d Hz\n", fs);
71 #ifndef CONFIG_SFFSDR_FPGA
74 return sffsdr_fpga_set_codec_fs(fs);
79 .hw_params = sffsdr_hw_params,
85 .stream_name =
"PCM3008 HiFi",
86 .cpu_dai_name =
"davinci-mcbsp",
87 .codec_dai_name =
"pcm3008-hifi",
88 .codec_name =
"pcm3008-codec",
89 .platform_name =
"davinci-mcbsp",
95 .name =
"DaVinci SFFSDR",
97 .dai_link = &sffsdr_dai,
103 .dem0_pin =
GPIO(45),
104 .dem1_pin =
GPIO(46),
105 .pdad_pin =
GPIO(47),
106 .pdda_pin =
GPIO(38),
110 .name =
"pcm3008-codec",
113 .platform_data = &sffsdr_pcm3008_setup,
117 static struct resource sffsdr_snd_resources[] = {
119 .start = DAVINCI_MCBSP_BASE,
120 .end = DAVINCI_MCBSP_BASE +
SZ_8K - 1,
125 static struct evm_snd_platform_data sffsdr_snd_data = {
132 static int __init sffsdr_init(
void)
136 if (!machine_is_sffsdr())
142 if (!sffsdr_snd_device) {
147 platform_set_drvdata(sffsdr_snd_device, &snd_soc_sffsdr);
149 sizeof(sffsdr_snd_data));
152 sffsdr_snd_resources,
170 static void __exit sffsdr_exit(
void)