[PATCH] ASoC: soc-dai: Note valid values of sysclock direction
From: John Watts
Date: Tue Mar 26 2024 - 07:48:22 EST
Clock direction is marked as 'unsigned int' but only two values are
currently used in practice. Note these down in the documentation.
Signed-off-by: John Watts <contact@xxxxxxxxxx>
---
When writing a driver I wasn't sure what values of 'dir' to check against,
so I decided to note them down in the documentation.
I'm not sure exactly how correct this is: All the drivers I've checked use
these values, though I'm sure some code uses 0 or 1 somewhere or something
like 'if (dir)'. Maybe changing to an enum would help here? I'm not sure.
---
sound/soc/soc-dai.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 6f8773a8fc05..fefe394dce72 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -45,7 +45,7 @@ static inline int _soc_dai_ret(struct snd_soc_dai *dai,
* @dai: DAI
* @clk_id: DAI specific clock ID
* @freq: new clock frequency in Hz
- * @dir: new clock direction - input/output.
+ * @dir: new clock direction (SND_SOC_CLOCK_IN or SND_SOC_CLOCK_OUT)
*
* Configures the DAI master (MCLK) or system (SYSCLK) clocking.
*/
---
base-commit: 72fb52fb0ac44b6a1edd9bc390e44bce3acccd26
change-id: 20240326-dai_mclk_hint-715cbdb09207
Best regards,
--
John Watts <contact@xxxxxxxxxx>