#include "i2s.h"
#include "audio_hw.h"
+#if 0
static int aml_i2s2in_clk_support(struct aml_i2s2 *i2s2)
{
int ret = 0;
return ret;
}
+#endif
static int aml_i2s2in_set_clks(struct aml_i2s2 *i2s2, unsigned int rate)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct aml_runtime_data *prtd = runtime->private_data;
struct audio_stream *s = &prtd->s;
- struct aml_i2s2 *i2s2 = snd_soc_dai_get_drvdata(dai);
+ // struct aml_i2s2 *i2s2 = snd_soc_dai_get_drvdata(dai);
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
/* dev_info(substream->pcm->card->dev,
}
/* i2s in module clk */
- if (aml_i2s2in_clk_support(i2s2))
+ if (0/* aml_i2s2in_clk_support(i2s2) */)
audio_in_clk_sel();
} else {
dev_info(substream->pcm->card->dev,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
aml_hw_iec958_init(substream, 0);
} else {
- audio_in_spdif_set_buf(runtime->dma_addr,
+ if (runtime->format == SNDRV_PCM_FORMAT_S16_LE) {
+ audio_in_spdif_set_buf(runtime->dma_addr,
runtime->dma_bytes * 2, spdif_p->src);
- memset((void *)runtime->dma_area, 0, runtime->dma_bytes * 2);
+ memset((void *)runtime->dma_area,
+ 0, runtime->dma_bytes * 2);
+ } else {
+ audio_in_spdif_set_buf(runtime->dma_addr,
+ runtime->dma_bytes, spdif_p->src);
+ memset((void *)runtime->dma_area,
+ 0, runtime->dma_bytes);
+ }
}
return 0;
SNDRV_PCM_RATE_44100 |
SNDRV_PCM_RATE_48000 |
SNDRV_PCM_RATE_96000),
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
},
.ops = &spdif_dai_ops,
.suspend = aml_dai_spdif_suspend,