You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/10/30 15:04:00 UTC

[incubator-nuttx] 19/22: Fix Error: audio/cs43l22.c:356:24: error: unused function 'cs43l22_scalevolume' [-Werror,-Wunused-function]

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 04863785f13ba9cd98dfc3a2655862ab53749acf
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Oct 30 01:13:28 2022 +0800

    Fix Error: audio/cs43l22.c:356:24: error: unused function 'cs43l22_scalevolume' [-Werror,-Wunused-function]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/audio/cs43l22.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/audio/cs43l22.c b/drivers/audio/cs43l22.c
index ec763e3f31..299518f028 100644
--- a/drivers/audio/cs43l22.c
+++ b/drivers/audio/cs43l22.c
@@ -63,7 +63,6 @@ static void cs43l22_writereg(FAR struct cs43l22_dev_s *priv, uint8_t regaddr,
                              uint8_t regval);
 
 #ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
-static inline uint16_t cs43l22_scalevolume(uint16_t volume, b16_t scale);
 static void cs43l22_setvolume(FAR struct cs43l22_dev_s *priv,
                               uint16_t volume, bool mute);
 #endif
@@ -343,22 +342,6 @@ cs43l22_writereg(FAR struct cs43l22_dev_s *priv, uint8_t regaddr,
     }
 }
 
-/****************************************************************************
- * Name: cs43l22_scalevolume
- *
- * Description:
- *   Set the right and left volume values in the CS43L22 device based on the
- *   current volume and balance settings.
- *
- ****************************************************************************/
-
-#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
-static inline uint16_t cs43l22_scalevolume(uint16_t volume, b16_t scale)
-{
-  return b16toi((b16_t) volume * scale);
-}
-#endif
-
 /****************************************************************************
  * Name: cs43l22_setvolume
  *