Sync inav to Gitea
Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s

This commit is contained in:
2026-08-03 16:37:40 +08:00
commit dac37fd077
14095 changed files with 5603119 additions and 0 deletions
@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Release Notes for WM8994 Component Driver</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="_htmresc/mini-st.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<div class="row">
<div class="col-sm-12 col-lg-4">
<div class="card fluid">
<div class="sectione dark">
<center>
<h1 id="release-notes-for-wm8994-component-driver"><strong>Release Notes for WM8994 Component Driver</strong></h1>
<p>Copyright © 2016 STMicroelectronics<br />
</p>
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo.png" alt="ST logo" /></a>
</center>
</div>
</div>
<h1 id="license">License</h1>
This software component is licensed by ST under BSD 3-Clause license, the “License”; You may not use this component except in compliance with the License. You may obtain a copy of the License at:
<center>
<a href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a>
</center>
<h1 id="purpose">Purpose</h1>
<p>This driver provides a set of functions needed to drive WM8994, Audio Codec component</p>
</div>
<div class="col-sm-12 col-lg-8">
<h1 id="update-history">Update History</h1>
<div class="collapse">
<input type="checkbox" id="collapse-section10" checked aria-hidden="true"> <label for="collapse-section10" aria-hidden="true"><strong>V3.0.2 / 23-November-2019</strong></label>
<div>
<h2 id="main-changes">Main Changes</h2>
<ul>
<li>Update st_logo.png inclusion path in Release notes</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section9" checked aria-hidden="true"> <label for="collapse-section9" aria-hidden="true"><strong>V3.0.1 / 03-July-2019</strong></label>
<div>
<h2 id="main-changes-1">Main Changes</h2>
<ul>
<li>Update license path to BSD-3</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section8" checked aria-hidden="true"> <label for="collapse-section8" aria-hidden="true"><strong>V3.0.0 / 12-April-2019</strong></label>
<div>
<h2 id="main-changes-2">Main Changes</h2>
<p>Official release of component drivers for WM8994 in line with STM32Cube BSP drivers development guidelines (UM2298)</p>
<h2 id="backward-compatibility">Backward Compatibility</h2>
<p>This version breaks the compatibility with previous versions</p>
<h2 id="dependencies">Dependencies</h2>
<p>This software release is compatible with BSP Common V6.0.0 or above</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section7" checked aria-hidden="true"> <label for="collapse-section7" aria-hidden="true"><strong>V2.2.1 / 24-January-2018</strong></label>
<div>
<h2 id="main-changes-3">Main Changes</h2>
<ul>
<li>Fix output device headphone initialization issue</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section6" checked aria-hidden="true"> <label for="collapse-section6" aria-hidden="true"><strong>V2.2.0 / 05-June-2017</strong></label>
<div>
<h2 id="main-changes-4">Main Changes</h2>
<ul>
<li>Add support of ColdStartup sequence for headphone</li>
<li>Unmute is performed in a gradual way to minimize pop noise.</li>
<li>Update wm8994_SetFrequency to support AUDIO_FREQUENCY_32K</li>
<li>Update comments to be used for PDSC generation</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section5" checked aria-hidden="true"> <label for="collapse-section5" aria-hidden="true"><strong>V2.1.0 / 22-February-2016</strong></label>
<div>
<h2 id="main-changes-5">Main Changes</h2>
<p><strong>wm8994.c : </strong></p>
<ul>
<li>Update wm8994_Init() by adding the support of analog microphone connected to INPUT LINE 1</li>
<li>INPUT_DEVICE_DIGITAL_MICROPHONE_1 and INPUT_DEVICE_DIGITAL_MIC1_MIC2</li>
<li>Add AUDIO_FREQUENCY_32K as possible AudioFreq value</li>
</ul>
<p><strong>wm8994.h :</strong></p>
<ul>
<li>Add INPUT_DEVICE_DIGITAL_MIC1_MIC2 define</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section4" checked aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V2.0.0 / 24-June-2015</strong></label>
<div>
<h2 id="main-changes-6">Main Changes</h2>
<p><strong>wm8994.h :</strong></p>
<ul>
<li>Add codec de-initialization function: wm8994_DeInit()</li>
<li>Add Audio IO de-initialization function prototype: AUDIO_IO_DeInit()</li>
<li>Add INPUT_DEVICE_INPUT_LINE_1 and INPUT_DEVICE_INPUT_LINE_1 support for AUDIO IN</li>
<li>Add Input audio volume control support</li>
</ul>
<p><strong>wm8994.c :</strong></p>
<ul>
<li>Update wm8994_Init() function to support the Audio IN</li>
<li>Update wm8994_Stop() function to only stop the codec if it was configured</li>
<li>Enable VMID_BUF_ENA bit in R57 ANTIPOP register (address 0x39) for all configurations</li>
</ul>
<h2 id="dependencies-1">Dependencies</h2>
<p>This release must be used with BSP Common driver V4.0.0 or later</p>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section3" checked aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.0.2 / 12-February-2015</strong></label>
<div>
<h2 id="main-changes-7">Main Changes</h2>
<p><strong>wm8994.c: </strong></p>
<ul>
<li>Update the wm8994_Init() function to set the volume after enabling the dynamic charge pump power control mode</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.0.1 / 24-June-2015</strong></label>
<div>
<h2 id="main-changes-8">Main Changes</h2>
<p><strong>wm8994.h: </strong></p>
<ul>
<li>change “" by”/" in the include path to fix compilation issue with Linux</li>
</ul>
</div>
</div>
<div class="collapse">
<input type="checkbox" id="collapse-section1" checked aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 24-June-2015</strong></label>
<div>
<h2 id="main-changes-9">Main Changes</h2>
<ul>
<li>First official release of <strong>WM8994</strong> audio component drivers</li>
</ul>
</div>
</div>
</div>
</div>
<footer class="sticky">
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <span style="font-color: blue;"><a href="http://www.st.com/STM32">www.st.com</a></span>
</footer>
</body>
</html>
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,231 @@
/**
******************************************************************************
* @file wm8994.h
* @author MCD Application Team
* @brief This file contains all the functions prototypes for the
* wm8994.c driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2014 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef WM8994_H
#define WM8994_H
/* Includes ------------------------------------------------------------------*/
#include "wm8994_reg.h"
#include <stddef.h>
/** @addtogroup BSP
* @{
*/
/** @addtogroup Component
* @{
*/
/** @addtogroup WM8994
* @{
*/
/** @defgroup WM8994_Exported_Types Exported Types
* @{
*/
typedef int32_t (*WM8994_Init_Func) (void);
typedef int32_t (*WM8994_DeInit_Func) (void);
typedef int32_t (*WM8994_GetTick_Func) (void);
typedef int32_t (*WM8994_Delay_Func) (uint32_t);
typedef int32_t (*WM8994_WriteReg_Func)(uint16_t, uint16_t, uint8_t*, uint16_t);
typedef int32_t (*WM8994_ReadReg_Func) (uint16_t, uint16_t, uint8_t*, uint16_t);
typedef struct
{
WM8994_Init_Func Init;
WM8994_DeInit_Func DeInit;
uint16_t Address;
WM8994_WriteReg_Func WriteReg;
WM8994_ReadReg_Func ReadReg;
WM8994_GetTick_Func GetTick;
} WM8994_IO_t;
typedef struct
{
WM8994_IO_t IO;
wm8994_ctx_t Ctx;
uint8_t IsInitialized;
} WM8994_Object_t;
typedef struct
{
uint32_t InputDevice;
uint32_t OutputDevice;
uint32_t Frequency;
uint32_t Resolution;
uint32_t Volume;
} WM8994_Init_t;
typedef struct
{
int32_t ( *Init ) ( WM8994_Object_t *, WM8994_Init_t* );
int32_t ( *DeInit ) ( WM8994_Object_t * );
int32_t ( *ReadID ) ( WM8994_Object_t *, uint32_t * );
int32_t ( *Play ) ( WM8994_Object_t * );
int32_t ( *Pause ) ( WM8994_Object_t * );
int32_t ( *Resume ) ( WM8994_Object_t * );
int32_t ( *Stop ) ( WM8994_Object_t *, uint32_t );
int32_t ( *SetFrequency ) ( WM8994_Object_t *, uint32_t );
int32_t ( *GetFrequency ) ( WM8994_Object_t *, uint32_t*);
int32_t ( *SetVolume ) ( WM8994_Object_t *, uint32_t, uint8_t );
int32_t ( *GetVolume ) ( WM8994_Object_t *, uint32_t, uint8_t*);
int32_t ( *SetMute ) ( WM8994_Object_t *, uint32_t );
int32_t ( *SetOutputMode ) ( WM8994_Object_t *, uint32_t );
int32_t ( *SetResolution ) ( WM8994_Object_t *, uint32_t );
int32_t ( *GetResolution ) ( WM8994_Object_t *, uint32_t*);
int32_t ( *SetProtocol ) ( WM8994_Object_t *, uint32_t );
int32_t ( *GetProtocol ) ( WM8994_Object_t *, uint32_t*);
int32_t ( *Reset ) ( WM8994_Object_t * );
} WM8994_Drv_t;
/**
* @}
*/
/** @defgroup WM8994_Exported_Constants Exported Constants
* @{
*/
#define WM8994_OK (0)
#define WM8994_ERROR (-1)
/******************************************************************************/
/*************************** Codec User defines ******************************/
/******************************************************************************/
/* Audio Input Device */
#define WM8994_IN_NONE 0x00U
#define WM8994_IN_MIC1 0x01U
#define WM8994_IN_MIC2 0x02U
#define WM8994_IN_LINE1 0x03U
#define WM8994_IN_LINE2 0x04U
#define WM8994_IN_MIC1_MIC2 0x05U
/* Audio Output Device */
#define WM8994_OUT_NONE 0x00U
#define WM8994_OUT_SPEAKER 0x01U
#define WM8994_OUT_HEADPHONE 0x02U
#define WM8994_OUT_BOTH 0x03U
#define WM8994_OUT_AUTO 0x04U
/* AUDIO FREQUENCY */
#define WM8994_FREQUENCY_192K 192000
#define WM8994_FREQUENCY_176K 176400
#define WM8994_FREQUENCY_96K 96000
#define WM8994_FREQUENCY_88K 88200
#define WM8994_FREQUENCY_48K 48000
#define WM8994_FREQUENCY_44K 44100
#define WM8994_FREQUENCY_32K 32000
#define WM8994_FREQUENCY_22K 22050
#define WM8994_FREQUENCY_16K 16000
#define WM8994_FREQUENCY_11K 11025
#define WM8994_FREQUENCY_8K 8000
/* AUDIO RESOLUTION */
#define WM8994_RESOLUTION_16b 0x00U
#define WM8994_RESOLUTION_20b 0x01U
#define WM8994_RESOLUTION_24b 0x02U
#define WM8994_RESOLUTION_32b 0x03U
/* Codec stop options */
#define WM8994_PDWN_HW 0x00U
#define WM8994_PDWN_SW 0x01U
/* Volume Input Output selection */
#define VOLUME_INPUT 0U
#define VOLUME_OUTPUT 1U
/* MUTE commands */
#define WM8994_MUTE_ON 1U
#define WM8994_MUTE_OFF 0U
/* AUDIO PROTOCOL */
#define WM8994_PROTOCOL_R_JUSTIFIED ((uint16_t)0x0000)
#define WM8994_PROTOCOL_L_JUSTIFIED ((uint16_t)0x0001)
#define WM8994_PROTOCOL_I2S ((uint16_t)0x0002)
#define WM8994_PROTOCOL_DSP ((uint16_t)0x0003)
#define VOLUME_OUT_INVERT(Volume) ((uint8_t)(((Volume) * 100) / 63))
#define VOLUME_IN_INVERT(Volume) ((uint8_t)(((Volume) * 100) / 239))
/**
* @brief WM8994 ID
*/
#define WM8994_ID 0x8994U
/**
* @}
*/
/** @addtogroup WM8994_Exported_Variables
* @{
*/
/* Audio driver structure */
extern WM8994_Drv_t WM8994_Driver;
/**
* @}
*/
/** @addtogroup WM8994_Exported_Functions
* @{
*/
/*------------------------------------------------------------------------------
Audio Codec functions
------------------------------------------------------------------------------*/
/* High Layer codec functions */
int32_t WM8994_RegisterBusIO (WM8994_Object_t *pObj, WM8994_IO_t *pIO);
int32_t WM8994_Init(WM8994_Object_t *pObj, WM8994_Init_t *pInit);
int32_t WM8994_DeInit(WM8994_Object_t *pObj);
int32_t WM8994_ReadID(WM8994_Object_t *pObj, uint32_t *Id);
int32_t WM8994_Play(WM8994_Object_t *pObj);
int32_t WM8994_Pause(WM8994_Object_t *pObj);
int32_t WM8994_Resume(WM8994_Object_t *pObj);
int32_t WM8994_Stop(WM8994_Object_t *pObj, uint32_t CodecPdwnMode);
int32_t WM8994_SetVolume(WM8994_Object_t *pObj, uint32_t InputOutput, uint8_t Volume);
int32_t WM8994_GetVolume(WM8994_Object_t *pObj, uint32_t InputOutput, uint8_t *Volume);
int32_t WM8994_SetMute(WM8994_Object_t *pObj, uint32_t Cmd);
int32_t WM8994_SetOutputMode(WM8994_Object_t *pObj, uint32_t Output);
int32_t WM8994_SetResolution(WM8994_Object_t *pObj, uint32_t Resolution);
int32_t WM8994_GetResolution(WM8994_Object_t *pObj, uint32_t *Resolution);
int32_t WM8994_SetProtocol(WM8994_Object_t *pObj, uint32_t Protocol);
int32_t WM8994_GetProtocol(WM8994_Object_t *pObj, uint32_t *Protocol);
int32_t WM8994_SetFrequency(WM8994_Object_t *pObj, uint32_t AudioFreq);
int32_t WM8994_GetFrequency(WM8994_Object_t *pObj, uint32_t *AudioFreq);
int32_t WM8994_Reset(WM8994_Object_t *pObj);
/**
* @}
*/
#endif /* WM8994_H */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff