杰理之AUDIO_DAC【篇】

//DAC配置参数说明
struct dac_platform_data {
u8 sw_differ; //软件差分 0:不使用 1:使用 (只针对FL和RL两路通道作为软件差分输出时的配置)
u8 pa_auto_mute; //暂停DAC时是否自动MUTE功放 0:不mute功放 1:MUTE功放
u8 pa_mute_port; //功放MUTE IO
u8 pa_mute_value; //MUTE电平值 0:低电平 1:高电平
u8 differ_output; //是否使用硬件差分输出模式 0:不使用 1:使用 (只适用于FL和FR、RL和RR)
u8 hw_channel; //硬件DAC模拟通道
u8 ch_num; //数字通道,软件DMA输出通道数量
u8 fade_enable; //模拟音量淡入淡出使能位
u16 mute_delay_ms; //解MUTE延时ms
u16 fade_delay_ms; //模拟音量每级模拟增益淡入淡出延时ms
u16 sr_points; //多少个采样点进一次中断,一般不建议修改
u16 vcm_init_delay_ms; //VCM电压初始化后等待稳定的延时ms
u32 poweron_delay; //低功耗睡眠时恢复DAC模块的延迟us
};

//单声道单端输出
static const struct dac_platform_data dac_data = {
.sw_differ = 0,
.pa_auto_mute = 0,
.pa_mute_port = IO_PORTB_02,
.pa_mute_value = 0,
.differ_output = 0,
.hw_channel = BIT(0),
.ch_num = 1,
};

//软件单声道差分输出
static const struct dac_platform_data dac_data = {
.sw_differ = 1,
.pa_auto_mute = 0,
.pa_mute_port = IO_PORTB_02,
.pa_mute_value = 0,
.differ_output = 0,
.hw_channel = BIT(0) | BIT(2),
.ch_num = 4,
};

//软件双声道单端输出
static const struct dac_platform_data dac_data = {
.sw_differ = 0,
.pa_auto_mute = 0,
.pa_mute_port = IO_PORTB_02,
.pa_mute_value = 0,
.differ_output = 0,
.hw_channel = BIT(0) | BIT(2),
.ch_num = 4,
};

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rambo-Lamborghini

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值