Other Parts Discussed in Thread: PCM5242
https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1629477/pcm5242-loudness
器件型号: PCM5242
嗨、PCM5242 主题、我无法获得与音量匹配的三级音量、音量正常、音量正常
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好、Garret、EQ 滤波器不起作用。 10 db +/ 10 db — 只有平面响应。 我会连接配置。
#ifndef TAS5756_DSP_H
#define TAS5756_DSP_H
typedef unsigned char cfg_u8;
typedef union {
struct {
cfg_u8 offset;
cfg_u8 value;
};
struct {
cfg_u8 command;
cfg_u8 param;
};
} cfg_reg;
#define CFG_META_SWITCH (255)
#define CFG_META_DELAY (254)
#define CFG_META_BURST (253)
/*
* DSP script minimo
* HPF circa 60Hz
* usa un solo biquad
*/
const cfg_reg registers[] =
{
/* page 0 */
{ 0x00,0x00 },
/* vai alla memoria coefficienti DSP */
{ 0x00,0x2C },
/* biquad coefficient */
{ 0x08,0x7F },
{ 0x09,0xFF },
{ 0x0A,0x00 },
{ 0x0B,0x00 },
{ 0x0C,0x80 },
{ 0x0D,0x00 },
{ 0x0E,0x00 },
{ 0x0F,0x00 },
{ 0x10,0x7F },
{ 0x11,0x00 },
{ 0x12,0x00 },
{ 0x13,0x00 },
{ CFG_META_DELAY,1 }
};
#endif
#include
#include
#include “tas5756.h"</s>“
#include “i2c_msp430.h"</s>“
#define TAS5756_ADDR 0x4C
静态 uint8_t TAS_Last_vol = 0x30;
静态 uint8_t TAS_Manded = 0;
静态 uint8_t TAS_FILTER_MODE = 0;
/* prototipi interni */
静态 void TAS_write (uint8_t reg、uint8_t val);
静态 void TAS_SET_PAGE (uint8_t PAGE);
静态 void TAS_apply_volume (uint8_t v);
静态 void TAS_APPLY_MODE_FEEDBACK (void);
静态空洞 TAS_WRITE_BIQUADS (int32_t、int32_t b0、int32_t b1、int32_t b2
int32_t、int32_t A2);
静态 void TAS_set_book (uint8_t book)
{
TAS_WRITE(0x7F,簿);
}
/*------------------------------------------------------------------------ */
静态 void TAS_write (uint8_t reg、uint8_t val)
{
I2C_WriteByte (TAS5756_ADDR、reg、val);
__ delay_cycles (4000);
}
/*------------------------------------------------------------------------ */
静态 void TAS_SET_PAGE(uint8_t 页)
{
TAS_WRITE(0x00,页);
}
/*------------------------------------------------------------------------ */
静态 void TAS_apply_volume (uint8_t v)
{
TAS_SET_PAGE (0x00);
TAS_WRITE (0x3D、v);
TAS_WRITE (0x3E、v);
}
/*------------------------------------------------------------------------ */
静态空洞 TAS_WRITE_BIQUADS (int32_t、int32_t b0、int32_t b1、int32_t b2
int32_t A1、int32_t A2)
{
TAS_SET_Book (0x00);
TAS_SET_PAGE (0x2A);
TAS_WRITE (0x00、(b0>>16)&0xFF);
TAS_WRITE (0x01、(b0>>8)&0xFF);
TAS_WRITE (0x02、(b0)&0xFF);
TAS_WRITE (0x03、(B1>>16)&0xFF);
TAS_WRITE (0x04、(B1>>8)&0xFF);
TAS_WRITE (0x05、(B1)&0xFF);
TAS_WRITE (0x06、(B2>>16)&0xFF);
TAS_WRITE (0x07、(B2>>8)&0xFF);
TAS_WRITE (0x08、(B2)&0xFF);
TAS_WRITE (0x09、(A1>>16)&0xFF);
TAS_WRITE (0x0A、(A1>>8)&0xFF);
TAS_WRITE (0x0B、(A1)&0xFF);
TAS_WRITE (0x0C、(A2>16)&0xFF);
TAS_WRITE (0x0D、(A2>8)&0xFF);
TAS_WRITE (0x0E、(A2)&0xFF);
TAS_SET_PAGE (0x00);
}
尊敬的 Eugenio:
我的团队仅负责 PCM5242、因为 TAS5756 属于音频放大器产品系列。 我可以回答有关 PCM 设备的任何问题、但我建议在标题中发布带有 TAS5756 的新主题、以便将其定向到可以回答您的问题的正确团队。
请记住、如果两个器件具有相同的地址并连接到相同的 I2C 线路、则您写入一个器件的任何配置也会写入另一个器件。 这可能会导致一些问题。
此致、
Garret