Merge series "SOF IMX fixes" from Daniel Baluta <daniel.baluta@oss.nxp.com>
Daniel Baluta <daniel.baluta@nxp.com>: From: Daniel Baluta <daniel.baluta@nxp.com> This patchseries contains a couple of SOF IMX fixes found during our first IMX SOF release. Daniel Baluta (7): ASoC: SOF: define INFO_ flags in dsp_ops for imx8 ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X ASoC: SOF: topology: Update SAI config bclk/fsync rate ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs sound/soc/sof/imx/imx8.c | 24 +++++++++++++++++++++--- sound/soc/sof/imx/imx8m.c | 4 ++-- sound/soc/sof/pcm.c | 8 ++++++++ sound/soc/sof/topology.c | 2 ++ 4 files changed, 33 insertions(+), 5 deletions(-) -- 2.17.1
This commit is contained in:
commit
5180ebb81a
@ -374,7 +374,7 @@ static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev,
|
||||
|
||||
static struct snd_soc_dai_driver imx8_dai[] = {
|
||||
{
|
||||
.name = "esai-port",
|
||||
.name = "esai0",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 8,
|
||||
@ -384,6 +384,17 @@ static struct snd_soc_dai_driver imx8_dai[] = {
|
||||
.channels_max = 8,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai1",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/* i.MX8 ops */
|
||||
@ -415,7 +426,14 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
|
||||
|
||||
/* DAI drivers */
|
||||
.drv = imx8_dai,
|
||||
.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
|
||||
.num_drv = ARRAY_SIZE(imx8_dai),
|
||||
|
||||
/* ALSA HW info flags */
|
||||
.hw_info = SNDRV_PCM_INFO_MMAP |
|
||||
SNDRV_PCM_INFO_MMAP_VALID |
|
||||
SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_PAUSE |
|
||||
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
|
||||
};
|
||||
EXPORT_SYMBOL(sof_imx8_ops);
|
||||
|
||||
@ -448,7 +466,7 @@ struct snd_sof_dsp_ops sof_imx8x_ops = {
|
||||
|
||||
/* DAI drivers */
|
||||
.drv = imx8_dai,
|
||||
.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
|
||||
.num_drv = ARRAY_SIZE(imx8_dai),
|
||||
|
||||
/* ALSA HW info flags */
|
||||
.hw_info = SNDRV_PCM_INFO_MMAP |
|
||||
|
@ -239,7 +239,7 @@ static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev,
|
||||
|
||||
static struct snd_soc_dai_driver imx8m_dai[] = {
|
||||
{
|
||||
.name = "sai-port",
|
||||
.name = "sai3",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
@ -280,7 +280,7 @@ struct snd_sof_dsp_ops sof_imx8m_ops = {
|
||||
|
||||
/* DAI drivers */
|
||||
.drv = imx8m_dai,
|
||||
.num_drv = 1, /* we have only 1 SAI interface on i.MX8M */
|
||||
.num_drv = ARRAY_SIZE(imx8m_dai),
|
||||
|
||||
.hw_info = SNDRV_PCM_INFO_MMAP |
|
||||
SNDRV_PCM_INFO_MMAP_VALID |
|
||||
|
@ -718,17 +718,25 @@ static int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
|
||||
/* do nothing for ALH dai_link */
|
||||
break;
|
||||
case SOF_DAI_IMX_ESAI:
|
||||
rate->min = dai->dai_config->esai.fsync_rate;
|
||||
rate->max = dai->dai_config->esai.fsync_rate;
|
||||
channels->min = dai->dai_config->esai.tdm_slots;
|
||||
channels->max = dai->dai_config->esai.tdm_slots;
|
||||
|
||||
dev_dbg(component->dev,
|
||||
"rate_min: %d rate_max: %d\n", rate->min, rate->max);
|
||||
dev_dbg(component->dev,
|
||||
"channels_min: %d channels_max: %d\n",
|
||||
channels->min, channels->max);
|
||||
break;
|
||||
case SOF_DAI_IMX_SAI:
|
||||
rate->min = dai->dai_config->sai.fsync_rate;
|
||||
rate->max = dai->dai_config->sai.fsync_rate;
|
||||
channels->min = dai->dai_config->sai.tdm_slots;
|
||||
channels->max = dai->dai_config->sai.tdm_slots;
|
||||
|
||||
dev_dbg(component->dev,
|
||||
"rate_min: %d rate_max: %d\n", rate->min, rate->max);
|
||||
dev_dbg(component->dev,
|
||||
"channels_min: %d channels_max: %d\n",
|
||||
channels->min, channels->max);
|
||||
|
@ -2831,6 +2831,8 @@ static int sof_link_sai_load(struct snd_soc_component *scomp, int index,
|
||||
}
|
||||
|
||||
config->sai.mclk_rate = le32_to_cpu(hw_config->mclk_rate);
|
||||
config->sai.bclk_rate = le32_to_cpu(hw_config->bclk_rate);
|
||||
config->sai.fsync_rate = le32_to_cpu(hw_config->fsync_rate);
|
||||
config->sai.mclk_direction = hw_config->mclk_direction;
|
||||
|
||||
config->sai.tdm_slots = le32_to_cpu(hw_config->tdm_slots);
|
||||
|
Loading…
Reference in New Issue
Block a user