29 #include <linux/module.h>
31 #include <linux/device.h>
41 #include <asm/cacheflush.h>
46 #include "../codecs/ad73311.h"
50 #if CONFIG_SND_BF5XX_SPORT_NUM == 0
51 #define bfin_write_SPORT_TCR1 bfin_write_SPORT0_TCR1
52 #define bfin_read_SPORT_TCR1 bfin_read_SPORT0_TCR1
53 #define bfin_write_SPORT_TCR2 bfin_write_SPORT0_TCR2
54 #define bfin_write_SPORT_TX16 bfin_write_SPORT0_TX16
55 #define bfin_read_SPORT_STAT bfin_read_SPORT0_STAT
57 #define bfin_write_SPORT_TCR1 bfin_write_SPORT1_TCR1
58 #define bfin_read_SPORT_TCR1 bfin_read_SPORT1_TCR1
59 #define bfin_write_SPORT_TCR2 bfin_write_SPORT1_TCR2
60 #define bfin_write_SPORT_TX16 bfin_write_SPORT1_TX16
61 #define bfin_read_SPORT_STAT bfin_read_SPORT1_STAT
64 #define GPIO_SE CONFIG_SND_BFIN_AD73311_SE
68 static int snd_ad73311_startup(
void)
77 static int snd_ad73311_configure(
void)
79 unsigned short ctrl_regs[6];
98 snd_ad73311_startup();
108 for (count = 0; count < 6; count++)
115 while (!(status &
TUVF) && ++count < 10000) {
124 if (count >= 10000) {
141 err = snd_ad73311_configure();
148 #define BF5XX_AD7311_DAI_FMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | \
149 SND_SOC_DAIFMT_CBM_CFM)
154 .stream_name =
"AD73311",
155 .cpu_dai_name =
"bfin-i2s.0",
156 .codec_dai_name =
"ad73311-hifi",
157 .platform_name =
"bfin-i2s-pcm-audio",
158 .codec_name =
"ad73311",
163 .stream_name =
"AD73311",
164 .cpu_dai_name =
"bfin-i2s.1",
165 .codec_dai_name =
"ad73311-hifi",
166 .platform_name =
"bfin-i2s-pcm-audio",
167 .codec_name =
"ad73311",
173 .name =
"bfin-ad73311",
175 .probe = bf5xx_probe,
176 .dai_link = &bf5xx_ad73311_dai[CONFIG_SND_BF5XX_SPORT_NUM],
182 static int __init bf5xx_ad73311_init(
void)
188 if (!bf5xx_ad73311_snd_device)
191 platform_set_drvdata(bf5xx_ad73311_snd_device, &bf5xx_ad73311);
200 static void __exit bf5xx_ad73311_exit(
void)