20 #include <linux/device.h>
22 #include <linux/module.h>
33 static int bfin_i2s_set_dai_fmt(
struct snd_soc_dai *cpu_dai,
36 struct sport_device *sport = snd_soc_dai_get_drvdata(cpu_dai);
55 dev_err(dev,
"%s: Unknown DAI format type\n", __func__);
70 dev_err(dev,
"%s: Unknown DAI master type\n", __func__);
82 struct sport_device *sport = snd_soc_dai_get_drvdata(dai);
100 param.spctl |= 0x1f0;
108 dev_err(dev,
"SPORT tx is busy!\n");
114 dev_err(dev,
"SPORT rx is busy!\n");
124 struct sport_device *sport = snd_soc_dai_get_drvdata(dai);
135 struct sport_device *sport = snd_soc_dai_get_drvdata(dai);
141 dev_err(dev,
"SPORT tx is busy!\n");
146 dev_err(dev,
"SPORT rx is busy!\n");
154 #define bfin_i2s_suspend NULL
155 #define bfin_i2s_resume NULL
158 #define BFIN_I2S_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
159 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
160 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \
161 SNDRV_PCM_RATE_96000)
163 #define BFIN_I2S_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \
164 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
167 .hw_params = bfin_i2s_hw_params,
168 .set_fmt = bfin_i2s_set_dai_fmt,
186 .ops = &bfin_i2s_dai_ops,
202 dev_err(dev,
"Failed to register DAI: %d\n", ret);
206 platform_set_drvdata(pdev, sport);
213 struct sport_device *sport = platform_get_drvdata(pdev);
222 .probe = bfin_i2s_probe,