[wdmaudiodev] How to change intel PCH's I2S output format?

  • From: "Yanqi Li" <mickey811@xxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx " <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 11 Dec 2020 16:58:06 +0800 (CST)

I want to change change intel PCH's I2S output format, for example,  from 
48000Khz, 24bit, 2 chanel, master mode, to 32000Khz, 16bit, 2 channel, slave 
mode. Now I found in PC's BIOS code the I2S configuration BLOB which specifies 
the I2S format as follows:
// I2S/SSP Configuration BLOBsb
// Audio Format and Configuration details
//
// Frequency: 48kHz, PCM resolution: 24 bits
// TDM slots: 4
// Codec: Realtek ALC274, mode: slave
CONST UINT32 I2sRtk274Render4ch48kHz24bitFormatConfig[] =
{0x0,//gtw_attr
0xffffff10, 0xffffff32, 0xffff3210,0xffff3210,//tdm_ts_group
0xffff3210, 0xffff3210, 0xffff3210,0xffff3210,//tdm_ts_group
0x83d00737, 0xc0700000, 0x0, // ssc0, ssc1, sscto
0x02010004, 0xf, 0xf, 0x4002, // sspsp, sstsa, ssrsa, ssc2
0x4, 0x7070f00, 0x20, // sspsp2, ssc3, ssioc
0x00020001, //mdivctrl
0x00000002}; // mdivr




This above array's structure is defined as :
// struct skl_i2s_config_blob_legacy - Structure defines I2S Gateway 
configuration legacy blob
// @gtw_attr: Gateway attribute for the I2S Gateway
// @tdm_ts_group: TDM slot mapping against channels in the Gateway.
// @i2s_cfg: I2S HW registers
// @mclk: MCLK clock source and divider values
struct skl_i2s_config_blob_legacy {
u32 gtw_attr;
u32 tdm_ts_group[SKL_I2S_MAX_TIME_SLOTS];
struct skl_i2s_config i2s_cfg;
struct skl_i2s_config_mclk mclk;
};

The skl_i2s_config i2s_cfg and skl_i2s_config_mclk is defined as:
struct skl_i2s_config {
u32 ssc0;
u32 ssc1;
u32 sscto;
u32 sspsp;
u32 sstsa;
u32 ssrsa;
u32 ssc2;
u32 sspsp2;
u32 ssc3;
u32 ssioc;
} __packed;

struct skl_i2s_config_mclk {
u32 mdivctrl;
u32 mdivr;
};

As far as I know, the ssc0, ssc1 ssioc are intel PCH's HW registers 
configuration value(i2s configuration Blob). I dont know how to configure those 
registers to acheive certain I2S output format. 


I searched all over the internet, and can not find how to configure those 
registers, and we also asked
intel for it , but intel refused to support us as  they think i2s is too old 
for PC (HDA or soundwire is new).


Can you help me with the register manual for intel i2s? or you know how to 
configure, please tell me.  Thank you very much. 




 

Other related posts:

  • » [wdmaudiodev] How to change intel PCH's I2S output format? - Yanqi Li