2021-12-13 21:39:13 -08:00
|
|
|
/**
|
|
|
|
**************************************************************************
|
|
|
|
* @file audio_conf.h
|
|
|
|
* @brief usb audio config
|
|
|
|
**************************************************************************
|
|
|
|
* Copyright notice & Disclaimer
|
|
|
|
*
|
2022-04-11 04:50:25 -07:00
|
|
|
* The software Board Support Package (BSP) that is made available to
|
|
|
|
* download from Artery official website is the copyrighted work of Artery.
|
|
|
|
* Artery authorizes customers to use, copy, and distribute the BSP
|
|
|
|
* software and its related documentation for the purpose of design and
|
|
|
|
* development in conjunction with Artery microcontrollers. Use of the
|
2021-12-13 21:39:13 -08:00
|
|
|
* software is governed by this copyright notice and the following disclaimer.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
|
|
|
|
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
|
|
|
|
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
|
|
|
|
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
|
|
|
|
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
|
|
|
*
|
|
|
|
**************************************************************************
|
|
|
|
*/
|
2022-04-11 04:50:25 -07:00
|
|
|
|
2021-12-13 21:39:13 -08:00
|
|
|
/* define to prevent recursive inclusion -------------------------------------*/
|
|
|
|
#ifndef __AUDIO_CONF_H
|
|
|
|
#define __AUDIO_CONF_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2022-04-11 04:50:25 -07:00
|
|
|
|
2021-12-13 21:39:13 -08:00
|
|
|
|
|
|
|
/** @addtogroup AT32F435_437_middlewares_usbd_class
|
|
|
|
* @{
|
|
|
|
*/
|
2022-04-11 04:50:25 -07:00
|
|
|
|
2021-12-13 21:39:13 -08:00
|
|
|
/** @addtogroup USB_audio_class
|
|
|
|
* @{
|
|
|
|
*/
|
2022-04-11 04:50:25 -07:00
|
|
|
|
|
|
|
/** @defgroup USB_device_audio_config_definition
|
2021-12-13 21:39:13 -08:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define AUDIO_SUPPORT_SPK 1
|
|
|
|
#define AUDIO_SUPPORT_MIC 1
|
2022-01-21 00:05:17 -08:00
|
|
|
#define AUDIO_SUPPORT_FEEDBACK 1
|
2021-12-13 21:39:13 -08:00
|
|
|
|
2022-01-21 00:05:17 -08:00
|
|
|
#define AUDIO_SUPPORT_FREQ_16K 0
|
2021-12-13 21:39:13 -08:00
|
|
|
#define AUDIO_SUPPORT_FREQ_48K 1
|
|
|
|
|
|
|
|
|
|
|
|
#define AUDIO_SUPPORT_FREQ (AUDIO_SUPPORT_FREQ_16K + \
|
|
|
|
AUDIO_SUPPORT_FREQ_48K \
|
|
|
|
)
|
2022-04-11 04:50:25 -07:00
|
|
|
|
2021-12-13 21:39:13 -08:00
|
|
|
#define AUDIO_FREQ_16K 16000
|
|
|
|
#define AUDIO_FREQ_48K 48000
|
|
|
|
#define AUDIO_BITW_16 16
|
|
|
|
|
|
|
|
#define AUDIO_MIC_CHANEL_NUM 2
|
|
|
|
#define AUDIO_MIC_DEFAULT_BITW AUDIO_BITW_16
|
|
|
|
|
|
|
|
#define AUDIO_SPK_CHANEL_NUM 2
|
|
|
|
#define AUDIO_SPK_DEFAULT_BITW AUDIO_BITW_16
|
|
|
|
|
|
|
|
|
|
|
|
#define AUDIO_SUPPORT_MAX_FREQ 48
|
|
|
|
#define AUDIO_DEFAULT_FREQ AUDIO_FREQ_48K
|
|
|
|
#define AUDIO_DEFAULT_BITW AUDIO_BITW_16
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|