QCC---音频输出DAC\I2S\SPDIF切换

这篇博客介绍了如何在QCC芯片上通过PIO进行音频输出方式的切换,包括DAC、I2S和SPDIF三种模式。内容涉及高通QCC系列单片机的音频配置与控制。
摘要由CSDN通过智能技术生成

QCC---音频输出DAC\I2S\SPDIF切换

如何做PIO切换音频输出方式?

/*!
\copyright  Copyright (c) 2020 - 2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\version    %%version
\file       headset_setup_audio.c
\brief      Module Conifgure Audio chains for headset application
*/
 
#include "kymera.h"
#include "source_prediction.h"
#include "kymera_setup.h"
#include "wired_audio_source.h"
#include "cap_id_prim.h"
#ifdef ENABLE_LDAC_SINK
#include "chain_input_ldac_stereo.h"
#endif
#ifdef USB_VOICE_MODE_UWB
#include "chain_usb_voice_swb.h"
#endif
#include "headset_cap_ids.h"
#include "headset_setup_audio.h"
#include "headset_product_config.h"
 
#include "chain_sco_nb.h"
#include "chain_sco_wb.h"
#include "chain_sco_swb.h"
#ifdef INCLUDE_SWB_LC3
#include "chain_sco_swb_lc3.h"
#include "chain_sco_swb_lc3_2mic.h"
#endif
#include "chain_sco_nb_2mic.h"
#include "chain_sco_wb_2mic.h"
#include "chain_sco_swb_2mic.h"
#include "chain_sco_nb_2mic_binaural.h"
#include "chain_sco_wb_2mic_binaural.h"
#include "chain_sco_swb_2mic_binaural.h"
#include "chain_output_volume_stereo.h"
#include "chain_output_volume_mono.h"
#include "chain_output_volume_common.h"
#include "chain_output_volume_stereo_le.h"
#include "chain_output_volume_mono_le.h"
#include "chain_prompt_sbc.h"
#include "chain_prompt_aac.h"
#include "chain_prompt_pcm.h"
#include "chain_tone_gen.h"
#include "chain_aec.h"
#include "chain_va_encode_msbc.h"
#include "chain_va_encode_opus.h"
#include "chain_va_encode_sbc.h"
#include "chain_va_mic_1mic.h"
#include "chain_va_mic_1mic_cvc.h"
#include "chain_va_mic_1mic_cvc_no_vad_wuw.h"
#include "chain_va_mic_1mic_cvc_wuw.h"
#include "chain_va_mic_2mic_cvc.h"
#include "chain_va_mic_2mic_cvc_wuw.h"
#include "chain_va_wuw_qva.h"
#include "chain_va_wuw_gva.h"
#include "chain_va_wuw_apva.h"
#include "chain_anc.h"
 
#include "chain_input_sbc_stereo.h"
#include "chain_input_aptx_stereo.h"
#include "chain_input_aptxhd_stereo.h"
#include "chain_input_aptx_adaptive_stereo.h"
#include "chain_input_aptx_adaptive_stereo_q2q.h"
#ifdef INCLUDE_APTX_ADAPTIVE_22
#include "chain_input_aptx_adaptive_r3_stereo_q2q.h"
#include "chain_input_aptx_adaptive_r3_stereo.h"
#endif
#ifdef ENABLE_TWM_SPEAKER
#include "chain_input_aac_stereo_mix.h"
#include "chain_forwarding_input_aptx_right.h"
#include "chain_forwarding_input_aptx_left.h"
#include "chain_input_aptx_adaptive_r3_mono.h"
#include "chain_input_aptx_adaptive_r3_mono_q2q.h"
#include "chain_input_aptx_adaptive_stereo_mix.h"
#include "chain_input_aptx_adaptive_stereo_mix_q2q.h"
#include "chain_input_aptx_stereo_mix.h"
#include "chain_input_sbc_stereo_mix.h"
#include "chain_input_aptx_split_stereo.h"
#endif /* ENABLE_TWM_SPEAKER */
#include "chain_input_aac_stereo.h"
#include "chain_input_wired_analog_stereo.h"
#include "chain_input_usb_stereo.h"
#include "chain_usb_voice_rx_mono.h"
#include "chain_usb_voice_rx_stereo.h"
#include "chain_usb_voice_wb.h"
#include "chain_usb_voice_wb_2mic.h"
#include "chain_usb_voice_wb_2mic_binaural.h"
#include "chain_usb_voice_nb.h"
#include "chain_usb_voice_nb_2mic.h"
#include "chain_usb_voice_nb_2mic_binaural.h"
 
