Part Number: LM49350
Tool/software: Linux
I have a loopback PCM module connected to LM49350. when I test there is no sound, and when I test AUX out directy by left/right MIC input , that's ok. I thinks maybe where same wrong ADC/DAC configration. please help check.
LM49350 slave. mclk 2M, L/R frame rate 128K.
lm49350 basic setting.
snd_soc_write(codec, 0x01, 0x00);
snd_soc_write(codec, 0x02, 0x0c); //from 2.048M to 300KHz (6.5*2-1=12=0xc)
snd_soc_write(codec, 0x03, 0x00);
snd_soc_write(codec, 0x11, 0x03); // DAC to headphone L
snd_soc_write(codec, 0x12, 0x03); // DAC to headphone R
snd_soc_write(codec, 0x13, 0x03); // DAC to aux out
snd_soc_write(codec, 0x16, 0x0f); //mic level l 36db
snd_soc_write(codec, 0x17, 0x0f); //mic level r 36db
snd_soc_write(codec, 0x20, 0x03); //ADC_BASIC mono with 128 OSR, mclk as default
snd_soc_write(codec, 0x21, 0x01); //ADC_CLOCK 2048 / [2*128(osr)*8(8K sample)]
snd_soc_write(codec, 0x30, 0x01); //128 OSR & MCLK source
snd_soc_write(codec, 0x31, 0x01); // dived 1
snd_soc_write(codec, 0x41, 0x00); // adc level all 0db
snd_soc_write(codec, 0x42, 0x25); //mono from adc
snd_soc_write(codec, 0x44, 0x09); //select port1 l&r to DAC, need recheck remove R for mono mode??
snd_soc_write(codec, 0x51, 0x1f);
snd_soc_write(codec, 0x53, 0x0a); //mono 16bits && sync width 1 clocks looks like msm01 receipt only 32bits data 37 or 0a?
snd_soc_write(codec, 0x54, 0x1b); //tx rx both 16bit
snd_soc_write(codec, 0x55, 0x02); //rx mode, MSB, PCM short
snd_soc_write(codec, 0x56, 0x02); //tx mode, MSB, PCM short
snd_soc_write(codec, 0x80, 0x00); //ADC_EFFECTS_HPF
snd_soc_write(codec, 0x84, 0x0a);
snd_soc_write(codec, 0x85, 0x0a);
snd_soc_write(codec, 0x86, 0x0a);
snd_soc_write(codec, 0x87, 0x1f);
snd_soc_write(codec, 0x89, 0x33);
snd_soc_write(codec, 0x8A, 0x33);
snd_soc_write(codec, 0xA0, 0x02);
snd_soc_write(codec, 0xA0, 0x0a);
snd_soc_write(codec, 0xa4, 0x0a);
snd_soc_write(codec, 0xa5, 0x0a);
snd_soc_write(codec, 0xa6, 0x33);
snd_soc_write(codec, 0xa9, 0x1f); // DAC level right
snd_soc_write(codec, 0x00, 0x01);
pmc_clk_d=snd_soc_read(codec, 0x02);
pr_err("I2C read of PMC_CLK_DIV:%d\n",pmc_clk_d);