You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/04/10 22:12:19 UTC
[incubator-nuttx] 03/03: Fixed source code format errors.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 218cbb470a24222c4356e5fa8f04d306db974350
Author: okayserh <o....@gmail.com>
AuthorDate: Sun Apr 10 19:11:15 2022 +0200
Fixed source code format errors.
---
drivers/audio/wm8904.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/audio/wm8904.c b/drivers/audio/wm8904.c
index 26f05e7f94..0f974c7f3c 100644
--- a/drivers/audio/wm8904.c
+++ b/drivers/audio/wm8904.c
@@ -490,9 +490,12 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume,
}
else
{
- /* Note: b16ONE - balance goes from 0 to 0.5. Hence need to multiply volume by 2! */
+ /* Note: b16ONE - balance goes from 0 to 0.5.
+ * Hence need to multiply volume by 2!
+ */
- leftlevel = wm8904_scalevolume(2 * volume, b16ONE - (b16_t)priv->balance);
+ leftlevel = wm8904_scalevolume(2 * volume,
+ b16ONE - (b16_t)priv->balance);
}
/* Calculate the right channel volume level {0..1000} */
@@ -507,9 +510,12 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume,
}
else
{
- /* Note: b16ONE - balance goes from 0 to 0.5. Hence need to multiply volume by 2! */
+ /* Note: b16ONE - balance goes from 0 to 0.5.
+ * Hence need to multiply volume by 2!
+ */
- rightlevel = wm8904_scalevolume(2 * volume, (b16_t)priv->balance);
+ rightlevel = wm8904_scalevolume(2 * volume,
+ (b16_t)priv->balance);
}
#else
leftlevel = priv->volume;
@@ -1227,7 +1233,8 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
if (balance >= 0 && balance <= 1000)
{
/* Scale the balance setting to the range {0..(b16ONE - 1)} */
- priv->balance = (balance * (b16ONE - 1)) / 1000;
+
+ priv->balance = (balance * (b16ONE - 1)) / 1000;
wm8904_setvolume(priv, priv->volume, priv->mute);
}
else