#if (defined(INCLUDE_MIRRORING) && defined (ENABLE_TWM_SPEAKER))
#define SPEAKER_MONO_STEREO
#endif
 
#ifdef ENABLE_LE_AUDIO_CSIP
#define SPEAKER_MONO
#endif
 
#ifdef INCLUDE_MUSIC_PROCESSING
#include "chain_music_processing_user_eq.h"
#if defined(SPEAKER_MONO_STEREO) || defined (SPEAKER_MONO)
#include "chain_music_processing_user_eq_mono.h"
#endif
#else
#include "chain_music_processing.h"
#if defined(SPEAKER_MONO_STEREO) || defined (SPEAKER_MONO)
#include "chain_music_processing_mono.h"
#endif
#endif /* INCLUDE_MUSIC_PROCESSING */
 
#if defined(INCLUDE_LE_AUDIO_BROADCAST) || defined(INCLUDE_LE_AUDIO_UNICAST)
#include "chain_lc3_iso_stereo_decoder.h"
#include "chain_lc3_iso_split_stereo_decoder.h"
#include <chain_lc3_iso_mono_to_stereo_decoder.h>
#ifdef SPEAKER_MONO
#include "chain_lc3_iso_mono_decoder.h"
#endif /* SPEAKER_MONO */
#ifdef INCLUDE_LE_AUDIO_GAMING_MODE_APTX_LITE
#include "chain_aptx_lite_iso_stereo_decoder.h"
#include "chain_aptx_lite_iso_mono_wb_1mic_cvc.h"
#endif /* INCLUDE_LE_AUDIO_GAMING_MODE_APTX_LITE */
#endif
 
#ifdef INCLUDE_LE_AUDIO_UNICAST
#include "chain_lc3_iso_voice_wb.h"
#include "chain_lc3_iso_voice_uwb.h"
#include "chain_lc3_iso_voice_swb.h"
#include "chain_lc3_iso_stereo_voice_wb.h"
#include "chain_lc3_iso_stereo_voice_uwb.h"
#include "chain_lc3_iso_stereo_voice_swb.h"
#include "chain_lc3_iso_mono_wb_1mic_cvc.h"
#include "chain_lc3_iso_stereo_voice_speaker_only.h"
#include "chain_lc3_iso_mono_voice_speaker_only.h"
#include "chain_lc3_iso_mono_1mic.h"
#include "chain_lc3_iso_dummy_output.h"
#include "chain_lc3_iso_mono_swb_1mic_cvc.h"
 
/* From Air Chains for LE Voice */
#include "chain_lc3_iso_to_dac_voice_wb_mono.h"
 
#endif
 
#include "chain_mic_resampler.h"
 
#include "chain_va_graph_manager.h"
 
#ifdef ENABLE_SIMPLE_SPEAKER
#include "chain_spk_sco_nb.h"
#include "chain_spk_sco_wb.h"
#include "chain_spk_sco_swb.h"
#include "chain_spk_usb_voice_nb.h"
#include "chain_spk_usb_voice_wb.h"
#if defined(KYMERA_SCO_USE_2MIC) || defined(KYMERA_SCO_USE_2MIC_BINAURAL)
      #error KYMERA_SCO_USE_2MIC, KYMERA_SCO_USE_2MIC_BINAURAL is not supported in Simple Speaker build
#endif
#endif  /* ENABLE_SIMPLE_SPEAKER */
 
#ifdef INCLUDE_GAMING_HEADSET_ADDON
#include "chain_output_mixing_common.h"
#endif
 
#if defined (INCLUDE_LE_AUDIO_BROADCAST_SOURCE) && defined (ENABLE_SIMPLE_SPEAKER)
#ifdef ENABLE_LE_AUDIO_TRANSCODE_BROADCAST_SUPPORT
#include "chain_input_aac_transcode_iso_conc_stereo_p1.h"
#include "chain_input_sbc_transcode_iso_conc_stereo_p1.h"
#include "chain_input_aac_transcode_iso_conc_joint_stereo_p1.h"
<
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值