ASoC: rsnd: core.c: indicate warning if strange TDM width was set

Current rsnd silently uses default TDM width if it was strange
settings. It is difficult to notice about it.
This patch indicates warning for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lel6ksqn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2023-02-10 05:13:43 +00:00 коммит произвёл Mark Brown
Родитель 906b6f7b20
Коммит 1ad059a157
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -828,6 +828,13 @@ static int rsnd_soc_set_dai_tdm_slot(struct snd_soc_dai *dai,
break;
default:
/* use default */
/*
* Indicate warning if DT has "dai-tdm-slot-width"
* but the value was not expected.
*/
if (slot_width)
dev_warn(dev, "unsupported TDM slot width (%d), force to use default 32\n",
slot_width);
slot_width = 32;
}