Skip to content

Commit

Permalink
ASoC: rsnd: core.c: indicate warning if strange TDM width was set
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed Feb 10, 2023
1 parent 906b6f7 commit 1ad059a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/sh/rcar/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1ad059a

Please sign in to comment.