
/*! Default I2S configuration data for this chip */
const i2s_config_t device_i2s_config =
{
.master_mode = 1, /*!< Default to slave mode for pure I2S output */
.data_format = 0, /*!< I2S left justified */
.bit_delay = 1, /*!< I2S delay 1 bit */
.bits_per_sample = 16, /*!< 16-bit data words per channel */
.bclk_scaling = 64, /*!< 32 bit clocks per data word per channel */
.mclk_scaling = 0, /*!< External master clock disabled */
.enable_pio = PIN_INVALID
};
2. 修改adk\src\domains\audio\kymera\kymera_a2dp_analog_source.c,将模拟输入接口改为I2S输入接口

static Source kymeraA2dpAnalogSource_GetSource(audio_channel channel, uint8 inst, uint32 rate)
{
#define SAMPLE_SIZE 24 /* only if 24 bit resolution is supported this can be 24 */
Source source;
#ifdef ENABLE_I2S_INPUT
source = StreamAudioSource(AUDIO_HARDWARE_I2S, inst, channel);
AudioI2SConfigureSource(source, rate, SAMPLE_SIZE);
#else
analogue_input_params params = {
.pre_amp = FALSE,
.gain = 0x0c, /* for line-in set to 0dB */
.instance = 0, /* Place holder */
.enable_24_bit_resolution = FALSE};
DEBUG_LOG_VERBOSE("SourcekymeraWiredAnalog_GetSource, Get source for Channel: %u, Instance: %u and Sample Rate: %u", channel, inst, rate);
params.instance = inst;
source = AudioPluginAnalogueInputSetup(channel, params, rate);
#endif
PanicFalse(SourceConfigure(source, STREAM_AUDIO_SAMPLE_SIZE, SAMPLE_SIZE));
return source;
}
3. 编译运行,测试正常,进qact看看吧
