You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/10 19:54:42 UTC

[GitHub] [incubator-nuttx] okayserh commented on a diff in pull request #6021: Test/wm8904balance

okayserh commented on code in PR #6021:
URL: https://github.com/apache/incubator-nuttx/pull/6021#discussion_r846834189


##########
drivers/audio/wm8904.c:
##########
@@ -1210,6 +1214,30 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
           break;
 #endif /* CONFIG_AUDIO_EXCLUDE_VOLUME */
 
+#ifndef CONFIG_AUDIO_EXCLUDE_BALANCE
+        case AUDIO_FU_BALANCE:
+          {
+            /* Set the balance.  The percentage level * 10 (0-1000) is in the
+             * ac_controls.b[0] parameter.
+             */
+
+            uint16_t balance = caps->ac_controls.hw[0];
+            audinfo("    Balance: %d\n", balance);
+
+            if (balance >= 0 && balance <= 1000)

Review Comment:
   Thanks for reviewing! From "apps/system/nxplayer/nxplayer.c" (line 2142) and "apps/system/nxplayer/nxplayer_main.c" (line 120) I deduced that applications seem to assume a range from 0 to 1000 for volume and balance.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org