lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240326-dai_mclk_hint-v1-1-653cbd2d78d9@jookia.org>
Date: Tue, 26 Mar 2024 22:48:00 +1100
From: John Watts <contact@...kia.org>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, 
 Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc: linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org, 
 John Watts <contact@...kia.org>
Subject: [PATCH] ASoC: soc-dai: Note valid values of sysclock direction

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@...kia.org>
---
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@...kia.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