Skip to content

Commit 4e7f8ca

Browse files
dbalutabroonie
authored andcommitted
ASoC: SOF: imx: add min/max channels for SAI/ESAI on i.MX8/i.MX8M
This is identical with change for Intel platforms done with commit 8c05246 ("ASoC: SOF: Intel: add min/max channels for SSP on Baytrail/Broadwell") and fixes a regression on i.MX8/i.MX8M: [ 25.705750] esai-Codec: ASoC: no backend playback stream [ 27.923378] esai-Codec: ASoC: no users playback at close - state This is root-caused to the introduction of the DAI capability checks with snd_soc_dai_stream_valid(). Its use in soc-pcm.c makes it a requirement for all DAIs to report at least a non-zero min_channels field. Fixes: 9b5db05 ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported") Signed-off-by: Daniel Baluta <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fffebe8 commit 4e7f8ca

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

sound/soc/sof/imx/imx8.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,14 @@ static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev,
375375
static struct snd_soc_dai_driver imx8_dai[] = {
376376
{
377377
.name = "esai-port",
378+
.playback = {
379+
.channels_min = 1,
380+
.channels_max = 8,
381+
},
382+
.capture = {
383+
.channels_min = 1,
384+
.channels_max = 8,
385+
},
378386
},
379387
};
380388

sound/soc/sof/imx/imx8m.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev,
240240
static struct snd_soc_dai_driver imx8m_dai[] = {
241241
{
242242
.name = "sai-port",
243+
.playback = {
244+
.channels_min = 1,
245+
.channels_max = 32,
246+
},
247+
.capture = {
248+
.channels_min = 1,
249+
.channels_max = 32,
250+
},
243251
},
244252
};
245253

0 commit comments

Comments
 (0)